Completed
Pull Request — master (#1795)
by Christian
16:22 queued 04:43
created
boinc/modules/contrib/htmlpurifier/library/HTMLPurifier/HTMLModule/Tidy.php 1 patch
Switch Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -132,41 +132,41 @@
 block discarded – undo
132 132
             // determine what the fix is for
133 133
             list($type, $params) = $this->getFixType($name);
134 134
             switch ($type) {
135
-                case 'attr_transform_pre':
136
-                case 'attr_transform_post':
137
-                    $attr = $params['attr'];
138
-                    if (isset($params['element'])) {
139
-                        $element = $params['element'];
140
-                        if (empty($this->info[$element])) {
141
-                            $e = $this->addBlankElement($element);
142
-                        } else {
143
-                            $e = $this->info[$element];
144
-                        }
145
-                    } else {
146
-                        $type = "info_$type";
147
-                        $e = $this;
148
-                    }
149
-                    // PHP does some weird parsing when I do
150
-                    // $e->$type[$attr], so I have to assign a ref.
151
-                    $f =& $e->$type;
152
-                    $f[$attr] = $fix;
153
-                    break;
154
-                case 'tag_transform':
155
-                    $this->info_tag_transform[$params['element']] = $fix;
156
-                    break;
157
-                case 'child':
158
-                case 'content_model_type':
135
+            case 'attr_transform_pre':
136
+            case 'attr_transform_post':
137
+                $attr = $params['attr'];
138
+                if (isset($params['element'])) {
159 139
                     $element = $params['element'];
160 140
                     if (empty($this->info[$element])) {
161 141
                         $e = $this->addBlankElement($element);
162 142
                     } else {
163 143
                         $e = $this->info[$element];
164 144
                     }
165
-                    $e->$type = $fix;
166
-                    break;
167
-                default:
168
-                    trigger_error("Fix type $type not supported", E_USER_ERROR);
169
-                    break;
145
+                } else {
146
+                    $type = "info_$type";
147
+                    $e = $this;
148
+                }
149
+                // PHP does some weird parsing when I do
150
+                // $e->$type[$attr], so I have to assign a ref.
151
+                $f =& $e->$type;
152
+                $f[$attr] = $fix;
153
+                break;
154
+            case 'tag_transform':
155
+                $this->info_tag_transform[$params['element']] = $fix;
156
+                break;
157
+            case 'child':
158
+            case 'content_model_type':
159
+                $element = $params['element'];
160
+                if (empty($this->info[$element])) {
161
+                    $e = $this->addBlankElement($element);
162
+                } else {
163
+                    $e = $this->info[$element];
164
+                }
165
+                $e->$type = $fix;
166
+                break;
167
+            default:
168
+                trigger_error("Fix type $type not supported", E_USER_ERROR);
169
+                break;
170 170
             }
171 171
         }
172 172
     }
Please login to merge, or discard this patch.
modules/contrib/htmlpurifier/library/HTMLPurifier/Printer/ConfigForm.php 1 patch
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -314,25 +314,25 @@
 block discarded – undo
314 314
         }
315 315
         if (is_array($value)) {
316 316
             switch ($type) {
317
-                case HTMLPurifier_VarParser::LOOKUP:
318
-                    $array = $value;
319
-                    $value = array();
320
-                    foreach ($array as $val => $b) {
321
-                        $value[] = $val;
322
-                    }
323
-                    //TODO does this need a break?
324
-                case HTMLPurifier_VarParser::ALIST:
325
-                    $value = implode(PHP_EOL, $value);
326
-                    break;
327
-                case HTMLPurifier_VarParser::HASH:
328
-                    $nvalue = '';
329
-                    foreach ($value as $i => $v) {
330
-                        $nvalue .= "$i:$v" . PHP_EOL;
331
-                    }
332
-                    $value = $nvalue;
333
-                    break;
334
-                default:
335
-                    $value = '';
317
+            case HTMLPurifier_VarParser::LOOKUP:
318
+                $array = $value;
319
+                $value = array();
320
+                foreach ($array as $val => $b) {
321
+                    $value[] = $val;
322
+                }
323
+                //TODO does this need a break?
324
+            case HTMLPurifier_VarParser::ALIST:
325
+                $value = implode(PHP_EOL, $value);
326
+                break;
327
+            case HTMLPurifier_VarParser::HASH:
328
+                $nvalue = '';
329
+                foreach ($value as $i => $v) {
330
+                    $nvalue .= "$i:$v" . PHP_EOL;
331
+                }
332
+                $value = $nvalue;
333
+                break;
334
+            default:
335
+                $value = '';
336 336
             }
337 337
         }
