This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (drupal_is_cli()) { | |
ini_set('max_input_time', 120); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_migrate_api(). | |
*/ | |
function garmentbox_migrate_migrate_api() { | |
$api = array( | |
'api' => 2, | |
'migrations' => array( | |
'GarmentboxUsers' => array('class_name' => 'GarmentboxUsers'), | |
// Terms. | |
'garmentboxSeasonStatusTerms' => array('class_name' => 'garmentboxSeasonStatusTerms'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /Applications/MAMP/htdocs/opengizra | |
chmod -R 777 www/ | |
bash scripts/build | |
cd www | |
drush sql-drop -y | |
drush si -y garmentbox --account-pass=admin --db-url=mysql://root:root@localhost/opengizra_build --uri=http://local:8888/opengizra/www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================================================================================ | |
Error executing action `install` on resource 'package[php5-xhprof]' | |
================================================================================ | |
Chef::Exceptions::Exec | |
---------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$values = array( | |
'uid' => 1, | |
'type' => 'school', | |
'title' => time(), | |
); | |
$group = entity_create('node', $values); | |
node_save($group); | |
$values = array( | |
'uid' => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gids = og_get_entity_groups($entity_type, $id); | |
4 if (count($gids) == 1) { | |
5 $gids = reset($gids); | |
6 if (count($gids) > 1) { | |
7 continue; | |
8 } | |
9 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($field['cardinality'] > 1) { | |
foreach ($wrapper->{$field_name}->value() as $delta => $term) { | |
if ($term->vid != $this->vid) { | |
$wrapper->{$field_name}->offsetUnset($delta); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_views_pre_render(). | |
*/ | |
function message_views_pre_render(&$view) { | |
if ($view->base_table != 'message' || empty($view->result[0]->mid)) { | |
// Not a message view, or no results with message ID. | |
return; | |
} | |
$mids = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2012-12-24T19:51:55+01:00] INFO: Processing git[/usr/share/drush] action sync (drush::head line 20) | |
[2012-12-24T19:52:50+01:00] INFO: git[/usr/share/drush] cloning repo git://git.drupal.org/project/drush.git to /usr/share/drush | |
================================================================================ | |
Error executing action `sync` on resource 'git[/usr/share/drush]' | |
================================================================================ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /Applications/MAMP/htdocs/opengizra | |
chmod -R 777 www/ | |
bash scripts/build | |
cd www | |
drush sql-drop -y | |
drush si -y garmentbox --account-pass=admin --db-url=mysql://root:root@localhost/opengizra_build --uri=http://local:8888/opengizra/www | |
drush mi --all --user=1 |