Completed
Pull Request — master (#2171)
by Christian
10:51
created
default/boinc/modules/contrib/panels/plugins/layouts/flexible/flexible.inc 1 patch
Switch Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -451,18 +451,18 @@  discard block
 block discarded – undo
451 451
     }
452 452
 
453 453
     switch ($item['type']) {
454
-      case 'column':
455
-        $content = panels_flexible_render_items($renderer, $item['children'], $renderer->base['column'] . '-' . $id);
456
-        $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
457
-        break;
458
-      case 'row':
459
-        $content = panels_flexible_render_items($renderer, $item['children'], $renderer->base['row'] . '-' . $id);
460
-        $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max, TRUE);
461
-        break;
462
-      case 'region':
463
-        $content = isset($renderer->content[$id]) ? $renderer->content[$id] : " ";
464
-        $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
465
-        break;
454
+    case 'column':
455
+      $content = panels_flexible_render_items($renderer, $item['children'], $renderer->base['column'] . '-' . $id);
456
+      $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
457
+      break;
458
+    case 'row':
459
+      $content = panels_flexible_render_items($renderer, $item['children'], $renderer->base['row'] . '-' . $id);
460
+      $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max, TRUE);
461
+      break;
462
+    case 'region':
463
+      $content = isset($renderer->content[$id]) ? $renderer->content[$id] : " ";
464
+      $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
465
+      break;
466 466
     }
467 467
 
468 468
     // If all items are fixed then we have a special splitter on the right to
@@ -949,20 +949,20 @@  discard block
 block discarded – undo
949 949
 
950 950
 
951 951
   switch ($item['type']) {
952
-    case 'column':
953
-      $title = t('Configure column');
954
-      break;
955
-    case 'row':
956
-      if ($id == 'canvas') {
957
-        $title = t('Configure canvas');
958
-      }
959
-      else {
960
-        $title = t('Configure row');
961
-      }
962
-      break;
963
-    case 'region':
964
-      $title = t('Configure region');
965
-      break;
952
+  case 'column':
953
+    $title = t('Configure column');
954
+    break;
955
+  case 'row':
956
+    if ($id == 'canvas') {
957
+      $title = t('Configure canvas');
958
+    }
959
+    else {
960
+      $title = t('Configure row');
961
+    }
962
+    break;
963
+  case 'region':
964
+    $title = t('Configure region');
965
+    break;
966 966
   }
967 967
 