338 338
         if ($type === HTMLPurifier_VarParser::MIXED) {
Please login to merge, or discard this patch.
boinc/modules/contrib/htmlpurifier/library/HTMLPurifier/VarParser.php 1 patch
Switch Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -74,55 +74,55 @@
 block discarded – undo
74 74
         // These are basic checks, to make sure nothing horribly wrong
75 75
         // happened in our implementations.
76 76
         switch ($type) {
77
-            case (self::STRING):
78
-            case (self::ISTRING):
79
-            case (self::TEXT):
80
-            case (self::ITEXT):
81
-                if (!is_string($var)) {
82
-                    break;
83
-                }
84
-                if ($type == self::ISTRING || $type == self::ITEXT) {
85
-                    $var = strtolower($var);
86
-                }
87
-                return $var;
88
-            case (self::INT):
89
-                if (!is_int($var)) {
90
-                    break;
91
-                }
92
-                return $var;
93
-            case (self::FLOAT):
94
-                if (!is_float($var)) {
95
-                    break;
96
-                }
97
-                return $var;
98
-            case (self::BOOL):
99
-                if (!is_bool($var)) {
100
-                    break;
101
-                }
102
-                return $var;
103
-            case (self::LOOKUP):
104
-            case (self::ALIST):
105
-            case (self::HASH):
106
-                if (!is_array($var)) {
107
-                    break;
108
-                }
109
-                if ($type === self::LOOKUP) {
110
-                    foreach ($var as $k) {
111
-                        if ($k !== true) {
112
-                            $this->error('Lookup table contains value other than true');
113
-                        }
114
-                    }
115
-                } elseif ($type === self::ALIST) {
116
-                    $keys = array_keys($var);
117
-                    if (array_keys($keys) !== $keys) {
118
-                        $this->error('Indices for list are not uniform');
77
+        case (self::STRING):
78
+        case (self::ISTRING):
79
+        case (self::TEXT):
80
+        case (self::ITEXT):
81
+            if (!is_string($var)) {
82
+                break;
83
+            }
84
+            if ($type == self::ISTRING || $type == self::ITEXT) {
85
+                $var = strtolower($var);
86
+            }
87
+            return $var;
88
+        case (self::INT):
89
+            if (!is_int($var)) {
90
+                break;
91
+            }
92
+            return $var;
93
+        case (self::FLOAT):
94
+            if (!is_float($var)) {
95
+                break;
96
+            }
97
+            return $var;
98
+        case (self::BOOL):
99
+            if (!is_bool($var)) {
100
+                break;
101
+            }
102
+            return $var;
103
+        case (self::LOOKUP):
104
+        case (self::ALIST):
105
+        case (self::HASH):
106
+            if (!is_array($var)) {
107
+                break;
108
+            }
109
+            if ($type === self::LOOKUP) {
110
+                foreach ($var as $k) {
111
+                    if ($k !== true) {
112
+                        $this->error('Lookup table contains value other than true');
119 113
                     }
120 114
                 }
121
-                return $var;
122
-            case (self::MIXED):
123
-                return $var;
124
-            default:
125
-                $this->errorInconsistent(get_class($this), $type);
115
+            } elseif ($type === self::ALIST) {
116
+                $keys = array_keys($var);
117
+                if (array_keys($keys) !== $keys) {
118
+                    $this->error('Indices for list are not uniform');
119
+                }
120
+            }
121
+            return $var;
122
+        case (self::MIXED):
123
+            return $var;
124
+        default:
125
+            $this->errorInconsistent(get_class($this), $type);
126 126
         }
127 127
         $this->errorGeneric($var, $type);
128 128
     }
Please login to merge, or discard this patch.
boinc/modules/contrib/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php 1 patch
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -364,32 +364,32 @@
 block discarded – undo
364 364
                 $bits = preg_split('/[.@]/', $elattr, 2);
365 365
                 $c = count($bits);
366 366
                 switch ($c) {
367
-                    case 2:
368
-                        if ($bits[0] !== '*') {
369
-                            $element = htmlspecialchars($bits[0]);
370
-                            $attribute = htmlspecialchars($bits[1]);
371
-                            if (!isset($this->info[$element])) {
372
-                                trigger_error(
373
-                                    "Cannot allow attribute '$attribute' if element " .
374
-                                    "'$element' is not allowed/supported $support"
375
-                                );
376
-                            } else {
377
-                                trigger_error(
378
-                                    "Attribute '$attribute' in element '$element' not supported $support",
379
-                                    E_USER_WARNING
380
-                                );
381
-                            }
382
-                            break;
367
+                case 2:
368
+                    if ($bits[0] !== '*') {
369
+                        $element = htmlspecialchars($bits[0]);
370
+                        $attribute = htmlspecialchars($bits[1]);
371
+                        if (!isset($this->info[$element])) {
372
+                            trigger_error(
373
+                                "Cannot allow attribute '$attribute' if element " .
374
+                                "'$element' is not allowed/supported $support"
375
+                            );
376
+                        } else {
377
+                            trigger_error(
378
+                                "Attribute '$attribute' in element '$element' not supported $support",
379
+                                E_USER_WARNING
380
+                            );
383 381
                         }
384
-                        // otherwise fall through
385
-                    case 1:
386
-                        $attribute = htmlspecialchars($bits[0]);
387
-                        trigger_error(
388
-                            "Global attribute '$attribute' is not ".
389
-                            "supported in any elements $support",
390
-                            E_USER_WARNING
391
-                        );
392 382
                         break;
383
+                    }
384
+                    // otherwise fall through
385
+                case 1:
386
+                    $attribute = htmlspecialchars($bits[0]);
387
+                    trigger_error(
388
+                        "Global attribute '$attribute' is not ".
389
+                        "supported in any elements $support",
390
+                        E_USER_WARNING
391
+                    );
392
+                    break;
393 393
                 }
394 394
             }
395 395
         }
Please login to merge, or discard this patch.
drupal/sites/default/boinc/modules/contrib/htmlpurifier/htmlpurifier.module 1 patch
Switch Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 function htmlpurifier_help($path, $arg) {
24 24
   $output = NULL;
25 25
   switch ($path) {
26
-    case 'admin/modules#htmlpurifier':
27
-      $output = t('Filter that removes malicious HTML and ensures standards compliant output.');
28
-      break;
26
+  case 'admin/modules#htmlpurifier':
27
+    $output = t('Filter that removes malicious HTML and ensures standards compliant output.');
28
+    break;
29 29
   }
30 30
   return $output;
31 31
 }
@@ -66,38 +66,38 @@  discard block
 block discarded – undo
66 66
  */
67 67
 function htmlpurifier_filter($op, $delta = 0, $format = -1, $text = '') {
68 68
   switch ($op) {
69
-    case 'list':
70
-      return array(0 => t('HTML Purifier'), 1 => t('HTML Purifier (advanced)'));
71
-
72
-    case 'no cache':
73
-      // Since HTML Purifier implements its own caching layer, having filter
74
-      // cache it again is wasteful. Returns FALSE if double caching is permitted.
75
-      return !variable_get("htmlpurifier_doublecache", FALSE);
76
-
77
-    case 'description':
78
-      $common = t(
79
-        'Removes malicious HTML code and ensures that the output '.
80
-        'is standards compliant. <strong>Warning:</strong> For performance '.
81
-        'reasons, please ensure that there are no highly dynamic filters before HTML Purifier. '
82
-      );
83
-      switch ($delta) {
84
-        case 0:
85
-          return $common;
86
-        case 1:
87
-          return $common . t('<em>This version has advanced configuration options, do not enable both at the same time.</em>');
88
-      }
69
+  case 'list':
70
+    return array(0 => t('HTML Purifier'), 1 => t('HTML Purifier (advanced)'));
71
+
72
+  case 'no cache':
73
+    // Since HTML Purifier implements its own caching layer, having filter
74
+    // cache it again is wasteful. Returns FALSE if double caching is permitted.
75
+    return !variable_get("htmlpurifier_doublecache", FALSE);
76
+
77
+  case 'description':
78
+    $common = t(
79
+      'Removes malicious HTML code and ensures that the output '.
80
+      'is standards compliant. <strong>Warning:</strong> For performance '.
81
+      'reasons, please ensure that there are no highly dynamic filters before HTML Purifier. '
82
+    );
83
+    switch ($delta) {
84
+    case 0:
85
+    return $common;
86
+    case 1:
87
+    return $common . t('<em>This version has advanced configuration options, do not enable both at the same time.</em>');
88
+    }
89 89
 
90
-    case 'prepare':
91
-      return $text;
90
+  case 'prepare':
91
+    return $text;
92 92
 
93
-    case 'process':
94
-      return _htmlpurifier_process($text, $format);
93
+  case 'process':
94
+    return _htmlpurifier_process($text, $format);
95 95
 
96
-    case 'settings':
97
-      return _htmlpurifier_settings($delta, $format);
96
+  case 'settings':
97
+    return _htmlpurifier_settings($delta, $format);
98 98
 
99
-    default:
100
-      return NULL;
99
+  default:
100
+    return NULL;
101 101
   }
102 102
 }
103 103
 
Please login to merge, or discard this patch.
boinc/templates/views-view-field--boinc-workunit-tasks-all--id.tpl.php 1 patch
Switch Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
- /**
2
+/**
3 3
   * This template is used to print a single field in a view. It is not
4 4
   * actually used in default Views, as this is registered as a theme
5 5
   * function which has better performance. For single overrides, the
Please login to merge, or discard this patch.
default/boinc/modules/contrib/cck/modules/fieldgroup/fieldgroup.module 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
  */
94 94
 function fieldgroup_content_fieldapi($op, $field) {
95 95
   switch ($op) {
96
-    case 'delete instance':
97
-      db_query("DELETE FROM {". fieldgroup_fields_tablename() ."} WHERE field_name = '%s' AND type_name = '%s'", $field['field_name'], $field['type_name']);
98
-      cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
99
-      break;
96
+  case 'delete instance':
97
+  db_query("DELETE FROM {". fieldgroup_fields_tablename() ."} WHERE field_name = '%s' AND type_name = '%s'", $field['field_name'], $field['type_name']);
98
+  cache_clear_all('fieldgroup_data:', content_cache_tablename(), TRUE);
99
+  break;
100 100
   }
101 101
 }
102 102
 
@@ -540,15 +540,15 @@  discard block
 block discarded – undo
540 540
  */
541 541
 function fieldgroup_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
542 542
   switch ($op) {
543
-    case 'view':
544
-      // Prevent against invalid 'nodes' built by broken 3rd party code.
545
-      if (isset($node->type)) {
546
-        // Build the node content element needed to render each fieldgroup.
547
-        foreach (fieldgroup_groups($node->type) as $group) {
548
-          fieldgroup_build_content($group, $node, $teaser, $page);
549
-        }
543
+  case 'view':
544
+    // Prevent against invalid 'nodes' built by broken 3rd party code.
545
+    if (isset($node->type)) {
546
+      // Build the node content element needed to render each fieldgroup.
547
+      foreach (fieldgroup_groups($node->type) as $group) {
548
+        fieldgroup_build_content($group, $node, $teaser, $page);
550 549
       }
551
-      break;
550
+    }
551
+    break;
552 552
   }
553 553
 }
554 554
 
@@ -591,22 +591,22 @@  discard block
 block discarded – undo
591 591
   $format = isset($group['settings']['display'][$context]['format']) ? $group['settings']['display'][$context]['format'] : 'fieldset';
592 592
 
593 593
   switch ($format) {
594
-    case 'simple':
595
-      $element['#type'] = 'fieldgroup_simple';
596
-      $element['#group_name'] = $group_name;
597
-      $element['#node'] = $node;
598
-      break;
599
-    case 'hidden':
600
-      $element['#access'] = FALSE;
601
-      break;
602
-    case 'fieldset_collapsed':
603
-      $element['#collapsed'] = TRUE;
604
-    case 'fieldset_collapsible':
605
-      $element['#collapsible'] = TRUE;
606
-    case 'fieldset':
607
-      $element['#type'] = 'fieldgroup_fieldset';
608
-      $element['#attributes'] = array('class' => 'fieldgroup '. strtr($group['group_name'], '_', '-'));
609
-      break;
594
+  case 'simple':
595
+    $element['#type'] = 'fieldgroup_simple';
596
+    $element['#group_name'] = $group_name;
597
+    $element['#node'] = $node;
598
+    break;
599
+  case 'hidden':
600
+    $element['#access'] = FALSE;
601
+    break;
602
+  case 'fieldset_collapsed':
603
+    $element['#collapsed'] = TRUE;
604
+  case 'fieldset_collapsible':
605
+    $element['#collapsible'] = TRUE;
606
+  case 'fieldset':
607
+    $element['#type'] = 'fieldgroup_fieldset';
608
+    $element['#attributes'] = array('class' => 'fieldgroup '. strtr($group['group_name'], '_', '-'));
609
+    break;
610 610
   }
611 611
   foreach ($group['fields'] as $field_name => $field) {
612 612
     if (isset($node->content[$field_name])) {
Please login to merge, or discard this patch.
sites/default/boinc/modules/contrib/cck/includes/views/content.views.inc 1 patch
Switch Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -24,51 +24,51 @@  discard block
 block discarded – undo
24 24
 
25 25
       // argument handlers
26 26
       'content_handler_argument' => array(
27
-        'parent' => 'views_handler_argument',
27
+       'parent' => 'views_handler_argument',
28 28
       ),
29 29
       'content_handler_argument_string' => array(
30
-        'parent' => 'views_handler_argument_string',
30
+       'parent' => 'views_handler_argument_string',
31 31
       ),
32 32
       'content_handler_argument_numeric' => array(
33
-        'parent' => 'views_handler_argument_numeric',
33
+       'parent' => 'views_handler_argument_numeric',
34 34
       ),
35 35
       'content_handler_argument_reference' => array(
36
-        'parent' => 'content_handler_argument_numeric',
36
+       'parent' => 'content_handler_argument_numeric',
37 37
       ),
38 38
       'content_handler_argument_many_to_one' => array(
39
-        'parent' => 'views_handler_argument_many_to_one',
39
+       'parent' => 'views_handler_argument_many_to_one',
40 40
       ),
41 41
 
42 42
       // field handlers
43 43
       'content_handler_field' => array(
44
-        'parent' => 'views_handler_field_node',
44
+       'parent' => 'views_handler_field_node',
45 45
       ),
46 46
       'content_handler_field_multiple' => array(
47
-        'parent' => 'content_handler_field',
47
+       'parent' => 'content_handler_field',
48 48
       ),
49 49
 
50 50
       // filter handlers
51 51
       'content_handler_filter_string' => array(
52
-        'parent' => 'views_handler_filter_string',
52
+       'parent' => 'views_handler_filter_string',
53 53
       ),
54 54
       'content_handler_filter_numeric' => array(
55
-        'parent' => 'views_handler_filter_numeric',
55
+       'parent' => 'views_handler_filter_numeric',
56 56
       ),
57 57
       'content_handler_filter_float' => array(
58
-        'parent' => 'views_handler_filter_float',
58
+       'parent' => 'views_handler_filter_float',
59 59
       ),
60 60
       'content_handler_filter_many_to_one' => array(
61
-        'parent' => 'views_handler_filter_many_to_one',
61
+       'parent' => 'views_handler_filter_many_to_one',
62 62
       ),
63 63
 
64 64
       // relationship handlers
65 65
       'content_handler_relationship' => array(
66
-        'parent' => 'views_handler_relationship',
66
+       'parent' => 'views_handler_relationship',
67 67
       ),
68 68
 
69 69
       // sort handlers
70 70
       'content_handler_sort' => array(
71
-        'parent' => 'views_handler_sort',
71
+       'parent' => 'views_handler_sort',
72 72
       ),
73 73
     ),
74 74
   );
@@ -85,46 +85,46 @@  discard block
 block discarded – undo
85 85
     'module' => 'content', // This just tells our themes are elsewhere.
86 86
     'display' => array(
87 87
       'content_simple' => array(
88
-        'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
89
-        // Those strings are not translated for now.
90
-        // We'll need to change that if / when we remove 'no ui'
91
-        'title' => 'Simple', // TODO: better name ? (currently not displayed anyway)
92
-        'help' => 'Destination-agnostic display. Mostly useful for programmatic views.',
93
-        'handler' => 'content_plugin_display_simple',
94
-        'no ui' => TRUE, // Programmatic use only.
95
-        'uses hook menu' => FALSE,
96
-        'use ajax' => FALSE,
97
-        'use pager' => FALSE,
98
-        'accept attachments' => FALSE,
88
+       'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
89
+       // Those strings are not translated for now.
90
+       // We'll need to change that if / when we remove 'no ui'
91
+       'title' => 'Simple', // TODO: better name ? (currently not displayed anyway)
92
+       'help' => 'Destination-agnostic display. Mostly useful for programmatic views.',
93
+       'handler' => 'content_plugin_display_simple',
94
+       'no ui' => TRUE, // Programmatic use only.
95
+       'uses hook menu' => FALSE,
96
+       'use ajax' => FALSE,
97
+       'use pager' => FALSE,
98
+       'accept attachments' => FALSE,
99 99
       ),
100 100
       'content_references' => array(
101
-        'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
102
-        // Those strings are not translated for now.
103
-        // We'll need to change that if / when we remove 'no ui'
104
-        'title' => 'Simple - for reference fields', // TODO: better name ? (currently not displayed anyway)
105
-        'help' => 'Destination-agnostic display. Mostly useful for programmatic views.',
106
-        'parent' => 'content_simple',
107
-        'handler' => 'content_plugin_display_references',
108
-        'no ui' => TRUE, // Programmatic use only.
109
-        'uses hook menu' => FALSE,
110
-        'use ajax' => FALSE,
111
-        'use pager' => FALSE,
112
-        'accept attachments' => FALSE,
101
+       'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
102
+       // Those strings are not translated for now.
103
+       // We'll need to change that if / when we remove 'no ui'
104
+       'title' => 'Simple - for reference fields', // TODO: better name ? (currently not displayed anyway)
105
+       'help' => 'Destination-agnostic display. Mostly useful for programmatic views.',
106
+       'parent' => 'content_simple',
107
+       'handler' => 'content_plugin_display_references',
108
+       'no ui' => TRUE, // Programmatic use only.
109
+       'uses hook menu' => FALSE,
110
+       'use ajax' => FALSE,
111
+       'use pager' => FALSE,
112
+       'accept attachments' => FALSE,
113 113
       ),
114 114
     ),
115 115
     'style' => array(
116 116
       'content_php_array_autocomplete' => array(
117
-        'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
118
-        // Those strings are not translated for now.
119
-        // We'll need to change that if / when we remove 'no ui'
120
-        'title' => 'Results array (with title)',
121
-        'help' => 'Returns the view as a PHP array of names + rendered rows.',
122
-        'handler' => 'content_plugin_style_php_array_ac',
123
-        'no ui' => TRUE, // Programmatic use only.
124
-        'uses row plugin' => TRUE,
125
-        'uses fields' => TRUE,
126
-        'type' => 'content_simple',
127
-        'even empty' => TRUE,
117
+       'path' => drupal_get_path('module', 'content') . '/includes/views/handlers',
118
+       // Those strings are not translated for now.
119
+       // We'll need to change that if / when we remove 'no ui'
120
+       'title' => 'Results array (with title)',
121
+       'help' => 'Returns the view as a PHP array of names + rendered rows.',
122
+       'handler' => 'content_plugin_style_php_array_ac',
123
+       'no ui' => TRUE, // Programmatic use only.
124
+       'uses row plugin' => TRUE,
125
+       'uses fields' => TRUE,
126
+       'type' => 'content_simple',
127
+       'even empty' => TRUE,
128 128
       ),
129 129
     ),
130 130
   );
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
     $types = array();
