Completed
Pull Request — master (#1821)
by Christian
15:34 queued 05:15
created
drupal/sites/default/boinc/modules/contrib/features/features.module 1 patch
Switch Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -248,11 +248,11 @@  discard block
 block discarded – undo
248 248
  */
249 249
 function features_help($path, $arg) {
250 250
   switch ($path) {
251
-    case 'admin/help#features':
252
-      $output = file_get_contents(drupal_get_path('module', 'features') .'/README.txt');
253
-      return module_exists('markdown') ? filter_xss_admin(module_invoke('markdown', 'filter', 'process', 0, -1, $output)) : '<pre>'. check_plain($output) .'</pre>';
254
-    case 'admin/build/features':
255
-      return '<p>'. t('A "Feature" is a certain type of Drupal module with contains a package of configuration that, when enabled, provides a new set of functionality for your Drupal site. Enable features by selecting the checkboxes below and clicking the Save configuration button. If the configuration of the feature has been changed its "State" will be either "overridden" or "needs review", otherwise it will be "default", indicating that the configuration has not been changed. Click on the state to see more details about the feature and its components.') .'</p>';
251
+  case 'admin/help#features':
252
+    $output = file_get_contents(drupal_get_path('module', 'features') .'/README.txt');
253
+    return module_exists('markdown') ? filter_xss_admin(module_invoke('markdown', 'filter', 'process', 0, -1, $output)) : '<pre>'. check_plain($output) .'</pre>';
254
+  case 'admin/build/features':
255
+    return '<p>'. t('A "Feature" is a certain type of Drupal module with contains a package of configuration that, when enabled, provides a new set of functionality for your Drupal site. Enable features by selecting the checkboxes below and clicking the Save configuration button. If the configuration of the feature has been changed its "State" will be either "overridden" or "needs review", otherwise it will be "default", indicating that the configuration has not been changed. Click on the state to see more details about the feature and its components.') .'</p>';
256 256
   }
257 257
 }
258 258
 
@@ -679,16 +679,16 @@  discard block
 block discarded – undo
679 679
   features_include();
680 680
 
681 681
   switch ($op) {
682
-    case 'revert':
683
-      $restore_states = array(FEATURES_OVERRIDDEN, FEATURES_REBUILDABLE, FEATURES_NEEDS_REVIEW);
684
-      $restore_hook = 'features_revert';
685
-      $log_action = 'Revert';
686
-      break;
687
-    case 'rebuild':
688
-      $restore_states = array(FEATURES_REBUILDABLE);
689
-      $restore_hook = 'features_rebuild';
690
-      $log_action = 'Rebuild';
691
-      break;
682
+  case 'revert':
683
+    $restore_states = array(FEATURES_OVERRIDDEN, FEATURES_REBUILDABLE, FEATURES_NEEDS_REVIEW);
684
+    $restore_hook = 'features_revert';
685
+    $log_action = 'Revert';
686
+    break;
687
+  case 'rebuild':
688
+    $restore_states = array(FEATURES_REBUILDABLE);
689
+    $restore_hook = 'features_rebuild';
690
+    $log_action = 'Rebuild';
691
+    break;
692 692
   }
693 693
 
694 694
   if (empty($items)) {
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/features/features.drush.inc 1 patch
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -84,22 +84,22 @@  discard block
 block discarded – undo
84 84
  */
85 85
 function features_drush_help($section) {
86 86
   switch ($section) {
87
-    case 'drush:features':
88
-      return dt("List all the available features for your site.");
89
-    case 'drush:features-export':
90
-      return dt("Export a feature from your site into a module.");
91
-    case 'drush:features-update':
92
-      return dt("Update a feature module on your site.");
93
-    case 'drush:features-update-all':
94
-      return dt("Update all feature modules on your site.");
95
-    case 'drush:features-revert':
96
-      return dt("Revert a feature module on your site.");
97
-    case 'drush:features-revert-all':
98
-      return dt("Revert all enabled feature module on your site.");
99
-    case 'drush:features-revert':
100
-      return dt("Revert a feature module on your site.");
101
-    case 'drush:features-diff':
102
-      return dt("Show a diff of a feature module.");
87
+  case 'drush:features':
88
+    return dt("List all the available features for your site.");
89
+  case 'drush:features-export':
90
+    return dt("Export a feature from your site into a module.");
91
+  case 'drush:features-update':
92
+    return dt("Update a feature module on your site.");
93
+  case 'drush:features-update-all':
94
+    return dt("Update all feature modules on your site.");
95
+  case 'drush:features-revert':
96
+    return dt("Revert a feature module on your site.");
97
+  case 'drush:features-revert-all':
98
+    return dt("Revert all enabled feature module on your site.");
99
+  case 'drush:features-revert':
100
+    return dt("Revert a feature module on your site.");
101
+  case 'drush:features-diff':
102
+    return dt("Show a diff of a feature module.");
103 103
   }
104 104
 }
105 105
 
@@ -111,16 +111,16 @@  discard block
 block discarded – undo
111 111
   $rows = array(array(dt('Name'), dt('Feature'), dt('Status'), dt('State')));
112 112
   foreach (features_get_features(NULL, TRUE) as $k => $m) {
113 113
     switch (features_get_storage($m->name)) {
114
-      case FEATURES_DEFAULT:
115
-      case FEATURES_REBUILDABLE:
116
-        $storage = '';
117
-        break;
118
-      case FEATURES_OVERRIDDEN:
119
-        $storage = dt('Overridden');
120
-        break;
121
-      case FEATURES_NEEDS_REVIEW:
122
-        $storage = dt('Needs review');
123
-        break;
114
+    case FEATURES_DEFAULT:
115
+    case FEATURES_REBUILDABLE:
116
+      $storage = '';
117
+      break;
118
+    case FEATURES_OVERRIDDEN:
119
+      $storage = dt('Overridden');
120
+      break;
121
+    case FEATURES_NEEDS_REVIEW:
122
+      $storage = dt('Needs review');
123
+      break;
124 124
     }
125 125
     $rows[] = array(
126 126
       $m->info['name'],
@@ -436,12 +436,12 @@  discard block
 block discarded – undo
436 436
   $args = array('!feature' => $feature);
437 437
 
438 438
   switch ($error) {
439
-    case 'FEATURES_FEATURE_NOT_ENABLED':
440
-      $message = 'The feature !feature is not enabled.';
441
-      break;
442
-    default:
443
-      $error = 'FEATURES_FEATURE_NOT_FOUND';
444
-      $message = 'The feature !feature could not be found.';
439
+  case 'FEATURES_FEATURE_NOT_ENABLED':
440
+    $message = 'The feature !feature is not enabled.';
441
+    break;
442
+  default:
443
+    $error = 'FEATURES_FEATURE_NOT_FOUND';
444
+    $message = 'The feature !feature could not be found.';
445 445
   }
446 446
 
447 447
   return drush_set_error($error, dt($message, $args));
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/features/features.export.inc 1 patch
Switch Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -217,12 +217,12 @@  discard block
 block discarded – undo
217 217
     $file = array('name' => 'features');
218 218
     if (isset($components[$component]['default_file'])) {
219 219
       switch ($components[$component]['default_file']) {
220
-        case FEATURES_DEFAULTS_INCLUDED:
221
-          $file['name'] = "features.$component";
222
-          break;
223
-        case FEATURES_DEFAULTS_CUSTOM:
224
-          $file['name'] = $components[$component]['default_filename'];
225
-          break;
220
+      case FEATURES_DEFAULTS_INCLUDED:
221
+        $file['name'] = "features.$component";
222
+        break;
223
+      case FEATURES_DEFAULTS_CUSTOM:
224
+        $file['name'] = $components[$component]['default_filename'];
225
+        break;
226 226
       }
227 227
     }
228 228
 
@@ -521,15 +521,15 @@  discard block
 block discarded – undo
521 521
  */
522 522
 function features_get_signature($state = 'default', $module_name, $component, $reset = FALSE) {
523 523
   switch ($state) {
524
-    case 'cache':
525
-      $codecache = variable_get('features_codecache', array());
526
-      return isset($codecache[$module_name][$component]) ? $codecache[$module_name][$component] : FALSE;
527
-    case 'default':
528
-      $objects = features_get_default($component, $module_name, TRUE, $reset);
529
-      break;
530
-    case 'normal':
531
-      $objects = features_get_normal($component, $module_name, $reset);
532
-      break;
524
+  case 'cache':
525
+    $codecache = variable_get('features_codecache', array());
526
+    return isset($codecache[$module_name][$component]) ? $codecache[$module_name][$component] : FALSE;
527
+  case 'default':
528
+    $objects = features_get_default($component, $module_name, TRUE, $reset);
529
+    break;
530
+  case 'normal':
531
+    $objects = features_get_normal($component, $module_name, $reset);
532
+    break;
533 533
   }
534 534
   if (!empty($objects)) {
535 535
     $objects = (array) $objects;
@@ -560,18 +560,18 @@  discard block
 block discarded – undo
560 560
   $semaphore = !empty($semaphore) ? unserialize($semaphore) : array();
561 561
 
562 562
   switch ($op) {
563
-    case 'get':
564
-      return isset($semaphore[$component]) ? $semaphore[$component] : FALSE;
565
-    case 'set':
566
-      $semaphore[$component] = time();
563
+  case 'get':
564
+    return isset($semaphore[$component]) ? $semaphore[$component] : FALSE;
565
+  case 'set':
566
+    $semaphore[$component] = time();
567
+    variable_set('features_semaphore', $semaphore);
568
+    break;
569
+  case 'del':
570
+    if (isset($semaphore[$component])) {
571
+      unset($semaphore[$component]);
567 572
       variable_set('features_semaphore', $semaphore);
568
-      break;
569
-    case 'del':
570
-      if (isset($semaphore[$component])) {
571
-        unset($semaphore[$component]);
572
-        variable_set('features_semaphore', $semaphore);
573
-      }
574
-      break;
573
+    }
574
+    break;
575 575
   }
576 576
 }
577 577
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/features/features.admin.inc 1 patch
Switch Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -152,27 +152,27 @@  discard block
 block discarded – undo
152 152
  */
153 153
 function features_export_form_validate_field($element, &$form_state) {
154 154
   switch ($element['#name']) {
155
-    case 'module_name':
156
-      if (!preg_match('!^[a-z0-9_]+$!', $element['#value'])) {
157
-        form_error($element, t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
158
-      }
159
-      // If user is filling out the feature name for the first time and uses
160
-      // the name of an existing module throw an error.
161
-      else if (empty($element['#default_value']) && features_get_info('module', $element['#value'])) {
162
-        form_error($element, t('A module by the name @name already exists on your site. Please choose a different name.', array('@name' => $element['#value'])));
163
-      }
164
-      break;
165
-    case 'project_status_url':
166
-      if (!empty($element['#value']) && !valid_url($element['#value'])) {
167
-        form_error($element, t('The URL %url is invalid. Please enter a fully-qualified URL, such as http://www.example.com/feed.xml.', array('%url' => $element['#value'])));
168
-      }
169
-      break;
170
-    case 'version':
171
-      preg_match('/^(?P<core>\d+\.x)-(?P<major>\d+)\.(?P<patch>\d+)-?(?P<extra>\w+)?$/', $element['#value'], $matches);
172
-      if (!empty($element['#value']) && !isset($matches['core'], $matches['major'])) {
173
-        form_error($element, t('Please enter a valid version with core and major version number. Example: !example', array('!example' => '6.x-1.0')));
174
-      };
175
-      break;
155
+  case 'module_name':
156
+    if (!preg_match('!^[a-z0-9_]+$!', $element['#value'])) {
157
+      form_error($element, t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
158
+    }
159
+    // If user is filling out the feature name for the first time and uses
160
+    // the name of an existing module throw an error.
161
+    else if (empty($element['#default_value']) && features_get_info('module', $element['#value'])) {
162
+      form_error($element, t('A module by the name @name already exists on your site. Please choose a different name.', array('@name' => $element['#value'])));
163
+    }
164
+    break;
165
+  case 'project_status_url':
166
+    if (!empty($element['#value']) && !valid_url($element['#value'])) {
167
+      form_error($element, t('The URL %url is invalid. Please enter a fully-qualified URL, such as http://www.example.com/feed.xml.', array('%url' => $element['#value'])));
168
+    }
169
+    break;
170
+  case 'version':
171
+    preg_match('/^(?P<core>\d+\.x)-(?P<major>\d+)\.(?P<patch>\d+)-?(?P<extra>\w+)?$/', $element['#value'], $matches);
172
+    if (!empty($element['#value']) && !isset($matches['core'], $matches['major'])) {
173
+      form_error($element, t('Please enter a valid version with core and major version number. Example: !example', array('!example' => '6.x-1.0')));
174
+    };
175
+    break;
176 176
   }
177 177
 }
178 178
 
@@ -490,12 +490,12 @@  discard block
 block discarded – undo
490 490
   foreach ($feature->info['features'] as $component => $items) {
491 491
     if (user_access('administer features') && in_array($states[$feature->name][$component], array(FEATURES_OVERRIDDEN, FEATURES_NEEDS_REVIEW))) {
492 492
       switch ($states[$feature->name][$component]) {
493
-        case FEATURES_OVERRIDDEN:
494
-          $revert = TRUE;
495
-          break;
496
-        case FEATURES_NEEDS_REVIEW:
497
-          $review = TRUE;
498
-          break;
493
+      case FEATURES_OVERRIDDEN:
494
+        $revert = TRUE;
495
+        break;
496
+      case FEATURES_NEEDS_REVIEW:
497
+        $review = TRUE;
498
+        break;
499 499
       }
500 500
       $form['revert'][$component] = array(
501 501
         '#type' => 'checkbox',
Please login to merge, or discard this patch.
panels/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php 1 patch
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,12 +156,12 @@
 block discarded – undo
156 156
 
157 157
   function get_panels_storage_op_for_ajax($method) {
158 158
     switch ($method) {
159
-      case 'ajax_unlock_ipe':
160
-      case 'ajax_save_form':
161
-        return 'update';
162
-      case 'ajax_change_layout':
163
-      case 'ajax_set_layout':
164
-        return 'change layout';
159
+    case 'ajax_unlock_ipe':
160
+    case 'ajax_save_form':
161
+      return 'update';
162
+    case 'ajax_change_layout':
163
+    case 'ajax_set_layout':
164
+      return 'change layout';
165 165
     }
166 166
 
167 167
     return parent::get_panels_storage_op_for_ajax($method);
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/panels/panels.module 1 patch
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -653,18 +653,18 @@  discard block
 block discarded – undo
653 653
    */
654 654
   function get_title() {
655 655
     switch ($this->hide_title) {
656
-      case PANELS_TITLE_NONE:
657
-        return '';
656
+    case PANELS_TITLE_NONE:
657
+      return '';
658 658
 
659
-      case PANELS_TITLE_PANE:
660
-        return isset($this->stored_pane_title) ? $this->stored_pane_title : '';
659
+    case PANELS_TITLE_PANE:
660
+      return isset($this->stored_pane_title) ? $this->stored_pane_title : '';
661 661
 
662
-      case PANELS_TITLE_FIXED:
663
-      case FALSE; // For old exported panels that are not in the database.
664
-        if (!empty($this->title)) {
665
-          return filter_xss_admin(ctools_context_keyword_substitute($this->title, array(), $this->context));
666
-        }
667
-        return NULL;
662
+    case PANELS_TITLE_FIXED:
663
+    case FALSE; // For old exported panels that are not in the database.
664
+      if (!empty($this->title)) {
665
+        return filter_xss_admin(ctools_context_keyword_substitute($this->title, array(), $this->context));
666
+      }
667
+      return NULL;
668 668
     }
669 669
   }
670 670
 
@@ -1039,15 +1039,15 @@  discard block
 block discarded – undo
1039 1039
   }
1040 1040
   $output .= $prefix . '$display->hide_title = ';
1041 1041
   switch ($display->hide_title) {
1042
-    case PANELS_TITLE_FIXED:
1043
-      $output .= 'PANELS_TITLE_FIXED';
1044
-      break;
1045
-    case PANELS_TITLE_NONE:
1046
-      $output .= 'PANELS_TITLE_NONE';
1047
-      break;
1048
-    case PANELS_TITLE_PANE:
1049
-      $output .= 'PANELS_TITLE_PANE';
1050
-      break;
1042
+  case PANELS_TITLE_FIXED:
1043
+    $output .= 'PANELS_TITLE_FIXED';
1044
+    break;
1045
+  case PANELS_TITLE_NONE:
1046
+    $output .= 'PANELS_TITLE_NONE';
1047
+    break;
1048
+  case PANELS_TITLE_PANE:
1049
+    $output .= 'PANELS_TITLE_PANE';
1050
+    break;
1051 1051
   }
1052 1052
   $output .= ";\n";
1053 1053
 
Please login to merge, or discard this patch.
boinc/modules/contrib/panels/plugins/export_ui/panels_layouts_ui.class.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -182,24 +182,24 @@
 block discarded – undo
182 182
   function list_build_row($item, &$form_state, $operations) {
183 183
     // Set up sorting
184 184
     switch ($form_state['values']['order']) {
185
-      case 'disabled':
186
-        $this->sorts[$item->name] = empty($item->disabled) . $item->admin_title;
187
-        break;
188
-      case 'title':
189
-        $this->sorts[$item->name] = $item->admin_title;
190
-        break;
191
-      case 'name':
192
-        $this->sorts[$item->name] = $item->name;
193
-        break;
194
-      case 'category':
195
-        $this->sorts[$item->name] = ($item->category ? $item->category : t('Miscellaneous')) . $item->admin_title;
196
-        break;
197
-      case 'plugin':
198
-        $this->sorts[$item->name] = $item->plugin;
199
-        break;
200
-      case 'storage':
201
-        $this->sorts[$item->name] = $item->type . $item->admin_title;
202
-        break;
185
+    case 'disabled':
186
+      $this->sorts[$item->name] = empty($item->disabled) . $item->admin_title;
187
+      break;
188
+    case 'title':
189
+      $this->sorts[$item->name] = $item->admin_title;
190
+      break;
191
+    case 'name':
192
+      $this->sorts[$item->name] = $item->name;
193
+      break;
194
+    case 'category':
195
+      $this->sorts[$item->name] = ($item->category ? $item->category : t('Miscellaneous')) . $item->admin_title;
196
+      break;
197
+    case 'plugin':
198
+      $this->sorts[$item->name] = $item->plugin;
199
+      break;
200
+    case 'storage':
201
+      $this->sorts[$item->name] = $item->type . $item->admin_title;
202
+      break;
203 203
     }
204 204
 
205 205
     $type = !empty($this->builders[$item->plugin]) ? $this->builders[$item->plugin]['title'] : t('Broken/missing plugin');
Please login to merge, or discard this patch.
contrib/panels/plugins/display_renderers/panels_renderer_standard.class.php 1 patch
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -434,28 +434,28 @@
 block discarded – undo
434 434
   function add_css($filename, $type = 'module', $media = 'all', $preprocess = TRUE) {
435 435
     $path = file_create_path($filename);
436 436
     switch ($this->meta_location) {
437
-      case 'standard':
438
-        if (file_check_location($filename, file_directory_path())) {
439
-          // If the file is located in the files directory, use
440
-          // ctools_css_add_css() because it can handle temporary CSS in the
441
-          // private filesystem.
442
-          ctools_include('css');
443
-          ctools_css_add_css($filename, $type, $media, $preprocess);
444
-        }
445
-        else {
446
-          drupal_add_css($filename, $type, $media, $preprocess);
447
-        }
448
-        break;
449
-      case 'inline':
450
-        if ($path) {
451
-          $url = file_create_url($filename);
452
-        }
453
-        else {
454
-          $url = base_path() . $filename;
455
-        }
437
+    case 'standard':
438
+      if (file_check_location($filename, file_directory_path())) {
439
+        // If the file is located in the files directory, use
440
+        // ctools_css_add_css() because it can handle temporary CSS in the
441
+        // private filesystem.
442
+        ctools_include('css');
443
+        ctools_css_add_css($filename, $type, $media, $preprocess);
444
+      }
445
+      else {
446
+        drupal_add_css($filename, $type, $media, $preprocess);
447
+      }
448
+      break;
449
+    case 'inline':
450
+      if ($path) {
451
+        $url = file_create_url($filename);
452
+      }
453
+      else {
454
+        $url = base_path() . $filename;
455
+      }
456 456
 
457
-        $this->prefix .= '<link type="text/css" rel="stylesheet" media="' . $media . '" href="' . $url . '" />'."\n";
458
-        break;
457
+      $this->prefix .= '<link type="text/css" rel="stylesheet" media="' . $media . '" href="' . $url . '" />'."\n";
458
+      break;
459 459
     }
460 460
   }
461 461
 
Please login to merge, or discard this patch.
contrib/panels/plugins/display_renderers/panels_renderer_editor.class.php 1 patch
Switch Indentation   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -481,24 +481,24 @@  discard block
 block discarded – undo
481 481
    */
482 482
   function get_panels_storage_op_for_ajax($method) {
483 483
     switch ($method) {
484
-      case 'ajax_show':
485
-      case 'ajax_hide':
486
-      case 'ajax_select_content':
487
-      case 'ajax_add_pane':
488
-      case 'ajax_edit_pane':
489
-      case 'ajax_panel_title':
490
-      case 'ajax_cache_method':
491
-      case 'ajax_cache_settings':
492
-      case 'ajax_style_type':
493
-      case 'ajax_style_settings':
494
-      case 'ajax_pane_css':
495
-      case 'ajax_lock':
496
-      case 'ajax_access_settings':
497
-      case 'ajax_access_add_test':
498
-      case 'ajax_access_configure_test':
499
-      case 'ajax_layout':
500
-      case 'ajax_style':
501
-        return 'update';
484
+    case 'ajax_show':
485
+    case 'ajax_hide':
486
+    case 'ajax_select_content':
487
+    case 'ajax_add_pane':
488
+    case 'ajax_edit_pane':
489
+    case 'ajax_panel_title':
490
+    case 'ajax_cache_method':
491
+    case 'ajax_cache_settings':
492
+    case 'ajax_style_type':
493
+    case 'ajax_style_settings':
494
+    case 'ajax_pane_css':
495
+    case 'ajax_lock':
496
+    case 'ajax_access_settings':
497
+    case 'ajax_access_add_test':
498
+    case 'ajax_access_configure_test':
499
+    case 'ajax_layout':
500
+    case 'ajax_style':
501
+      return 'update';
502 502
     }
503 503
 
504 504
     return parent::get_panels_storage_op($method);
@@ -1001,26 +1001,26 @@  discard block
 block discarded – undo
1001 1001
     // This lets us choose whether we're doing the display's cache or
1002 1002
     // a pane's.
1003 1003
     switch ($type) {
1004
-      case 'display':
1005
-        $style = isset($this->display->panel_settings['style']) ? $this->display->panel_settings['style'] : 'default';
1006
-        $title = t('Default style for this display');
1007
-        break;
1008
-
1009
-      case 'region':
1010
-        $style = isset($this->display->panel_settings[$pid]['style']) ? $this->display->panel_settings[$pid]['style'] : '-1'; // -1 signifies to use the default setting.
1011
-        $title = t('Panel style for region "!region"', array('!region' => $this->plugins['layout']['panels'][$pid]));
1012
-        break;
1013
-
1014
-      case 'pane':
1015
-        ctools_include('content');
1016
-        $pane = &$this->display->content[$pid];
1017
-        $style = isset($pane->style['style']) ? $pane->style['style'] : 'default';
1018
-        $subtype = ctools_content_get_subtype($pane->type, $pane->subtype);
1019
-        $title = t('Pane style for "!pane"', array('!pane' => $subtype['title']));
1020
-        break;
1004
+    case 'display':
1005
+      $style = isset($this->display->panel_settings['style']) ? $this->display->panel_settings['style'] : 'default';
1006
+      $title = t('Default style for this display');
1007
+      break;
1008
+
1009
+    case 'region':
1010
+      $style = isset($this->display->panel_settings[$pid]['style']) ? $this->display->panel_settings[$pid]['style'] : '-1'; // -1 signifies to use the default setting.
1011
+      $title = t('Panel style for region "!region"', array('!region' => $this->plugins['layout']['panels'][$pid]));
1012
+      break;
1013
+
1014
+    case 'pane':
1015
+      ctools_include('content');
1016
+      $pane = &$this->display->content[$pid];
1017
+      $style = isset($pane->style['style']) ? $pane->style['style'] : 'default';
1018
+      $subtype = ctools_content_get_subtype($pane->type, $pane->subtype);
1019
+      $title = t('Pane style for "!pane"', array('!pane' => $subtype['title']));
1020
+      break;
1021 1021
 
1022
-      default:
1023
-        ctools_modal_render(t('Error'), t('Invalid pane id.'));
1022
+    default:
1023
+      ctools_modal_render(t('Error'), t('Invalid pane id.'));
1024 1024
     }
1025 1025
     $info = $this->get_style($type, $pid);
1026 1026
     $style_plugin = $info[0];
@@ -1057,27 +1057,27 @@  discard block
 block discarded – undo
1057 1057
 
1058 1058
       // If there's no settings form, just change the style and exit.
1059 1059
       switch($type) {
1060
-        case 'display':
1061
-          $this->display->panel_settings['style'] = $form_state['style'];
1062
-          if (isset($this->display->panel_settings['style_settings']['default'])) {
1063
-            unset($this->display->panel_settings['style_settings']['default']);
1064
-          }
1065
-          break;
1066
-
1067
-        case 'region':
1068
-          $this->display->panel_settings[$pid]['style'] = $form_state['style'];
1069
-          if (isset($this->display->panel_settings['style_settings'][$pid])) {
1070
-            unset($this->display->panel_settings['style_settings'][$pid]);
1071
-          }
1072
-          break;
1073
-
1074
-        case 'pane':
1075
-          $pane->style['style'] = $form_state['style'];
1076
-          if (isset($pane->style['settings'])) {
1077
-            unset($pane->style['settings']);
1078
-          }
1079
-
1080
-          break;
1060
+      case 'display':
1061
+        $this->display->panel_settings['style'] = $form_state['style'];
1062
+        if (isset($this->display->panel_settings['style_settings']['default'])) {
1063
+          unset($this->display->panel_settings['style_settings']['default']);
1064
+        }
1065
+        break;
1066
+
1067
+      case 'region':
1068
+        $this->display->panel_settings[$pid]['style'] = $form_state['style'];
1069
+        if (isset($this->display->panel_settings['style_settings'][$pid])) {
1070
+          unset($this->display->panel_settings['style_settings'][$pid]);
1071
+        }
1072
+        break;
1073
+
1074
+      case 'pane':
1075
+        $pane->style['style'] = $form_state['style'];
1076
+        if (isset($pane->style['settings'])) {
1077
+          unset($pane->style['settings']);
1078
+        }
1079
+
1080
+        break;
1081 1081
       }
1082 1082
       panels_edit_cache_set($this->cache);
1083 1083
 
@@ -1117,56 +1117,56 @@  discard block
 block discarded – undo
1117 1117
       $defaults = isset($style['defaults']) ? $style['defaults'] : array();
1118 1118
       // Get the &$conf variable based upon whose style we're editing.
1119 1119
       switch ($type) {
1120
-        case 'display':
1121
-          $this->display->panel_settings['style'] = $this->cache->style;
1122
-          $this->display->panel_settings['style_settings']['default'] = $defaults;
1123
-          break;
1124
-
1125
-        case 'region':
1126
-          $this->display->panel_settings[$pid]['style'] = $this->cache->style;
1127
-          $this->display->panel_settings['style_settings'][$pid] = $defaults;
1128
-          break;
1129
-
1130
-        case 'pane':
1131
-          $pane = &$this->display->content[$pid];
1132
-          $pane->style['style'] = $this->cache->style;
1133
-          $pane->style['settings'] = $defaults;
1134
-          $conf = &$pane->style['settings'];
1135
-          break;
1120
+      case 'display':
1121
+        $this->display->panel_settings['style'] = $this->cache->style;
1122
+        $this->display->panel_settings['style_settings']['default'] = $defaults;
1123
+        break;
1124
+
1125
+      case 'region':
1126
+        $this->display->panel_settings[$pid]['style'] = $this->cache->style;
1127
+        $this->display->panel_settings['style_settings'][$pid] = $defaults;
1128
+        break;
1129
+
1130
+      case 'pane':
1131
+        $pane = &$this->display->content[$pid];
1132
+        $pane->style['style'] = $this->cache->style;
1133
+        $pane->style['settings'] = $defaults;
1134
+        $conf = &$pane->style['settings'];
1135
+        break;
1136 1136
       }
1137 1137
     }
1138 1138
     else {
1139 1139
       switch ($type) {
1140
-        case 'display':
1141
-          $style = panels_get_style((!empty($this->display->panel_settings['style'])) ? $this->display->panel_settings['style'] : 'default');
1142
-          break;
1143
-
1144
-        case 'region':
1145
-          $style = panels_get_style((!empty($this->display->panel_settings[$pid]['style'])) ? $this->display->panel_settings[$pid]['style'] : '-1');
1146
-          break;
1147
-
1148
-        case 'pane':
1149
-          $pane = &$this->display->content[$pid];
1150
-          $style = panels_get_style(!empty($pane->style['style']) ? $pane->style['style'] : 'default');
1151
-          break;
1152
-      }
1153
-    }
1154
-
1155
-    // Set up our $conf reference.
1156
-    switch ($type) {
1157 1140
       case 'display':
1158
-        $conf = &$this->display->panel_settings['style_settings']['default'];
1141
+        $style = panels_get_style((!empty($this->display->panel_settings['style'])) ? $this->display->panel_settings['style'] : 'default');
1159 1142
         break;
1160 1143
 
1161 1144
       case 'region':
1162
-        $conf = &$this->display->panel_settings['style_settings'][$pid];
1145
+        $style = panels_get_style((!empty($this->display->panel_settings[$pid]['style'])) ? $this->display->panel_settings[$pid]['style'] : '-1');
1163 1146
         break;
1164 1147
 
1165 1148
       case 'pane':
1166
-        ctools_include('content');
1167 1149
         $pane = &$this->display->content[$pid];
1168
-        $conf = &$pane->style['settings'];
1150
+        $style = panels_get_style(!empty($pane->style['style']) ? $pane->style['style'] : 'default');
1169 1151
         break;
1152
+      }
1153
+    }
1154
+
1155
+    // Set up our $conf reference.
1156
+    switch ($type) {
1157
+    case 'display':
1158
+      $conf = &$this->display->panel_settings['style_settings']['default'];
1159
+      break;
1160
+
1161
+    case 'region':
1162
+      $conf = &$this->display->panel_settings['style_settings'][$pid];
1163
+      break;
1164
+
1165
+    case 'pane':
1166
+      ctools_include('content');
1167
+      $pane = &$this->display->content[$pid];
1168
+      $conf = &$pane->style['settings'];
1169
+      break;
1170 1170
     }
1171 1171
 
1172 1172
     // Backward compatibility: Translate old-style stylizer to new style
@@ -1192,20 +1192,20 @@  discard block
 block discarded – undo
1192 1192
     $conf = &$info[1];
1193 1193
 
1194 1194
     switch ($type) {
1195
-      case 'display':
1196
-        $title = t('Style settings for @style (display)', array('@style' => $style['title']));
1197
-        break;
1195
+    case 'display':
1196
+      $title = t('Style settings for @style (display)', array('@style' => $style['title']));
1197
+      break;
1198 1198
 
1199
-      case 'region':
1200
-        $title = t('Style settings for style @style (Region "!region")', array('@style' => $style['title'], '!region' => $this->plugins['layout']['panels'][$pid]));
1201
-        break;
1199
+    case 'region':
1200
+      $title = t('Style settings for style @style (Region "!region")', array('@style' => $style['title'], '!region' => $this->plugins['layout']['panels'][$pid]));
1201
+      break;
1202 1202
 
1203
-      case 'pane':
1204
-        ctools_include('content');
1205
-        $pane = &$this->display->content[$pid];
1206
-        $subtype = ctools_content_get_subtype($pane->type, $pane->subtype);
1207
-        $title = t('Style settings for style @style (Pane "!pane")', array('@style' => $style['title'], '!pane' => $subtype['title']));
1208
-        break;
1203
+    case 'pane':
1204
+      ctools_include('content');
1205
+      $pane = &$this->display->content[$pid];
1206
+      $subtype = ctools_content_get_subtype($pane->type, $pane->subtype);
1207
+      $title = t('Style settings for style @style (Pane "!pane")', array('@style' => $style['title'], '!pane' => $subtype['title']));
1208
+      break;
1209 1209
     }
1210 1210
 
1211 1211
     $form_state = array(
Please login to merge, or discard this patch.