@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * df_commerce.strongarm.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * df_commerce.strongarm.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_strongarm(). |
@@ -104,8 +104,8 @@ |
||
| 104 | 104 | $products = entity_load('commerce_product'); |
| 105 | 105 | $products_key = array_keys($products); |
| 106 | 106 | $products_number = count($products_key); |
| 107 | - $count = $products_number < $items_number ? $products_number: $items_number; |
|
| 108 | - for($i = 0; $i < $count; $i++) { |
|
| 107 | + $count = $products_number < $items_number ? $products_number : $items_number; |
|
| 108 | + for ($i = 0; $i < $count; $i++) { |
|
| 109 | 109 | $product = $products[$products_key[rand(0, $products_number - 1)]]; |
| 110 | 110 | $line_item = commerce_product_line_item_new($product, 1, $order->order_id); |
| 111 | 111 | commerce_line_item_save($line_item); |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * df_commerce.field_group.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * df_commerce.field_group.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_field_group_info(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * DF Admin page handling functions. |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * DF Admin page handling functions. |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * DF Admin page callback used to list scenarios. |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * Contains DF Admin's uninstall command. |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * Contains DF Admin's uninstall command. |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Page callback; uninstall a scenario. |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | drupal_set_message(t('No Demo Framework Scenario is currently installed.')); |
| 24 | 24 | return FALSE; |
| 25 | 25 | } |
| 26 | - else{ |
|
| 26 | + else { |
|
| 27 | 27 | drupal_set_message(t('Uninstalling Demo Framework Scenario @scenario', array('@scenario' => $scenario))); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -22,8 +22,7 @@ discard block |
||
| 22 | 22 | if (!$scenario = variable_get('df_admin_installed_scenario', FALSE)) { |
| 23 | 23 | drupal_set_message(t('No Demo Framework Scenario is currently installed.')); |
| 24 | 24 | return FALSE; |
| 25 | - } |
|
| 26 | - else{ |
|
| 25 | + } else{ |
|
| 27 | 26 | drupal_set_message(t('Uninstalling Demo Framework Scenario @scenario', array('@scenario' => $scenario))); |
| 28 | 27 | } |
| 29 | 28 | |
@@ -111,13 +110,11 @@ discard block |
||
| 111 | 110 | if ($enable_module) { |
| 112 | 111 | $options = array('query' => array('token' => drupal_get_token(DRUPAL_ROOT . '/df/enable/' . $enable_module))); |
| 113 | 112 | $path = array('admin/df/enable/' . $enable_module, $options); |
| 114 | - } |
|
| 115 | - else { |
|
| 113 | + } else { |
|
| 116 | 114 | $path = ''; |
| 117 | 115 | } |
| 118 | 116 | batch_process($path); |
| 119 | - } |
|
| 120 | - else { |
|
| 117 | + } else { |
|
| 121 | 118 | drush_backend_batch_process(); |
| 122 | 119 | } |
| 123 | 120 | |
@@ -76,8 +76,7 @@ |
||
| 76 | 76 | watchdog('demo framework', 'Enabled module: ' . $module); |
| 77 | 77 | drupal_set_message(t('@module enabled.', array('@module' => $module)), 'status'); |
| 78 | 78 | return TRUE; |
| 79 | - } |
|
| 80 | - else { |
|
| 79 | + } else { |
|
| 81 | 80 | drupal_set_message(t('@module does not exist or dependencies are missing.', array('@module' => $module)), 'error'); |
| 82 | 81 | return FALSE; |
| 83 | 82 | } |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * df_admin.strongarm.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * df_admin.strongarm.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_strongarm(). |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @file |
|
| 4 | - * df_admin.features.inc |
|
| 5 | - */ |
|
| 3 | + * @file |
|
| 4 | + * df_admin.features.inc |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Implements hook_ctools_plugin_api(). |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | * The machine name of the scenario feature. |
| 138 | 138 | * @param string $rollback |
| 139 | 139 | * Boolean: rollback existing demo content. |
| 140 | - */ |
|
| 140 | + */ |
|
| 141 | 141 | function drush_df_admin_reset_scenario($scenario) { |
| 142 | 142 | $rollback = drush_get_option('rollback', TRUE); |
| 143 | 143 | $seed = drush_get_option('seed', TRUE); |