173 173
     foreach (content_types() as $type) {
174 174
       if (isset($type['fields'][$field['field_name']])) {
175
-        // TODO : run check_plain here instead of on the imploded string below ?
176
-        $types[] = $type['name'];
175
+       // TODO : run check_plain here instead of on the imploded string below ?
176
+       $types[] = $type['name'];
177 177
       }
178 178
     }
179 179
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     foreach ($db_info['columns'] as $column => $attributes) {
197 197
       // Select explicitly enabled field columns.
198 198
       if (!empty($attributes['views'])) {
199
-        $db_columns[$column] = $attributes;
199
+       $db_columns[$column] = $attributes;
200 200
       }
201 201
       // Ensure all columns are retrieved.
202 202
       $additional_fields[$attributes['column']] = $attributes['column'];
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
     if (empty($db_columns)) {
207 207
       // Can't use array_slice(), it won't work in PHP4 for assoc array.
208 208
       foreach ($db_info['columns'] as $column => $attributes) {
209
-        $db_columns[$column] = $attributes;
210
-        break;
209
+       $db_columns[$column] = $attributes;
210
+       break;
211 211
       }
212 212
     }
213 213
     $columns = array();
@@ -221,27 +221,27 @@  discard block
 block discarded – undo
221 221
 
222 222
       // Identify likely filters and arguments for each column based on field type.
223 223
       switch ($attributes['type']) {
224
-        case 'int':
225
-        case 'mediumint':
226
-        case 'tinyint':
227
-        case 'bigint':
228
-        case 'serial':
229
-          $filters[] = 'content_handler_filter_numeric';
230
-          $arguments[] = 'content_handler_argument_numeric';
231
-          break;
232
-        case 'numeric':
233
-        case 'float':
234
-          $filters[] = 'content_handler_filter_float';
235
-          $arguments[] = 'content_handler_argument_numeric';
236
-          break;
224
+      case 'int':
225
+      case 'mediumint':
226
+      case 'tinyint':
227
+      case 'bigint':
228
+      case 'serial':
229
+      $filters[] = 'content_handler_filter_numeric';
230
+      $arguments[] = 'content_handler_argument_numeric';
231
+      break;
232
+      case 'numeric':
233
+      case 'float':
234
+      $filters[] = 'content_handler_filter_float';
235
+      $arguments[] = 'content_handler_argument_numeric';
236
+      break;
237 237
 
238
-        case 'text':
239
-        case 'blob':
240
-          // TODO add markup handlers for these types
241
-        default:
242
-          $filters[] = 'content_handler_filter_string';
243
-          $arguments[] = 'content_handler_argument_string';
244
-          break;
238
+      case 'text':
239
+      case 'blob':
240
+      // TODO add markup handlers for these types
241
+      default:
242
+      $filters[] = 'content_handler_filter_string';
243
+      $arguments[] = 'content_handler_argument_string';
244
+      break;
245 245
       }
246 246
     }