968 968
   $form_state = array(
@@ -1224,44 +1224,44 @@  discard block
 block discarded – undo
1224 1224
   $parent = &$settings['items'][$id];
1225 1225
 
1226 1226
   switch ($parent['type']) {
1227
+  case 'column':
1228
+    $title = t('Add row');
1229
+    // Create the new item with defaults.
1230
+    $item = array(
1231
+      'type' => 'row',
1232
+      'contains' => 'region',
1233
+      'children' => array(),
1234
+      'parent' => $id,
1235
+    );
1236
+    break;
1237
+  case 'row':
1238
+    switch ($parent['contains']) {
1239
+    case 'region':
1240
+    $title = $location == 'left' ? t('Add region to left') : t('Add region to right');
1241
+    $item = array(
1242
+    'type' => 'region',
1243
+    'title' => '',
1244
+    'width' => 100,
1245
+    'width_type' => '%',
1246
+    'parent' => $id,
1247
+    );
1248
+    break;
1227 1249
     case 'column':
1228
-      $title = t('Add row');
1229
-      // Create the new item with defaults.
1230
-      $item = array(
1231
-        'type' => 'row',
1232
-        'contains' => 'region',
1233
-        'children' => array(),
1234
-        'parent' => $id,
1235
-      );
1236
-      break;
1237
-    case 'row':
1238
-      switch ($parent['contains']) {
1239
-        case 'region':
1240
-          $title = $location == 'left' ? t('Add region to left') : t('Add region to right');
1241
-          $item = array(
1242
-            'type' => 'region',
1243
-            'title' => '',
1244
-            'width' => 100,
1245
-            'width_type' => '%',
1246
-            'parent' => $id,
1247
-          );
1248
-          break;
1249
-        case 'column':
1250
-          $title = $location == 'left' ? t('Add column to left') : t('Add column to right');
1251
-          $item = array(
1252
-            'type' => 'column',
1253
-            'width' => 100,
1254
-            'width_type' => '%',
1255
-            'parent' => $id,
1256
-            'children' => array(),
1257
-          );
1258
-          break;
1259
-      }
1250
+    $title = $location == 'left' ? t('Add column to left') : t('Add column to right');
1251
+    $item = array(
1252
+    'type' => 'column',
1253
+    'width' => 100,
1254
+    'width_type' => '%',
1255
+    'parent' => $id,
1256
+    'children' => array(),
1257
+    );
1258
+    break;
1259
+    }
1260 1260
       // Create the new item with defaults.
1261 1261
       break;
1262
-    case 'region':
1263
-      // Cannot add items to regions.
1264
-      break;
1262
+  case 'region':
1263
+    // Cannot add items to regions.
1264
+    break;
1265 1265
   }
1266 1266
 
1267 1267
   $form_state = array(
@@ -1323,41 +1323,41 @@  discard block
 block discarded – undo
1323 1323
     // The blocks of code in this else look very similar but are not actually
1324 1324
     // duplicated because the order changes based on left or right.
1325 1325
     switch ($position) {
1326
-      case 'left':
1327
-        if ($location == 'left') {
1326
+    case 'left':
1327
+      if ($location == 'left') {
1328
+        $item_output .= panels_flexible_render_splitter($renderer, $form_state['key'], $form_state['sibling']);
1329
+        $output[] = ctools_ajax_command_prepend('#panels-dnd-main .' . $parent_class . '-left', $item_output);
1330
+      }
1331
+      else if ($location == 'right') {
1332
+        // If we are adding to the right side of the left box, there is
1333
+        // a splitter that we have to remove; then we add our box normally,
1334
+        // and then add a new splitter for just our guy.
1335
+        $output[] = ctools_ajax_command_remove('panels-flexible-splitter-for-' . $renderer->base[$item['type']] . '-' . $form_state['key']);
1336
+        $item_output = panels_flexible_render_splitter($renderer, $form_state['sibling'], $form_state['key']) .  $item_output;
1337
+        $item_output .= panels_flexible_render_splitter($renderer, $form_state['key'], NULL);
1338
+        $output[] = ctools_ajax_command_append('#panels-dnd-main .' . $parent_class . '-left', $item_output);
1339
+      }
1340
+      break;
1341
+    case 'right':
1342
+      if (!empty($form_state['sibling'])) {
1343
+        $item_output = panels_flexible_render_splitter($renderer, $form_state['sibling'], $form_state['key']) .  $item_output;
1344
+      }
1345
+      $output[] = ctools_ajax_command_append('#panels-dnd-main .' . $parent_class . '-right', $item_output);
1346
+      break;
1347
+    case 'middle':
1348
+      if ($location == 'left') {
1349
+        if (!empty($form_state['sibling'])) {
1328 1350
           $item_output .= panels_flexible_render_splitter($renderer, $form_state['key'], $form_state['sibling']);
1329
-          $output[] = ctools_ajax_command_prepend('#panels-dnd-main .' . $parent_class . '-left', $item_output);
1330
-        }
1331
-        else if ($location == 'right') {
1332
-          // If we are adding to the right side of the left box, there is
1333
-          // a splitter that we have to remove; then we add our box normally,
1334
-          // and then add a new splitter for just our guy.
1335
-          $output[] = ctools_ajax_command_remove('panels-flexible-splitter-for-' . $renderer->base[$item['type']] . '-' . $form_state['key']);
1336
-          $item_output = panels_flexible_render_splitter($renderer, $form_state['sibling'], $form_state['key']) .  $item_output;
1337
-          $item_output .= panels_flexible_render_splitter($renderer, $form_state['key'], NULL);
1338
-          $output[] = ctools_ajax_command_append('#panels-dnd-main .' . $parent_class . '-left', $item_output);
1339 1351
         }
1340
-        break;
1341
-      case 'right':
1352
+        $output[] = ctools_ajax_command_prepend('#panels-dnd-main .' . $parent_class . '-middle', $item_output);
1353
+      }
1354
+      else {
1342 1355
         if (!empty($form_state['sibling'])) {
1343 1356
           $item_output = panels_flexible_render_splitter($renderer, $form_state['sibling'], $form_state['key']) .  $item_output;
1344 1357
         }
1345
-        $output[] = ctools_ajax_command_append('#panels-dnd-main .' . $parent_class . '-right', $item_output);
1346
-        break;
1347
-      case 'middle':
1348
-        if ($location == 'left') {
1349
-          if (!empty($form_state['sibling'])) {
1350
-            $item_output .= panels_flexible_render_splitter($renderer, $form_state['key'], $form_state['sibling']);
1351
-          }
1352
-          $output[] = ctools_ajax_command_prepend('#panels-dnd-main .' . $parent_class . '-middle', $item_output);
1353
-        }
1354
-        else {
1355
-          if (!empty($form_state['sibling'])) {
1356
-            $item_output = panels_flexible_render_splitter($renderer, $form_state['sibling'], $form_state['key']) .  $item_output;
1357
-          }
1358
-          $output[] = ctools_ajax_command_append('#panels-dnd-main .' . $parent_class . '-middle', $item_output);
1359
-        }
1360
-        break;
1358
+        $output[] = ctools_ajax_command_append('#panels-dnd-main .' . $parent_class . '-middle', $item_output);
1359
+      }
1360
+      break;
1361 1361
 
1362 1362
     }
1363 1363
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/panels/includes/plugins.inc 1 patch
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -187,16 +187,16 @@
 block discarded – undo
187 187
         foreach ($types as $id => $info) {
188 188
           if (!isset($start[$scope][$type][$id])) {
189 189
             switch ($type) {
190
-              case 'setting':
191
-                $this->js[] = array($info, $type, $scope);
192
-                break;
190
+            case 'setting':
191
+              $this->js[] = array($info, $type, $scope);
192
+              break;
193 193
 
194
-              case 'inline':
195
-                $this->js[] = array($info['code'], $type, $scope, $info['defer']);
196
-                break;
194
+            case 'inline':
195
+              $this->js[] = array($info['code'], $type, $scope, $info['defer']);
196
+              break;
197 197
 
198
-              default:
199
-                $this->js[] = array($id, $type, $scope, $info['defer'], $info['cache']);
198
+            default:
199
+              $this->js[] = array($id, $type, $scope, $info['defer'], $info['cache']);
200 200
             }
201 201
           }
202 202
         }
Please login to merge, or discard this patch.
contrib/panels/panels_mini/plugins/export_ui/panels_mini_ui.class.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -64,24 +64,24 @@
 block discarded – undo
64 64
   function list_build_row($item, &$form_state, $operations) {
65 65
     // Set up sorting
66 66
     switch ($form_state['values']['order']) {
67
-      case 'disabled':
68
-        $this->sorts[$item->name] = empty($item->disabled) . $item->admin_title;
69
-        break;
70
-      case 'title':
71
-        $this->sorts[$item->name] = $item->admin_title;
72
-        break;
73
-      case 'name':
74
-        $this->sorts[$item->name] = $item->name;
75
-        break;
76
-      case 'category':
77
-        $this->sorts[$item->name] = ($item->category ? $item->category : t('Mini panels')) . $item->admin_title;
78
-        break;
79
-      case 'layout':
80
-        $this->sorts[$item->name] = $item->display->layout . $item->admin_title;
81
-        break;
82
-      case 'storage':
83
-        $this->sorts[$item->name] = $item->type . $item->admin_title;
84
-        break;
67
+    case 'disabled':
68
+      $this->sorts[$item->name] = empty($item->disabled) . $item->admin_title;
69
+      break;
70
+    case 'title':
71
+      $this->sorts[$item->name] = $item->admin_title;
72
+      break;
73
+    case 'name':
74
+      $this->sorts[$item->name] = $item->name;
75
+      break;
76
+    case 'category':
77
+      $this->sorts[$item->name] = ($item->category ? $item->category : t('Mini panels')) . $item->admin_title;
78
+      break;
79
+    case 'layout':
80
+      $this->sorts[$item->name] = $item->display->layout . $item->admin_title;
81
+      break;
82
+    case 'storage':
83
+      $this->sorts[$item->name] = $item->type . $item->admin_title;
84
+      break;
85 85
     }
86 86
 
87 87
     $layout = !empty($this->layouts[$item->display->layout]) ? $this->layouts[$item->display->layout]['title'] : t('Missing layout');
Please login to merge, or discard this patch.
default/boinc/modules/contrib/views/handlers/views_handler_sort_random.inc 1 patch
Switch Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
   function query() {
8 8
     global $db_type;
9 9
     switch ($db_type) {
10
-      case 'mysql':
11
-      case 'mysqli':
12
-        $formula = 'RAND()';
13
-        break;
14
-      case 'pgsql':
15
-        $formula = 'RANDOM()';
16
-        break;
10
+    case 'mysql':
11
+    case 'mysqli':
12
+      $formula = 'RAND()';
13
+      break;
14
+    case 'pgsql':
15
+      $formula = 'RANDOM()';
16
+      break;
17 17
     }
18 18
     if (!empty($formula)) {
19 19
       $this->query->add_orderby(NULL, $formula, $this->options['order'], '_' . $this->field);
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/views/handlers/views_handler_field.inc 1 patch
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -830,11 +830,11 @@
 block discarded – undo
830 830
   function render($values) {
831 831
     if ($values->{$this->field_alias}) {
832 832
       switch ($this->options['file_size_display']) {
833
-        case 'bytes':
834
-          return $values->{$this->field_alias};
835
-        case 'formatted':
836
-        default:
837
-          return format_size($values->{$this->field_alias});
833
+      case 'bytes':
834
+        return $values->{$this->field_alias};
835
+      case 'formatted':
836
+      default:
837
+        return format_size($values->{$this->field_alias});
838 838
       }
839 839
     }
840 840
     else {
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/views/handlers/views_handler_sort.inc 1 patch
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@
 block discarded – undo
31 31
    */
32 32
   function admin_summary() {
33 33
     switch ($this->options['order']) {
34
-      case 'ASC':
35
-      case 'asc':
36
-      default:
37
-        $type = t('asc');
38
-        break;
39
-      case 'DESC';
40
-      case 'desc';
41
-        $type = t('desc');
42
-        break;
34
+    case 'ASC':
35
+    case 'asc':
36
+    default:
37
+      $type = t('asc');
38
+      break;
39
+    case 'DESC';
40
+    case 'desc';
41
+      $type = t('desc');
42
+      break;
43 43
     }
44 44
     return '<span class="views-ascending"><span>' . $type . '</span></span>';
45 45
   }
Please login to merge, or discard this patch.
default/boinc/modules/contrib/views/handlers/views_handler_sort_date.inc 1 patch
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -42,25 +42,25 @@
 block discarded – undo
42 42
   function query() {
43 43
     $this->ensure_my_table();
44 44
     switch ($this->options['granularity']) {
45
-      case 'second':
46
-      default:
47
-        $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);
48
-        return;
49
-      case 'minute':
50
-        $formula = views_date_sql_format('YmdHi', "$this->table_alias.$this->real_field");
51
-        break;
52
-      case 'hour':
53
-        $formula = views_date_sql_format('YmdH', "$this->table_alias.$this->real_field");
54
-        break;
55
-      case 'day':
56
-        $formula = views_date_sql_format('Ymd', "$this->table_alias.$this->real_field");
57
-        break;
58
-      case 'month':
59
-        $formula = views_date_sql_format('Ym', "$this->table_alias.$this->real_field");
60
-        break;
61
-      case 'year':
62
-        $formula = views_date_sql_format('Y', "$this->table_alias.$this->real_field");
63
-        break;
45
+    case 'second':
46
+    default:
47
+      $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);
48
+      return;
49
+    case 'minute':
50
+      $formula = views_date_sql_format('YmdHi', "$this->table_alias.$this->real_field");
51
+      break;
52
+    case 'hour':
53
+      $formula = views_date_sql_format('YmdH', "$this->table_alias.$this->real_field");
54
+      break;
55
+    case 'day':
56
+      $formula = views_date_sql_format('Ymd', "$this->table_alias.$this->real_field");
57
+      break;
58
+    case 'month':
59
+      $formula = views_date_sql_format('Ym', "$this->table_alias.$this->real_field");
60
+      break;
61
+    case 'year':
62
+      $formula = views_date_sql_format('Y', "$this->table_alias.$this->real_field");
63
+      break;
64 64
     }
65 65
 
66 66
     // Add the field.
Please login to merge, or discard this patch.
boinc/modules/contrib/views/handlers/views_handler_argument_string.inc 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -206,20 +206,20 @@
 block discarded – undo
206 206
 		global $multibyte;
207 207
 		
208 208
     switch ($this->options[$option]) {
209
-      default:
210
-        return $string;
211
-      case 'upper':
212
-        return drupal_strtoupper($string);
213
-      case 'lower':
214
-        return drupal_strtolower($string);
215
-      case 'ucfirst':
216
-        return drupal_strtoupper(drupal_substr($string, 0, 1)) . drupal_substr($string, 1);
217
-      case 'ucwords':
218
-        if ($multibyte == UNICODE_MULTIBYTE) {
219
-          return mb_convert_case($string, MB_CASE_TITLE);
220
-        } else {
221
-          return ucwords($string);
222
-        }
209
+    default:
210
+      return $string;
211
+    case 'upper':
212
+      return drupal_strtoupper($string);
213
+    case 'lower':
214
+      return drupal_strtolower($string);
215
+    case 'ucfirst':
216
+      return drupal_strtoupper(drupal_substr($string, 0, 1)) . drupal_substr($string, 1);
217
+    case 'ucwords':
218
+      if ($multibyte == UNICODE_MULTIBYTE) {
219
+        return mb_convert_case($string, MB_CASE_TITLE);
220
+      } else {
221
+        return ucwords($string);
222
+      }
223 223
     }
224 224
   }
225 225
 
Please login to merge, or discard this patch.
default/boinc/modules/contrib/views/handlers/views_handler_field_date.inc 1 patch
Switch Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -53,21 +53,21 @@
 block discarded – undo
53 53
     if ($value) {
54 54
       $time_diff = time() - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence)
55 55
       switch ($format) {
56
-        case 'raw time ago':
57
-          return format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
58
-        case 'time ago':
59
-          return t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
60
-        case 'raw time span':
61
-          return ($time_diff < 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
62
-        case 'time span':
63
-          return t(($time_diff < 0 ? '%time hence' : '%time ago'), array('%time' => format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2)));
64
-        case 'custom':
65
-          if ($custom_format == 'r') {
66
-            return format_date($value, $format, $custom_format, null, 'en');
67
-          }
68
-          return format_date($value, $format, $custom_format);
69
-        default:
70
-          return format_date($value, $format);
56
+      case 'raw time ago':
57
+        return format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
58
+      case 'time ago':
59
+        return t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
60
+      case 'raw time span':
61
+        return ($time_diff < 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
62
+      case 'time span':
63
+        return t(($time_diff < 0 ? '%time hence' : '%time ago'), array('%time' => format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2)));
64
+      case 'custom':
65
+        if ($custom_format == 'r') {
66
+          return format_date($value, $format, $custom_format, null, 'en');
67
+        }
68
+        return format_date($value, $format, $custom_format);
69
+      default:
70
+        return format_date($value, $format);
71 71
       }
72 72
     }
73 73
   }
Please login to merge, or discard this patch.