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 | |
BUILD=/Applications/MAMP/htdocs/openscholar | |
NEWDIR=/Applications/MAMP/htdocs/os | |
cd $BUILD | |
bash scripts/build.sh -y $NEWDIR | |
cd $NEWDIR | |
drush sql-drop -y |
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
@api | |
Scenario: Visting homepage should redircet me to the active season page. | |
Given I am logged in as a user with the "authenticated user" role | |
When I go to page "/" | |
Then I should be redirect to a "season" page titled "Autumn-Winter 2013 Women" |
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
drush si -y openscholar --account-pass=admin --db-url=mysql://root:@127.0.0.1/drupal --uri=http://127.0.0.1 openscholar_flavor_form.os_profile_flavor=development openscholar_install_type.os_profile_type=vsite | |
drush vset purl_base_domain http://127.0.0.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
/** | |
* Implements hook_init(). | |
*/ | |
function foo_init() { | |
$field = field_info_field('bar'); | |
$instance = field_info_instance('node', 'bar', 'baz'); | |
// This will call SelectionBase | |
$handler = entity_reference_get_selection_handler($field, $instance); | |
$ids = $handler->getReferencableEntities(); |
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
db_query("UPDATE {field_data_message_text} SET delta = delta + 1 WHERE bundle = 'message_type_email';"); |
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('user', $account); | |
if (empty($gids['node'])) { | |
return; | |
} | |
// Query flag to see if subscribing to any given groups. | |
// $gids['node']; | |
if (!$result) { | |
return; |
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
Drupal.behaviors.hvNinesixty = { | |
attach: function (context) { | |
$(document) | |
.bind('drupalOverlayOpen', function() { | |
$('iframe:not(iframe.overlay-element)').hide(); | |
}) | |
.bind('drupalOverlayClose', function() { | |
$('iframe:not(iframe.overlay-element)').show(); | |
}) |
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 | |
SOURCE=/Applications/MAMP/htdocs/os-make | |
TARGET=/Applications/MAMP/htdocs/os-build | |
cd $SOURCE | |
bash scripts/build.sh -y $TARGET | |
cd $TARGET | |
drush sql-drop -y |
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
# Check if settings.php exists, which means it is an existing installation. | |
if [ -f $BUILD_ROOT/www/sites/default/settings.php ]; then | |
cp -rp $BUILD_ROOT/www/sites/default sites-backup | |
fi |
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
foreach ($item_variations as $item_variation) { | |
$nid = $item_variation->nid; | |
$form[$nid] = array( | |
'#markup' => check_plain($item_variation->title); | |
); | |
foreach ($types as $type) { | |
$form[$nid][$type] = array( | |
'#markup' => check_plain($label); | |
); |
OlderNewer