247 247
 
Please login to merge, or discard this patch.
drupal/sites/default/boinc/themes/boinc/templates/forum-topic-list.tpl.php 1 patch
Switch Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
 <table id="forum-topic-<?php print $topic_id; ?>">
37 37
   
38 38
   <?php
39
-    // Get vocabulary name and use that as the title
40
-    $topic = current($topics);
41
-    $taxonomy = taxonomy_get_term($topic->tid);
39
+  // Get vocabulary name and use that as the title
40
+  $topic = current($topics);
41
+  $taxonomy = taxonomy_get_term($topic->tid);
42
+  if (module_exists('internationalization')) {
43
+    $imv = i18ntaxonomy_localize_terms(array($taxonomy));
44
+    $taxonomy = reset($imv);
45
+  }
46
+  if ($forum_vocab = taxonomy_vocabulary_load($taxonomy->vid)) {
42 47
     if (module_exists('internationalization')) {
43
-      $imv = i18ntaxonomy_localize_terms(array($taxonomy));
44
-      $taxonomy = reset($imv);
48
+      $forum_vocab->name = i18ntaxonomy_translate_vocabulary_name($forum_vocab);
45 49
     }
46
-    if ($forum_vocab = taxonomy_vocabulary_load($taxonomy->vid)) {
47
-      if (module_exists('internationalization')) {
48
-        $forum_vocab->name = i18ntaxonomy_translate_vocabulary_name($forum_vocab);
49
-      }
50
-      drupal_set_title($forum_vocab->name);
51
-    }
52
-    // Get the count of topics on this page
53
-    $topic_count = count($topics);
54
-    $topic_index = 0;
55
-    $first_non_sticky = FALSE;
56
-  ?>
50
+    drupal_set_title($forum_vocab->name);
51
+  }
52
+  // Get the count of topics on this page
53
+  $topic_count = count($topics);
54
+  $topic_index = 0;
55
+  $first_non_sticky = FALSE;
56
+?>
57 57
   
58 58
   <h2 class="title">
59 59
     <?php print l($forum_vocab->name, 'community/forum') . ' &rsaquo; '; ?>
@@ -66,27 +66,27 @@  discard block
 block discarded – undo
66 66
   <tbody>
67 67
   <?php foreach ($topics as $topic): ?>
68 68
     <?php
69
-      node_load($topic->id);
70
-      $author = user_load($topic->uid);
71
-      $topic_index++;
72
-      $row_class = 'topic ' . $topic->zebra;
73
-      if ($topic_index == 1) {
74
-        $row_class .= ' first';
75
-      }
76
-      if ($topic->sticky) {
77
-        $row_class .= ' sticky';
78
-      }
79
-      elseif (!$first_non_sticky AND !$topic->sticky) {
80
-        $row_class .= ' first-non-sticky';
81
-        $first_non_sticky = TRUE;
82
-      }
83
-      if ($topic_index == $topic_count) {
84
-        $row_class .= ' last';
85
-      }
86
-      if ($topic->new) {
87
-        $row_class .= ' updated';
88
-      }
89
-    ?>
69
+    node_load($topic->id);
70
+    $author = user_load($topic->uid);
71
+    $topic_index++;
72
+    $row_class = 'topic ' . $topic->zebra;
73
+    if ($topic_index == 1) {
74
+      $row_class .= ' first';
75
+    }
76
+    if ($topic->sticky) {
77
+      $row_class .= ' sticky';
78
+    }
79
+    elseif (!$first_non_sticky AND !$topic->sticky) {
80
+      $row_class .= ' first-non-sticky';
81
+      $first_non_sticky = TRUE;
82
+    }
83
+    if ($topic_index == $topic_count) {
84
+      $row_class .= ' last';
85
+    }
86
+    if ($topic->new) {
87
+      $row_class .= ' updated';
88
+    }
89
+  ?>
90 90
     <tr class="<?php print $row_class;?>">
91 91
       <td class="icon"><?php //print $topic->icon; ?>
92 92
         <?php if ($topic->sticky): ?>
Please login to merge, or discard this patch.