Passed
Push — dpa_docker_wrapper12 ( e18bd7 )
by David
08:59
created
drupal/sites/all/themes/zen/zen-internals/template.zen.inc 3 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,26 +14,26 @@
 block discarded – undo
14 14
  * If the user is silly and enables Zen as the theme, manually add some stylesheets.
15 15
  */
16 16
 function _zen_preprocess_page(&$vars, $hook) {
17
-  $directory = _zen_path() . '/zen-internals/css';
17
+    $directory = _zen_path() . '/zen-internals/css';
18 18
 
19
-  // Add default styles.
20
-  if (theme_get_setting('zen_layout') == 'zen-columns-fixed') {
19
+    // Add default styles.
20
+    if (theme_get_setting('zen_layout') == 'zen-columns-fixed') {
21 21
     drupal_add_css($directory . '/zen-fixed.css', 'theme', 'all');
22
-  }
23
-  else {
22
+    }
23
+    else {
24 24
     drupal_add_css($directory . '/zen-liquid.css', 'theme', 'all');
25
-  }
26
-  // Add print styles.
27
-  drupal_add_css($directory . '/print.css', 'theme', 'print');
25
+    }
26
+    // Add print styles.
27
+    drupal_add_css($directory . '/print.css', 'theme', 'print');
28 28
 
29
-  // Regenerate the stylesheets.
30
-  $vars['css'] = drupal_add_css();
31
-  $vars['styles'] = drupal_get_css();
29
+    // Regenerate the stylesheets.
30
+    $vars['css'] = drupal_add_css();
31
+    $vars['styles'] = drupal_get_css();
32 32
 
33
-  // Add IE styles.
34
-  $query_string = '?'. substr(variable_get('css_js_query_string', '0'), 0, 1);
35
-  $base_path = base_path() . $directory;
36
-  $vars['styles'] .= <<< IE_STYLES
33
+    // Add IE styles.
34
+    $query_string = '?'. substr(variable_get('css_js_query_string', '0'), 0, 1);
35
+    $base_path = base_path() . $directory;
36
+    $vars['styles'] .= <<< IE_STYLES
37 37
 <!--[if IE]><link type="text/css" rel="stylesheet" media="all" href="$base_path/ie.css$query_string" /><![endif]-->
38 38
 <!--[if lte IE 6]><link type="text/css" rel="stylesheet" media="all" href="$base_path/ie6.css$query_string" /><![endif]-->
39 39
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,25 +14,25 @@
 block discarded – undo
14 14
  * If the user is silly and enables Zen as the theme, manually add some stylesheets.
15 15
  */
16 16
 function _zen_preprocess_page(&$vars, $hook) {
17
-  $directory = _zen_path() . '/zen-internals/css';
17
+  $directory = _zen_path().'/zen-internals/css';
18 18
 
19 19
   // Add default styles.
20 20
   if (theme_get_setting('zen_layout') == 'zen-columns-fixed') {
21
-    drupal_add_css($directory . '/zen-fixed.css', 'theme', 'all');
21
+    drupal_add_css($directory.'/zen-fixed.css', 'theme', 'all');
22 22
   }
23 23
   else {
24
-    drupal_add_css($directory . '/zen-liquid.css', 'theme', 'all');
24
+    drupal_add_css($directory.'/zen-liquid.css', 'theme', 'all');
25 25
   }
26 26
   // Add print styles.
27
-  drupal_add_css($directory . '/print.css', 'theme', 'print');
27
+  drupal_add_css($directory.'/print.css', 'theme', 'print');
28 28
 
29 29
   // Regenerate the stylesheets.
30 30
   $vars['css'] = drupal_add_css();
31 31
   $vars['styles'] = drupal_get_css();
32 32
 
33 33
   // Add IE styles.
34
-  $query_string = '?'. substr(variable_get('css_js_query_string', '0'), 0, 1);
35
-  $base_path = base_path() . $directory;
34
+  $query_string = '?'.substr(variable_get('css_js_query_string', '0'), 0, 1);
35
+  $base_path = base_path().$directory;
36 36
   $vars['styles'] .= <<< IE_STYLES
37 37
 <!--[if IE]><link type="text/css" rel="stylesheet" media="all" href="$base_path/ie.css$query_string" /><![endif]-->
38 38
 <!--[if lte IE 6]><link type="text/css" rel="stylesheet" media="all" href="$base_path/ie6.css$query_string" /><![endif]-->
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
   // Add default styles.
20 20
   if (theme_get_setting('zen_layout') == 'zen-columns-fixed') {
21 21
     drupal_add_css($directory . '/zen-fixed.css', 'theme', 'all');
22
-  }
23
-  else {
22
+  } else {
24 23
     drupal_add_css($directory . '/zen-liquid.css', 'theme', 'all');
25 24
   }
26 25
   // Add print styles.
Please login to merge, or discard this patch.
drupal/sites/all/themes/zen/zen-internals/template.comment.inc 4 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -13,46 +13,46 @@
 block discarded – undo
13 13
  *   The name of the template being rendered ("comment" in this case.)
14 14
  */
15 15
 function _zen_preprocess_comment(&$vars, $hook) {
16
-  // In Drupal 7, $date has been renamed to $created.
17
-  $vars['created'] = $vars['date'];
16
+    // In Drupal 7, $date has been renamed to $created.
17
+    $vars['created'] = $vars['date'];
18 18
 
19
-  // If comment subjects are disabled, don't display them.
20
-  if (variable_get('comment_subject_field_' . $vars['node']->type, 1) == 0) {
19
+    // If comment subjects are disabled, don't display them.
20
+    if (variable_get('comment_subject_field_' . $vars['node']->type, 1) == 0) {
21 21
     $vars['title'] = '';
22
-  }
22
+    }
23 23
 
24
-  // New comment.
25
-  if ($vars['comment']->new) {
24
+    // New comment.
25
+    if ($vars['comment']->new) {
26 26
     $vars['classes_array'][] = 'comment-new';
27
-  }
28
-  // Add an "unpublished" flag.
29
-  if ($vars['comment']->status == COMMENT_NOT_PUBLISHED) {
27
+    }
28
+    // Add an "unpublished" flag.
29
+    if ($vars['comment']->status == COMMENT_NOT_PUBLISHED) {
30 30
     $vars['unpublished'] = TRUE;
31 31
     $vars['classes_array'][] = $vars['status'];
32
-  }
33
-  else {
32
+    }
33
+    else {
34 34
     $vars['unpublished'] = FALSE;
35
-  }
36
-  // Zebra striping.
37
-  if ($vars['id'] == 1) {
35
+    }
36
+    // Zebra striping.
37
+    if ($vars['id'] == 1) {
38 38
     $vars['classes_array'][] = 'first';
39
-  }
40
-  if ($vars['id'] == $vars['node']->comment_count) {
39
+    }
40
+    if ($vars['id'] == $vars['node']->comment_count) {
41 41
     $vars['classes_array'][] = 'last';
42
-  }
43
-  $vars['classes_array'][] = $vars['zebra'];
44
-  if ($vars['comment']->uid == 0) {
42
+    }
43
+    $vars['classes_array'][] = $vars['zebra'];
44
+    if ($vars['comment']->uid == 0) {
45 45
     // Comment is by an anonymous user.
46 46
     $vars['classes_array'][] = 'comment-by-anonymous';
47
-  }
48
-  else {
47
+    }
48
+    else {
49 49
     if ($vars['comment']->uid == $vars['node']->uid) {
50
-      // Comment is by the node author.
51
-      $vars['classes_array'][] = 'comment-by-node-author';
50
+        // Comment is by the node author.
51
+        $vars['classes_array'][] = 'comment-by-node-author';
52 52
     }
53 53
     if ($vars['comment']->uid == $GLOBALS['user']->uid) {
54
-      // Comment was posted by current user.
55
-      $vars['classes_array'][] = 'comment-by-viewer';
54
+        // Comment was posted by current user.
55
+        $vars['classes_array'][] = 'comment-by-viewer';
56
+    }
56 57
     }
57
-  }
58 58
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
   $vars['created'] = $vars['date'];
18 18
 
19 19
   // If comment subjects are disabled, don't display them.
20
-  if (variable_get('comment_subject_field_' . $vars['node']->type, 1) == 0) {
20
+  if (variable_get('comment_subject_field_'.$vars['node']->type, 1) == 0) {
21 21
     $vars['title'] = '';
22 22
   }
23 23
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
   if ($vars['comment']->status == COMMENT_NOT_PUBLISHED) {
30 30
     $vars['unpublished'] = TRUE;
31 31
     $vars['classes_array'][] = $vars['status'];
32
-  }
33
-  else {
32
+  } else {
34 33
     $vars['unpublished'] = FALSE;
35 34
   }
36 35
   // Zebra striping.
@@ -44,8 +43,7 @@  discard block
 block discarded – undo
44 43
   if ($vars['comment']->uid == 0) {
45 44
     // Comment is by an anonymous user.
46 45
     $vars['classes_array'][] = 'comment-by-anonymous';
47
-  }
48
-  else {
46
+  } else {
49 47
     if ($vars['comment']->uid == $vars['node']->uid) {
50 48
       // Comment is by the node author.
51 49
       $vars['classes_array'][] = 'comment-by-node-author';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
   }
28 28
   // Add an "unpublished" flag.
29 29
   if ($vars['comment']->status == COMMENT_NOT_PUBLISHED) {
30
-    $vars['unpublished'] = TRUE;
30
+    $vars['unpublished'] = true;
31 31
     $vars['classes_array'][] = $vars['status'];
32 32
   }
33 33
   else {
34
-    $vars['unpublished'] = FALSE;
34
+    $vars['unpublished'] = false;
35 35
   }
36 36
   // Zebra striping.
37 37
   if ($vars['id'] == 1) {
Please login to merge, or discard this patch.
drupal/sites/all/themes/zen/template.php 5 patches
Indentation   +242 added lines, -242 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 // Auto-rebuild the theme registry during theme development.
15 15
 if (theme_get_setting('zen_rebuild_registry')) {
16
-  drupal_rebuild_theme_registry();
16
+    drupal_rebuild_theme_registry();
17 17
 }
18 18
 
19 19
 
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
  * Implements HOOK_theme().
22 22
  */
23 23
 function zen_theme(&$existing, $type, $theme, $path) {
24
-  // When #341140 is fixed, replace _zen_path() with drupal_get_path().
25
-  include_once './' . _zen_path() . '/zen-internals/template.theme-registry.inc';
26
-  return _zen_theme($existing, $type, $theme, $path);
24
+    // When #341140 is fixed, replace _zen_path() with drupal_get_path().
25
+    include_once './' . _zen_path() . '/zen-internals/template.theme-registry.inc';
26
+    return _zen_theme($existing, $type, $theme, $path);
27 27
 }
28 28
 
29 29
 /**
@@ -35,33 +35,33 @@  discard block
 block discarded – undo
35 35
  *   A string containing the breadcrumb output.
36 36
  */
37 37
 function zen_breadcrumb($breadcrumb) {
38
-  // Determine if we are to display the breadcrumb.
39
-  $show_breadcrumb = theme_get_setting('zen_breadcrumb');
40
-  if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') {
38
+    // Determine if we are to display the breadcrumb.
39
+    $show_breadcrumb = theme_get_setting('zen_breadcrumb');
40
+    if ($show_breadcrumb == 'yes' || $show_breadcrumb == 'admin' && arg(0) == 'admin') {
41 41
 
42 42
     // Optionally get rid of the homepage link.
43 43
     $show_breadcrumb_home = theme_get_setting('zen_breadcrumb_home');
44 44
     if (!$show_breadcrumb_home) {
45
-      array_shift($breadcrumb);
45
+        array_shift($breadcrumb);
46 46
     }
47 47
 
48 48
     // Return the breadcrumb with separators.
49 49
     if (!empty($breadcrumb)) {
50
-      $breadcrumb_separator = theme_get_setting('zen_breadcrumb_separator');
51
-      $trailing_separator = $title = '';
52
-      if (theme_get_setting('zen_breadcrumb_title')) {
50
+        $breadcrumb_separator = theme_get_setting('zen_breadcrumb_separator');
51
+        $trailing_separator = $title = '';
52
+        if (theme_get_setting('zen_breadcrumb_title')) {
53 53
         if ($title = drupal_get_title()) {
54
-          $trailing_separator = $breadcrumb_separator;
54
+            $trailing_separator = $breadcrumb_separator;
55 55
         }
56
-      }
57
-      elseif (theme_get_setting('zen_breadcrumb_trailing')) {
56
+        }
57
+        elseif (theme_get_setting('zen_breadcrumb_trailing')) {
58 58
         $trailing_separator = $breadcrumb_separator;
59
-      }
60
-      return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "$trailing_separator$title</div>";
59
+        }
60
+        return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "$trailing_separator$title</div>";
61 61
     }
62
-  }
63
-  // Otherwise, return an empty string.
64
-  return '';
62
+    }
63
+    // Otherwise, return an empty string.
64
+    return '';
65 65
 }
66 66
 
67 67
 /**
@@ -90,27 +90,27 @@  discard block
 block discarded – undo
90 90
  *   A string containing an unordered list of links.
91 91
  */
92 92
 function zen_links($links, $attributes = array('class' => 'links'), $heading = '') {
93
-  global $language;
94
-  $output = '';
93
+    global $language;
94
+    $output = '';
95 95
 
96
-  if (count($links) > 0) {
96
+    if (count($links) > 0) {
97 97
     // Treat the heading first if it is present to prepend it to the
98 98
     // list of links.
99 99
     if (!empty($heading)) {
100
-      if (is_string($heading)) {
100
+        if (is_string($heading)) {
101 101
         // Prepare the array that will be used when the passed heading
102 102
         // is a string.
103 103
         $heading = array(
104
-          'text' => $heading,
105
-          // Set the default level of the heading.
106
-          'level' => 'h2',
104
+            'text' => $heading,
105
+            // Set the default level of the heading.
106
+            'level' => 'h2',
107 107
         );
108
-      }
109
-      $output .= '<' . $heading['level'];
110
-      if (!empty($heading['class'])) {
108
+        }
109
+        $output .= '<' . $heading['level'];
110
+        if (!empty($heading['class'])) {
111 111
         $output .= drupal_attributes(array('class' => $heading['class']));
112
-      }
113
-      $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>';
112
+        }
113
+        $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>';
114 114
     }
115 115
 
116 116
     $output .= '<ul'. drupal_attributes($attributes) .'>';
@@ -119,89 +119,89 @@  discard block
 block discarded – undo
119 119
     $i = 1;
120 120
 
121 121
     foreach ($links as $key => $link) {
122
-      $class = $key;
122
+        $class = $key;
123 123
 
124
-      // Add first, last and active classes to the list of links to help out themers.
125
-      if ($i == 1) {
124
+        // Add first, last and active classes to the list of links to help out themers.
125
+        if ($i == 1) {
126 126
         $class .= ' first';
127
-      }
128
-      if ($i == $num_links) {
127
+        }
128
+        if ($i == $num_links) {
129 129
         $class .= ' last';
130
-      }
131
-      if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
130
+        }
131
+        if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
132 132
           && (empty($link['language']) || $link['language']->language == $language->language)) {
133 133
         $class .= ' active';
134
-      }
135
-      $output .= '<li'. drupal_attributes(array('class' => $class)) .'>';
134
+        }
135
+        $output .= '<li'. drupal_attributes(array('class' => $class)) .'>';
136 136
 
137
-      if (isset($link['href'])) {
137
+        if (isset($link['href'])) {
138 138
         // Pass in $link as $options, they share the same keys.
139 139
         $output .= l($link['title'], $link['href'], $link);
140
-      }
141
-      else if (!empty($link['title'])) {
140
+        }
141
+        else if (!empty($link['title'])) {
142 142
         // Some links are actually not links, but we wrap these in <span> for adding title and class attributes
143 143
         if (empty($link['html'])) {
144
-          $link['title'] = check_plain($link['title']);
144
+            $link['title'] = check_plain($link['title']);
145 145
         }
146 146
         $span_attributes = '';
147 147
         if (isset($link['attributes'])) {
148
-          $span_attributes = drupal_attributes($link['attributes']);
148
+            $span_attributes = drupal_attributes($link['attributes']);
149 149
         }
150 150
         $output .= '<span'. $span_attributes .'>'. $link['title'] .'</span>';
151
-      }
151
+        }
152 152
 
153
-      $i++;
154
-      $output .= "</li>\n";
153
+        $i++;
154
+        $output .= "</li>\n";
155 155
     }
156 156
 
157 157
     $output .= '</ul>';
158
-  }
158
+    }
159 159
 
160
-  return $output;
160
+    return $output;
161 161
 }
162 162
 
163 163
 /**
164 164
  * Implements theme_menu_item_link()
165 165
  */
166 166
 function zen_menu_item_link($link) {
167
-  if (empty($link['localized_options'])) {
167
+    if (empty($link['localized_options'])) {
168 168
     $link['localized_options'] = array();
169
-  }
169
+    }
170 170
 
171
-  // If an item is a LOCAL TASK, render it as a tab
172
-  if ($link['type'] & MENU_IS_LOCAL_TASK) {
171
+    // If an item is a LOCAL TASK, render it as a tab
172
+    if ($link['type'] & MENU_IS_LOCAL_TASK) {
173 173
     $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
174 174
     $link['localized_options']['html'] = TRUE;
175
-  }
175
+    }
176 176
 
177
-  return l($link['title'], $link['href'], $link['localized_options']);
177
+    return l($link['title'], $link['href'], $link['localized_options']);
178 178
 }
179 179
 
180 180
 /**
181 181
  * Duplicate of theme_menu_local_tasks() but adds clearfix to tabs.
182 182
  */
183 183
 function zen_menu_local_tasks() {
184
-  $output = '';
184
+    $output = '';
185 185
 
186
-  // CTools requires a different set of local task functions.
187
-  if (module_exists('ctools')) {
186
+    // CTools requires a different set of local task functions.
187
+    if (module_exists('ctools')) {
188 188
     ctools_include('menu');
189 189
     $primary = ctools_menu_primary_local_tasks();
190 190
     $secondary = ctools_menu_secondary_local_tasks();
191
-  }
192
-  else {
191
+    }
192
+    else {
193 193
     $primary = menu_primary_local_tasks();
194 194
     $secondary = menu_secondary_local_tasks();
195
-  }
195
+    }
196 196
 
197
-  if ($primary) {
197
+    if ($primary) {
198 198
     $output .= '<ul class="tabs primary clearfix">' . $primary . '</ul>';
199
-  }
200
-  if ($secondary) {
199
+    }
200
+    if ($secondary) {
201 201
     $output .= '<ul class="tabs secondary clearfix">' . $secondary . '</ul>';
202
-  }
202
+    }
203 203
 
204
-  return $output;
204
+    return $output;
205 205
 }
206 206
 
207 207
 /**
@@ -218,32 +218,32 @@  discard block
 block discarded – undo
218 218
  * @see zen_show_blocks_discovery()
219 219
  */
220 220
 function zen_blocks($region, $show_blocks = NULL) {
221
-  // Since Drupal 6 doesn't pass $show_blocks to theme_blocks, we manually call
222
-  // theme('blocks', NULL, $show_blocks) so that this function can remember the
223
-  // value on later calls.
224
-  static $render_sidebars = TRUE;
225
-  if (!is_null($show_blocks)) {
221
+    // Since Drupal 6 doesn't pass $show_blocks to theme_blocks, we manually call
222
+    // theme('blocks', NULL, $show_blocks) so that this function can remember the
223
+    // value on later calls.
224
+    static $render_sidebars = TRUE;
225
+    if (!is_null($show_blocks)) {
226 226
     $render_sidebars = $show_blocks;
227
-  }
227
+    }
228 228
 
229
-  // If zen_blocks was called with a NULL region, its likely we were just
230
-  // setting the $render_sidebars static variable.
231
-  if ($region) {
229
+    // If zen_blocks was called with a NULL region, its likely we were just
230
+    // setting the $render_sidebars static variable.
231
+    if ($region) {
232 232
     $output = '';
233 233
 
234 234
     // If $renders_sidebars is FALSE, don't render any region whose name begins
235 235
     // with "sidebar_".
236 236
     if ($render_sidebars || (strpos($region, 'sidebar_') !== 0)) {
237
-      // Allow context module to set blocks.
238
-      if (function_exists('context_blocks')) {
237
+        // Allow context module to set blocks.
238
+        if (function_exists('context_blocks')) {
239 239
         $output = context_blocks($region);
240
-      }
241
-      else {
240
+        }
241
+        else {
242 242
         foreach (block_list($region) as $key => $block) {
243
-          // $key == module_delta
244
-          $output .= theme('block', $block);
243
+            // $key == module_delta
244
+            $output .= theme('block', $block);
245
+        }
245 246
         }
246
-      }
247 247
     }
248 248
 
249 249
     // Add any content assigned to this region through drupal_set_content() calls.
@@ -255,11 +255,11 @@  discard block
 block discarded – undo
255 255
     // Set the theme hook suggestions.
256 256
     $hook = array('region_' . $region);
257 257
     if (strpos($region, 'sidebar_') === 0) {
258
-      $hook[] = 'region_sidebar';
258
+        $hook[] = 'region_sidebar';
259 259
     }
260 260
     $hook[] = 'region';
261 261
     return $output ? theme($hook, $elements) : '';
262
-  }
262
+    }
263 263
 }
264 264
 
265 265
 /**
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
  * @see zen_blocks()
272 272
  */
273 273
 function zen_show_blocks_discovery(&$vars) {
274
-  if ($vars['show_blocks'] == FALSE) {
274
+    if ($vars['show_blocks'] == FALSE) {
275 275
     // Allow zen_blocks() to statically cache the $show_blocks variable. A TRUE
276 276
     // value is assumed, so we only need to override when $show_blocks is FALSE.
277 277
     theme('blocks', NULL, FALSE);
278
-  }
278
+    }
279 279
 }
280 280
 
281 281
 /**
@@ -287,25 +287,25 @@  discard block
 block discarded – undo
287 287
  *   The name of the template being rendered.
288 288
  */
289 289
 function zen_preprocess(&$vars, $hook) {
290
-  // In D6, the page.tpl uses a different variable name to hold the classes.
291
-  $key = ($hook == 'page' || $hook == 'maintenance_page') ? 'body_classes' : 'classes';
290
+    // In D6, the page.tpl uses a different variable name to hold the classes.
291
+    $key = ($hook == 'page' || $hook == 'maintenance_page') ? 'body_classes' : 'classes';
292 292
 
293
-  // Create a D7-standard classes_array variable.
294
-  if (array_key_exists($key, $vars)) {
293
+    // Create a D7-standard classes_array variable.
294
+    if (array_key_exists($key, $vars)) {
295 295
     // Views (and possibly other modules) have templates with a $classes
296 296
     // variable that isn't a string, so we leave those variables alone.
297 297
     if (is_string($vars[$key])) {
298
-      $vars['classes_array'] = explode(' ', $hook . ' ' . $vars[$key]);
299
-      unset($vars[$key]);
298
+        $vars['classes_array'] = explode(' ', $hook . ' ' . $vars[$key]);
299
+        unset($vars[$key]);
300
+    }
300 301
     }
301
-  }
302
-  else {
302
+    else {
303 303
     $vars['classes_array'] = array($hook);
304
-  }
305
-  // Add support for Skinr
306
-  if (!empty($vars['skinr']) && array_key_exists('classes_array', $vars)) {
304
+    }
305
+    // Add support for Skinr
306
+    if (!empty($vars['skinr']) && array_key_exists('classes_array', $vars)) {
307 307
     $vars['classes_array'][] = $vars['skinr'];
308
-  }
308
+    }
309 309
 }
310 310
 
311 311
 /**
@@ -317,82 +317,82 @@  discard block
 block discarded – undo
317 317
  *   The name of the template being rendered ("page" in this case.)
318 318
  */
319 319
 function zen_preprocess_page(&$vars, $hook) {
320
-  // If the user is silly and enables Zen as the theme, add some styles.
321
-  if ($GLOBALS['theme'] == 'zen') {
320
+    // If the user is silly and enables Zen as the theme, add some styles.
321
+    if ($GLOBALS['theme'] == 'zen') {
322 322
     include_once './' . _zen_path() . '/zen-internals/template.zen.inc';
323 323
     _zen_preprocess_page($vars, $hook);
324
-  }
325
-  // Add conditional stylesheets.
326
-  elseif (!module_exists('conditional_styles')) {
324
+    }
325
+    // Add conditional stylesheets.
326
+    elseif (!module_exists('conditional_styles')) {
327 327
     $language = $GLOBALS['language']->direction == LANGUAGE_RTL ? '_rtl' : '';
328 328
     $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'] . $language, '');
329 329
     $vars['styles'] .= $vars['conditional_styles'];
330
-  }
330
+    }
331 331
 
332
-  // Classes for body element. Allows advanced theming based on context
333
-  // (home page, node of certain type, etc.)
334
-  // Remove the mostly useless page-ARG0 class.
335
-  if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. drupal_strtolower(arg(0))), $vars['classes_array'])) {
332
+    // Classes for body element. Allows advanced theming based on context
333
+    // (home page, node of certain type, etc.)
334
+    // Remove the mostly useless page-ARG0 class.
335
+    if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. drupal_strtolower(arg(0))), $vars['classes_array'])) {
336 336
     unset($vars['classes_array'][$index]);
337
-  }
338
-  if (!$vars['is_front']) {
337
+    }
338
+    if (!$vars['is_front']) {
339 339
     // Add unique class for each page.
340 340
     $path = drupal_get_path_alias($_GET['q']);
341 341
     $vars['classes_array'][] = drupal_html_class('page-' . $path);
342 342
     // Add unique class for each website section.
343 343
     list($section, ) = explode('/', $path, 2);
344 344
     if (arg(0) == 'node') {
345
-      if (arg(1) == 'add') {
345
+        if (arg(1) == 'add') {
346 346
         $section = 'node-add';
347
-      }
348
-      elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) {
347
+        }
348
+        elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) {
349 349
         $section = 'node-' . arg(2);
350
-      }
350
+        }
351 351
     }
352 352
     $vars['classes_array'][] = drupal_html_class('section-' . $section);
353
-  }
354
-  if (theme_get_setting('zen_wireframes')) {
353
+    }
354
+    if (theme_get_setting('zen_wireframes')) {
355 355
     $vars['classes_array'][] = 'with-wireframes'; // Optionally add the wireframes style.
356
-  }
357
-  // We need to re-do the $layout and body classes because
358
-  // template_preprocess_page() assumes sidebars are named 'left' and 'right'.
359
-  $vars['layout'] = 'none';
360
-  if (!empty($vars['sidebar_first'])) {
356
+    }
357
+    // We need to re-do the $layout and body classes because
358
+    // template_preprocess_page() assumes sidebars are named 'left' and 'right'.
359
+    $vars['layout'] = 'none';
360
+    if (!empty($vars['sidebar_first'])) {
361 361
     $vars['layout'] = 'first';
362
-  }
363
-  if (!empty($vars['sidebar_second'])) {
362
+    }
363
+    if (!empty($vars['sidebar_second'])) {
364 364
     $vars['layout'] = ($vars['layout'] == 'first') ? 'both' : 'second';
365
-  }
366
-  // If the layout is 'none', then template_preprocess_page() will already have
367
-  // set a 'no-sidebars' class since it won't find a 'left' or 'right' sidebar.
368
-  if ($vars['layout'] != 'none') {
365
+    }
366
+    // If the layout is 'none', then template_preprocess_page() will already have
367
+    // set a 'no-sidebars' class since it won't find a 'left' or 'right' sidebar.
368
+    if ($vars['layout'] != 'none') {
369 369
     // Remove the incorrect 'no-sidebars' class.
370 370
     if ($index = array_search('no-sidebars', $vars['classes_array'])) {
371
-      unset($vars['classes_array'][$index]);
371
+        unset($vars['classes_array'][$index]);
372 372
     }
373 373
     // Set the proper layout body classes.
374 374
     if ($vars['layout'] == 'both') {
375
-      $vars['classes_array'][] = 'two-sidebars';
375
+        $vars['classes_array'][] = 'two-sidebars';
376 376
     }
377 377
     else {
378
-      $vars['classes_array'][] = 'one-sidebar';
379
-      $vars['classes_array'][] = 'sidebar-' . $vars['layout'];
378
+        $vars['classes_array'][] = 'one-sidebar';
379
+        $vars['classes_array'][] = 'sidebar-' . $vars['layout'];
380
+    }
380 381
     }
381
-  }
382
-  // Store the menu item since it has some useful information.
383
-  $vars['menu_item'] = menu_get_item();
384
-  switch ($vars['menu_item']['page_callback']) {
382
+    // Store the menu item since it has some useful information.
383
+    $vars['menu_item'] = menu_get_item();
384
+    switch ($vars['menu_item']['page_callback']) {
385 385
     case 'views_page':
386 386
       // Is this a Views page?
387 387
       $vars['classes_array'][] = 'page-views';
388
-      break;
388
+        break;
389 389
     case 'page_manager_page_execute':
390 390
     case 'page_manager_node_view':
391 391
     case 'page_manager_contact_site':
392 392
       // Is this a Panels page?
393 393
       $vars['classes_array'][] = 'page-panels';
394
-      break;
395
-  }
394
+        break;
395
+    }
396 396
 }
397 397
 
398 398
 /**
@@ -404,17 +404,17 @@  discard block
 block discarded – undo
404 404
  *   The name of the template being rendered ("maintenance_page" in this case.)
405 405
  */
406 406
 function zen_preprocess_maintenance_page(&$vars, $hook) {
407
-  // If Zen is the maintenance theme, add some styles.
408
-  if ($GLOBALS['theme'] == 'zen') {
407
+    // If Zen is the maintenance theme, add some styles.
408
+    if ($GLOBALS['theme'] == 'zen') {
409 409
     include_once './' . _zen_path() . '/zen-internals/template.zen.inc';
410 410
     _zen_preprocess_page($vars, $hook);
411
-  }
412
-  // Add conditional stylesheets.
413
-  elseif (!module_exists('conditional_styles')) {
411
+    }
412
+    // Add conditional stylesheets.
413
+    elseif (!module_exists('conditional_styles')) {
414 414
     $language = $GLOBALS['language']->direction == LANGUAGE_RTL ? '_rtl' : '';
415 415
     $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'] . $language, '');
416 416
     $vars['styles'] .= $vars['conditional_styles'];
417
-  }
417
+    }
418 418
 }
419 419
 
420 420
 /**
@@ -426,67 +426,67 @@  discard block
 block discarded – undo
426 426
  *   The name of the template being rendered ("node" in this case.)
427 427
  */
428 428
 function zen_preprocess_node(&$vars, $hook) {
429
-  // Create the build_mode variable.
430
-  switch ($vars['node']->build_mode) {
429
+    // Create the build_mode variable.
430
+    switch ($vars['node']->build_mode) {
431 431
     case NODE_BUILD_NORMAL:
432 432
       if ($vars['node']->build_mode === NODE_BUILD_NORMAL) {
433 433
         $vars['build_mode'] = $vars['teaser'] ? 'teaser' : 'full';
434
-      }
435
-      else {
434
+        }
435
+        else {
436 436
         $vars['build_mode'] = $vars['node']->build_mode;
437
-      }
438
-      break;
437
+        }
438
+        break;
439 439
     case NODE_BUILD_PREVIEW:
440 440
       $vars['build_mode'] = 'preview';
441
-      break;
441
+        break;
442 442
     case NODE_BUILD_SEARCH_INDEX:
443 443
       $vars['build_mode'] = 'search_index';
444
-      break;
444
+        break;
445 445
     case NODE_BUILD_SEARCH_RESULT:
446 446
       $vars['build_mode'] = 'search_result';
447
-      break;
447
+        break;
448 448
     case NODE_BUILD_RSS:
449 449
       $vars['build_mode'] = 'rss';
450
-      break;
450
+        break;
451 451
     case NODE_BUILD_PRINT:
452 452
       $vars['build_mode'] = 'print';
453
-      break;
453
+        break;
454 454
     default:
455 455
       $vars['build_mode'] = $vars['node']->build_mode;
456
-  }
456
+    }
457 457
 
458
-  // Create the user_picture variable.
459
-  $vars['user_picture'] = $vars['picture'];
458
+    // Create the user_picture variable.
459
+    $vars['user_picture'] = $vars['picture'];
460 460
 
461
-  // Create the Drupal 7 $display_submitted variable.
462
-  $vars['display_submitted'] = theme_get_setting('toggle_node_info_' . $vars['node']->type);
461
+    // Create the Drupal 7 $display_submitted variable.
462
+    $vars['display_submitted'] = theme_get_setting('toggle_node_info_' . $vars['node']->type);
463 463
 
464
-  // Special classes for nodes.
465
-  // Class for node type: "node-type-page", "node-type-story", "node-type-my-custom-type", etc.
466
-  $vars['classes_array'][] = drupal_html_class('node-type-' . $vars['type']);
467
-  if ($vars['promote']) {
464
+    // Special classes for nodes.
465
+    // Class for node type: "node-type-page", "node-type-story", "node-type-my-custom-type", etc.
466
+    $vars['classes_array'][] = drupal_html_class('node-type-' . $vars['type']);
467
+    if ($vars['promote']) {
468 468
     $vars['classes_array'][] = 'node-promoted';
469
-  }
470
-  if ($vars['sticky']) {
469
+    }
470
+    if ($vars['sticky']) {
471 471
     $vars['classes_array'][] = 'node-sticky';
472
-  }
473
-  if (!$vars['status']) {
472
+    }
473
+    if (!$vars['status']) {
474 474
     $vars['classes_array'][] = 'node-unpublished';
475 475
     $vars['unpublished'] = TRUE;
476
-  }
477
-  else {
476
+    }
477
+    else {
478 478
     $vars['unpublished'] = FALSE;
479
-  }
480
-  if ($vars['uid'] && $vars['uid'] == $GLOBALS['user']->uid) {
479
+    }
480
+    if ($vars['uid'] && $vars['uid'] == $GLOBALS['user']->uid) {
481 481
     $vars['classes_array'][] = 'node-by-viewer'; // Node is authored by current user.
482
-  }
483
-  if ($vars['teaser']) {
482
+    }
483
+    if ($vars['teaser']) {
484 484
     $vars['classes_array'][] = 'node-teaser'; // Node is displayed as teaser.
485
-  }
486
-  if (isset($vars['preview'])) {
485
+    }
486
+    if (isset($vars['preview'])) {
487 487
     $vars['classes_array'][] = 'node-preview';
488
-  }
489
-  $vars['classes_array'][] = 'build-mode-' . $vars['build_mode'] ;
488
+    }
489
+    $vars['classes_array'][] = 'build-mode-' . $vars['build_mode'] ;
490 490
 }
491 491
 
492 492
 /**
@@ -498,8 +498,8 @@  discard block
 block discarded – undo
498 498
  *   The name of the template being rendered ("comment" in this case.)
499 499
  */
500 500
 function zen_preprocess_comment(&$vars, $hook) {
501
-  include_once './' . _zen_path() . '/zen-internals/template.comment.inc';
502
-  _zen_preprocess_comment($vars, $hook);
501
+    include_once './' . _zen_path() . '/zen-internals/template.comment.inc';
502
+    _zen_preprocess_comment($vars, $hook);
503 503
 }
504 504
 
505 505
 /**
@@ -511,18 +511,18 @@  discard block
 block discarded – undo
511 511
  * @see region.tpl.php
512 512
  */
513 513
 function zen_preprocess_region(&$vars, $hook) {
514
-  // Create the $content variable that templates expect.
515
-  $vars['content'] = $vars['elements']['#children'];
516
-  $vars['region'] = $vars['elements']['#region'];
514
+    // Create the $content variable that templates expect.
515
+    $vars['content'] = $vars['elements']['#children'];
516
+    $vars['region'] = $vars['elements']['#region'];
517 517
 
518
-  // Setup the default classes.
519
-  $vars['classes_array'] = array('region', 'region-' . str_replace('_', '-', $vars['region']));
518
+    // Setup the default classes.
519
+    $vars['classes_array'] = array('region', 'region-' . str_replace('_', '-', $vars['region']));
520 520
 
521
-  // Sidebar regions get a couple extra classes.
522
-  if (strpos($vars['region'], 'sidebar_') === 0) {
521
+    // Sidebar regions get a couple extra classes.
522
+    if (strpos($vars['region'], 'sidebar_') === 0) {
523 523
     $vars['classes_array'][] = 'column';
524 524
     $vars['classes_array'][] = 'sidebar';
525
-  }
525
+    }
526 526
 }
527 527
 
528 528
 /**
@@ -534,36 +534,36 @@  discard block
 block discarded – undo
534 534
  *   The name of the template being rendered ("block" in this case.)
535 535
  */
536 536
 function zen_preprocess_block(&$vars, $hook) {
537
-  $block = $vars['block'];
537
+    $block = $vars['block'];
538 538
 
539
-  // Drupal 7 uses a $content variable instead of $block->content.
540
-  $vars['content'] = $block->content;
541
-  // Drupal 7 should use a $title variable instead of $block->subject.
542
-  $vars['title'] = $block->subject;
539
+    // Drupal 7 uses a $content variable instead of $block->content.
540
+    $vars['content'] = $block->content;
541
+    // Drupal 7 should use a $title variable instead of $block->subject.
542
+    $vars['title'] = $block->subject;
543 543
 
544
-  // Special classes for blocks.
545
-  $vars['classes_array'][] = 'block-' . $block->module;
546
-  // Classes describing the position of the block within the region.
547
-  if ($vars['block_id'] == 1) {
544
+    // Special classes for blocks.
545
+    $vars['classes_array'][] = 'block-' . $block->module;
546
+    // Classes describing the position of the block within the region.
547
+    if ($vars['block_id'] == 1) {
548 548
     $vars['classes_array'][] = 'first';
549
-  }
550
-  if (!function_exists('context_blocks') && count(block_list($vars['block']->region)) == $vars['block_id']) {
549
+    }
550
+    if (!function_exists('context_blocks') && count(block_list($vars['block']->region)) == $vars['block_id']) {
551 551
     $vars['classes_array'][] = 'last';
552
-  }
553
-  $vars['classes_array'][] = 'region-' . $vars['block_zebra'];
554
-  $vars['classes_array'][] = $vars['zebra'];
555
-  $vars['classes_array'][] = 'region-count-' . $vars['block_id'];
556
-  $vars['classes_array'][] = 'count-' . $vars['id'];
552
+    }
553
+    $vars['classes_array'][] = 'region-' . $vars['block_zebra'];
554
+    $vars['classes_array'][] = $vars['zebra'];
555
+    $vars['classes_array'][] = 'region-count-' . $vars['block_id'];
556
+    $vars['classes_array'][] = 'count-' . $vars['id'];
557 557
 
558
-  // Create the block ID.
559
-  $vars['block_html_id'] = 'block-' . $block->module . '-' . $block->delta;
558
+    // Create the block ID.
559
+    $vars['block_html_id'] = 'block-' . $block->module . '-' . $block->delta;
560 560
 
561
-  $vars['edit_links_array'] = array();
562
-  if (theme_get_setting('zen_block_editing') && user_access('administer blocks')) {
561
+    $vars['edit_links_array'] = array();
562
+    if (theme_get_setting('zen_block_editing') && user_access('administer blocks')) {
563 563
     include_once './' . _zen_path() . '/zen-internals/template.block-editing.inc';
564 564
     zen_preprocess_block_editing($vars, $hook);
565 565
     $vars['classes_array'][] = 'with-block-editing';
566
-  }
566
+    }
567 567
 }
568 568
 
569 569
 /**
@@ -575,10 +575,10 @@  discard block
 block discarded – undo
575 575
  *   The name of the template being rendered.
576 576
  */
577 577
 function zen_process(&$vars, $hook) {
578
-  // Don't clobber Views 3 classes.
579
-  if (array_key_exists('classes_array', $vars) && !array_key_exists('classes', $vars)) {
578
+    // Don't clobber Views 3 classes.
579
+    if (array_key_exists('classes_array', $vars) && !array_key_exists('classes', $vars)) {
580 580
     $vars['classes'] = implode(' ', $vars['classes_array']);
581
-  }
581
+    }
582 582
 }
583 583
 
584 584
 /**
@@ -590,22 +590,22 @@  discard block
 block discarded – undo
590 590
  *   The name of the template being rendered ("block" in this case.)
591 591
  */
592 592
 function zen_process_block(&$vars, $hook) {
593
-  $vars['edit_links'] = !empty($vars['edit_links_array']) ? '<div class="edit">' . implode(' ', $vars['edit_links_array']) . '</div>' : '';
593
+    $vars['edit_links'] = !empty($vars['edit_links_array']) ? '<div class="edit">' . implode(' ', $vars['edit_links_array']) . '</div>' : '';
594 594
 }
595 595
 
596 596
 if (!function_exists('drupal_html_class')) {
597
-  /**
598
-   * Prepare a string for use as a valid class name.
599
-   *
600
-   * Do not pass one string containing multiple classes as they will be
601
-   * incorrectly concatenated with dashes, i.e. "one two" will become "one-two".
602
-   *
603
-   * @param $class
604
-   *   The class name to clean.
605
-   * @return
606
-   *   The cleaned class name.
607
-   */
608
-  function drupal_html_class($class) {
597
+    /**
598
+     * Prepare a string for use as a valid class name.
599
+     *
600
+     * Do not pass one string containing multiple classes as they will be
601
+     * incorrectly concatenated with dashes, i.e. "one two" will become "one-two".
602
+     *
603
+     * @param $class
604
+     *   The class name to clean.
605
+     * @return
606
+     *   The cleaned class name.
607
+     */
608
+    function drupal_html_class($class) {
609 609
     // By default, we filter using Drupal's coding standards.
610 610
     $class = strtr(drupal_strtolower($class), array(' ' => '-', '_' => '-', '/' => '-', '[' => '-', ']' => ''));
611 611
 
@@ -623,19 +623,19 @@  discard block
 block discarded – undo
623 623
     $class = preg_replace('/[^\x{002D}\x{0030}-\x{0039}\x{0041}-\x{005A}\x{005F}\x{0061}-\x{007A}\x{00A1}-\x{FFFF}]/u', '', $class);
624 624
 
625 625
     return $class;
626
-  }
626
+    }
627 627
 } /* End of drupal_html_class conditional definition. */
628 628
 
629 629
 if (!function_exists('drupal_html_id')) {
630
-  /**
631
-   * Prepare a string for use as a valid HTML ID and guarantee uniqueness.
632
-   *
633
-   * @param $id
634
-   *   The ID to clean.
635
-   * @return
636
-   *   The cleaned ID.
637
-   */
638
-  function drupal_html_id($id) {
630
+    /**
631
+     * Prepare a string for use as a valid HTML ID and guarantee uniqueness.
632
+     *
633
+     * @param $id
634
+     *   The ID to clean.
635
+     * @return
636
+     *   The cleaned ID.
637
+     */
638
+    function drupal_html_id($id) {
639 639
     $id = strtr(drupal_strtolower($id), array(' ' => '-', '_' => '-', '[' => '-', ']' => ''));
640 640
 
641 641
     // As defined in http://www.w3.org/TR/html4/types.html#type-name, HTML IDs can
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
     $id = preg_replace('/[^A-Za-z0-9\-_]/', '', $id);
648 648
 
649 649
     return $id;
650
-  }
650
+    }
651 651
 } /* End of drupal_html_id conditional definition. */
652 652
 
653 653
 /**
@@ -657,12 +657,12 @@  discard block
 block discarded – undo
657 657
  * replace _zen_path() with drupal_get_path('theme', 'zen').
658 658
  */
659 659
 function _zen_path() {
660
-  static $path = FALSE;
661
-  if (!$path) {
660
+    static $path = FALSE;
661
+    if (!$path) {
662 662
     $matches = drupal_system_listing('zen\.info$', 'themes', 'name', 0);
663 663
     if (!empty($matches['zen']->filename)) {
664
-      $path = dirname($matches['zen']->filename);
664
+        $path = dirname($matches['zen']->filename);
665
+    }
665 666
     }
666
-  }
667
-  return $path;
667
+    return $path;
668 668
 }
Please login to merge, or discard this patch.
Switch Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -382,16 +382,16 @@  discard block
 block discarded – undo
382 382
   // Store the menu item since it has some useful information.
383 383
   $vars['menu_item'] = menu_get_item();
384 384
   switch ($vars['menu_item']['page_callback']) {
385
-    case 'views_page':
386
-      // Is this a Views page?
387
-      $vars['classes_array'][] = 'page-views';
388
-      break;
389
-    case 'page_manager_page_execute':
390
-    case 'page_manager_node_view':
391
-    case 'page_manager_contact_site':
392
-      // Is this a Panels page?
393
-      $vars['classes_array'][] = 'page-panels';
394
-      break;
385
+  case 'views_page':
386
+    // Is this a Views page?
387
+    $vars['classes_array'][] = 'page-views';
388
+    break;
389
+  case 'page_manager_page_execute':
390
+  case 'page_manager_node_view':
391
+  case 'page_manager_contact_site':
392
+    // Is this a Panels page?
393
+    $vars['classes_array'][] = 'page-panels';
394
+    break;
395 395
   }
396 396
 }
397 397
 
@@ -428,31 +428,31 @@  discard block
 block discarded – undo
428 428
 function zen_preprocess_node(&$vars, $hook) {
429 429
   // Create the build_mode variable.
430 430
   switch ($vars['node']->build_mode) {
431
-    case NODE_BUILD_NORMAL:
432
-      if ($vars['node']->build_mode === NODE_BUILD_NORMAL) {
433
-        $vars['build_mode'] = $vars['teaser'] ? 'teaser' : 'full';
434
-      }
435
-      else {
436
-        $vars['build_mode'] = $vars['node']->build_mode;
437
-      }
438
-      break;
439
-    case NODE_BUILD_PREVIEW:
440
-      $vars['build_mode'] = 'preview';
441
-      break;
442
-    case NODE_BUILD_SEARCH_INDEX:
443
-      $vars['build_mode'] = 'search_index';
444
-      break;
445
-    case NODE_BUILD_SEARCH_RESULT:
446
-      $vars['build_mode'] = 'search_result';
447
-      break;
448
-    case NODE_BUILD_RSS:
449
-      $vars['build_mode'] = 'rss';
450
-      break;
451
-    case NODE_BUILD_PRINT:
452
-      $vars['build_mode'] = 'print';
453
-      break;
454
-    default:
431
+  case NODE_BUILD_NORMAL:
432
+    if ($vars['node']->build_mode === NODE_BUILD_NORMAL) {
433
+      $vars['build_mode'] = $vars['teaser'] ? 'teaser' : 'full';
434
+    }
435
+    else {
455 436
       $vars['build_mode'] = $vars['node']->build_mode;
437
+    }
438
+    break;
439
+  case NODE_BUILD_PREVIEW:
440
+    $vars['build_mode'] = 'preview';
441
+    break;
442
+  case NODE_BUILD_SEARCH_INDEX:
443
+    $vars['build_mode'] = 'search_index';
444
+    break;
445
+  case NODE_BUILD_SEARCH_RESULT:
446
+    $vars['build_mode'] = 'search_result';
447
+    break;
448
+  case NODE_BUILD_RSS:
449
+    $vars['build_mode'] = 'rss';
450
+    break;
451
+  case NODE_BUILD_PRINT:
452
+    $vars['build_mode'] = 'print';
453
+    break;
454
+  default:
455
+    $vars['build_mode'] = $vars['node']->build_mode;
456 456
   }
457 457
 
458 458
   // Create the user_picture variable.
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
         if ($title = drupal_get_title()) {
54 54
           $trailing_separator = $breadcrumb_separator;
55 55
         }
56
-      }
57
-      elseif (theme_get_setting('zen_breadcrumb_trailing')) {
56
+      } elseif (theme_get_setting('zen_breadcrumb_trailing')) {
58 57
         $trailing_separator = $breadcrumb_separator;
59 58
       }
60 59
       return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "$trailing_separator$title</div>";
@@ -137,8 +136,7 @@  discard block
 block discarded – undo
137 136
       if (isset($link['href'])) {
138 137
         // Pass in $link as $options, they share the same keys.
139 138
         $output .= l($link['title'], $link['href'], $link);
140
-      }
141
-      else if (!empty($link['title'])) {
139
+      } else if (!empty($link['title'])) {
142 140
         // Some links are actually not links, but we wrap these in <span> for adding title and class attributes
143 141
         if (empty($link['html'])) {
144 142
           $link['title'] = check_plain($link['title']);
@@ -188,8 +186,7 @@  discard block
 block discarded – undo
188 186
     ctools_include('menu');
189 187
     $primary = ctools_menu_primary_local_tasks();
190 188
     $secondary = ctools_menu_secondary_local_tasks();
191
-  }
192
-  else {
189
+  } else {
193 190
     $primary = menu_primary_local_tasks();
194 191
     $secondary = menu_secondary_local_tasks();
195 192
   }
@@ -237,8 +234,7 @@  discard block
 block discarded – undo
237 234
       // Allow context module to set blocks.
238 235
       if (function_exists('context_blocks')) {
239 236
         $output = context_blocks($region);
240
-      }
241
-      else {
237
+      } else {
242 238
         foreach (block_list($region) as $key => $block) {
243 239
           // $key == module_delta
244 240
           $output .= theme('block', $block);
@@ -298,8 +294,7 @@  discard block
 block discarded – undo
298 294
       $vars['classes_array'] = explode(' ', $hook . ' ' . $vars[$key]);
299 295
       unset($vars[$key]);
300 296
     }
301
-  }
302
-  else {
297
+  } else {
303 298
     $vars['classes_array'] = array($hook);
304 299
   }
305 300
   // Add support for Skinr
@@ -344,8 +339,7 @@  discard block
 block discarded – undo
344 339
     if (arg(0) == 'node') {
345 340
       if (arg(1) == 'add') {
346 341
         $section = 'node-add';
347
-      }
348
-      elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) {
342
+      } elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) {
349 343
         $section = 'node-' . arg(2);
350 344
       }
351 345
     }
@@ -373,8 +367,7 @@  discard block
 block discarded – undo
373 367
     // Set the proper layout body classes.
374 368
     if ($vars['layout'] == 'both') {
375 369
       $vars['classes_array'][] = 'two-sidebars';
376
-    }
377
-    else {
370
+    } else {
378 371
       $vars['classes_array'][] = 'one-sidebar';
379 372
       $vars['classes_array'][] = 'sidebar-' . $vars['layout'];
380 373
     }
@@ -431,8 +424,7 @@  discard block
 block discarded – undo
431 424
     case NODE_BUILD_NORMAL:
432 425
       if ($vars['node']->build_mode === NODE_BUILD_NORMAL) {
433 426
         $vars['build_mode'] = $vars['teaser'] ? 'teaser' : 'full';
434
-      }
435
-      else {
427
+      } else {
436 428
         $vars['build_mode'] = $vars['node']->build_mode;
437 429
       }
438 430
       break;
@@ -473,8 +465,7 @@  discard block
 block discarded – undo
473 465
   if (!$vars['status']) {
474 466
     $vars['classes_array'][] = 'node-unpublished';
475 467
     $vars['unpublished'] = TRUE;
476
-  }
477
-  else {
468
+  } else {
478 469
     $vars['unpublished'] = FALSE;
479 470
   }
480 471
   if ($vars['uid'] && $vars['uid'] == $GLOBALS['user']->uid) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
   // If an item is a LOCAL TASK, render it as a tab
172 172
   if ($link['type'] & MENU_IS_LOCAL_TASK) {
173 173
     $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
174
-    $link['localized_options']['html'] = TRUE;
174
+    $link['localized_options']['html'] = true;
175 175
   }
176 176
 
177 177
   return l($link['title'], $link['href'], $link['localized_options']);
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
  *
218 218
  * @see zen_show_blocks_discovery()
219 219
  */
220
-function zen_blocks($region, $show_blocks = NULL) {
220
+function zen_blocks($region, $show_blocks = null) {
221 221
   // Since Drupal 6 doesn't pass $show_blocks to theme_blocks, we manually call
222 222
   // theme('blocks', NULL, $show_blocks) so that this function can remember the
223 223
   // value on later calls.
224
-  static $render_sidebars = TRUE;
224
+  static $render_sidebars = true;
225 225
   if (!is_null($show_blocks)) {
226 226
     $render_sidebars = $show_blocks;
227 227
   }
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
  * @see zen_blocks()
272 272
  */
273 273
 function zen_show_blocks_discovery(&$vars) {
274
-  if ($vars['show_blocks'] == FALSE) {
274
+  if ($vars['show_blocks'] == false) {
275 275
     // Allow zen_blocks() to statically cache the $show_blocks variable. A TRUE
276 276
     // value is assumed, so we only need to override when $show_blocks is FALSE.
277
-    theme('blocks', NULL, FALSE);
277
+    theme('blocks', null, false);
278 278
   }
279 279
 }
280 280
 
@@ -472,10 +472,10 @@  discard block
 block discarded – undo
472 472
   }
473 473
   if (!$vars['status']) {
474 474
     $vars['classes_array'][] = 'node-unpublished';
475
-    $vars['unpublished'] = TRUE;
475
+    $vars['unpublished'] = true;
476 476
   }
477 477
   else {
478
-    $vars['unpublished'] = FALSE;
478
+    $vars['unpublished'] = false;
479 479
   }
480 480
   if ($vars['uid'] && $vars['uid'] == $GLOBALS['user']->uid) {
481 481
     $vars['classes_array'][] = 'node-by-viewer'; // Node is authored by current user.
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
  * replace _zen_path() with drupal_get_path('theme', 'zen').
658 658
  */
659 659
 function _zen_path() {
660
-  static $path = FALSE;
660
+  static $path = false;
661 661
   if (!$path) {
662 662
     $matches = drupal_system_listing('zen\.info$', 'themes', 'name', 0);
663 663
     if (!empty($matches['zen']->filename)) {
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function zen_theme(&$existing, $type, $theme, $path) {
24 24
   // When #341140 is fixed, replace _zen_path() with drupal_get_path().
25
-  include_once './' . _zen_path() . '/zen-internals/template.theme-registry.inc';
25
+  include_once './'._zen_path().'/zen-internals/template.theme-registry.inc';
26 26
   return _zen_theme($existing, $type, $theme, $path);
27 27
 }
28 28
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
       elseif (theme_get_setting('zen_breadcrumb_trailing')) {
58 58
         $trailing_separator = $breadcrumb_separator;
59 59
       }
60
-      return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "$trailing_separator$title</div>";
60
+      return '<div class="breadcrumb">'.implode($breadcrumb_separator, $breadcrumb)."$trailing_separator$title</div>";
61 61
     }
62 62
   }
63 63
   // Otherwise, return an empty string.
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
           'level' => 'h2',
107 107
         );
108 108
       }
109
-      $output .= '<' . $heading['level'];
109
+      $output .= '<'.$heading['level'];
110 110
       if (!empty($heading['class'])) {
111 111
         $output .= drupal_attributes(array('class' => $heading['class']));
112 112
       }
113
-      $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>';
113
+      $output .= '>'.check_plain($heading['text']).'</'.$heading['level'].'>';
114 114
     }
115 115
 
116
-    $output .= '<ul'. drupal_attributes($attributes) .'>';
116
+    $output .= '<ul'.drupal_attributes($attributes).'>';
117 117
 
118 118
     $num_links = count($links);
119 119
     $i = 1;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
           && (empty($link['language']) || $link['language']->language == $language->language)) {
133 133
         $class .= ' active';
134 134
       }
135
-      $output .= '<li'. drupal_attributes(array('class' => $class)) .'>';
135
+      $output .= '<li'.drupal_attributes(array('class' => $class)).'>';
136 136
 
137 137
       if (isset($link['href'])) {
138 138
         // Pass in $link as $options, they share the same keys.
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         if (isset($link['attributes'])) {
148 148
           $span_attributes = drupal_attributes($link['attributes']);
149 149
         }
150
-        $output .= '<span'. $span_attributes .'>'. $link['title'] .'</span>';
150
+        $output .= '<span'.$span_attributes.'>'.$link['title'].'</span>';
151 151
       }
152 152
 
153 153
       $i++;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
   // If an item is a LOCAL TASK, render it as a tab
172 172
   if ($link['type'] & MENU_IS_LOCAL_TASK) {
173
-    $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
173
+    $link['title'] = '<span class="tab">'.check_plain($link['title']).'</span>';
174 174
     $link['localized_options']['html'] = TRUE;
175 175
   }
176 176
 
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
   }
196 196
 
197 197
   if ($primary) {
198
-    $output .= '<ul class="tabs primary clearfix">' . $primary . '</ul>';
198
+    $output .= '<ul class="tabs primary clearfix">'.$primary.'</ul>';
199 199
   }
200 200
   if ($secondary) {
201
-    $output .= '<ul class="tabs secondary clearfix">' . $secondary . '</ul>';
201
+    $output .= '<ul class="tabs secondary clearfix">'.$secondary.'</ul>';
202 202
   }
203 203
 
204 204
   return $output;
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     $elements['#region'] = $region;
254 254
 
255 255
     // Set the theme hook suggestions.
256
-    $hook = array('region_' . $region);
256
+    $hook = array('region_'.$region);
257 257
     if (strpos($region, 'sidebar_') === 0) {
258 258
       $hook[] = 'region_sidebar';
259 259
     }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     // Views (and possibly other modules) have templates with a $classes
296 296
     // variable that isn't a string, so we leave those variables alone.
297 297
     if (is_string($vars[$key])) {
298
-      $vars['classes_array'] = explode(' ', $hook . ' ' . $vars[$key]);
298
+      $vars['classes_array'] = explode(' ', $hook.' '.$vars[$key]);
299 299
       unset($vars[$key]);
300 300
     }
301 301
   }
@@ -319,37 +319,37 @@  discard block
 block discarded – undo
319 319
 function zen_preprocess_page(&$vars, $hook) {
320 320
   // If the user is silly and enables Zen as the theme, add some styles.
321 321
   if ($GLOBALS['theme'] == 'zen') {
322
-    include_once './' . _zen_path() . '/zen-internals/template.zen.inc';
322
+    include_once './'._zen_path().'/zen-internals/template.zen.inc';
323 323
     _zen_preprocess_page($vars, $hook);
324 324
   }
325 325
   // Add conditional stylesheets.
326 326
   elseif (!module_exists('conditional_styles')) {
327 327
     $language = $GLOBALS['language']->direction == LANGUAGE_RTL ? '_rtl' : '';
328
-    $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'] . $language, '');
328
+    $vars['conditional_styles'] = variable_get('conditional_styles_'.$GLOBALS['theme'].$language, '');
329 329
     $vars['styles'] .= $vars['conditional_styles'];
330 330
   }
331 331
 
332 332
   // Classes for body element. Allows advanced theming based on context
333 333
   // (home page, node of certain type, etc.)
334 334
   // Remove the mostly useless page-ARG0 class.
335
-  if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. drupal_strtolower(arg(0))), $vars['classes_array'])) {
335
+  if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'.drupal_strtolower(arg(0))), $vars['classes_array'])) {
336 336
     unset($vars['classes_array'][$index]);
337 337
   }
338 338
   if (!$vars['is_front']) {
339 339
     // Add unique class for each page.
340 340
     $path = drupal_get_path_alias($_GET['q']);
341
-    $vars['classes_array'][] = drupal_html_class('page-' . $path);
341
+    $vars['classes_array'][] = drupal_html_class('page-'.$path);
342 342
     // Add unique class for each website section.
343
-    list($section, ) = explode('/', $path, 2);
343
+    list($section,) = explode('/', $path, 2);
344 344
     if (arg(0) == 'node') {
345 345
       if (arg(1) == 'add') {
346 346
         $section = 'node-add';
347 347
       }
348 348
       elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) {
349
-        $section = 'node-' . arg(2);
349
+        $section = 'node-'.arg(2);
350 350
       }
351 351
     }
352
-    $vars['classes_array'][] = drupal_html_class('section-' . $section);
352
+    $vars['classes_array'][] = drupal_html_class('section-'.$section);
353 353
   }
354 354
   if (theme_get_setting('zen_wireframes')) {
355 355
     $vars['classes_array'][] = 'with-wireframes'; // Optionally add the wireframes style.
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
     }
377 377
     else {
378 378
       $vars['classes_array'][] = 'one-sidebar';
379
-      $vars['classes_array'][] = 'sidebar-' . $vars['layout'];
379
+      $vars['classes_array'][] = 'sidebar-'.$vars['layout'];
380 380
     }
381 381
   }
382 382
   // Store the menu item since it has some useful information.
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
 function zen_preprocess_maintenance_page(&$vars, $hook) {
407 407
   // If Zen is the maintenance theme, add some styles.
408 408
   if ($GLOBALS['theme'] == 'zen') {
409
-    include_once './' . _zen_path() . '/zen-internals/template.zen.inc';
409
+    include_once './'._zen_path().'/zen-internals/template.zen.inc';
410 410
     _zen_preprocess_page($vars, $hook);
411 411
   }
412 412
   // Add conditional stylesheets.
413 413
   elseif (!module_exists('conditional_styles')) {
414 414
     $language = $GLOBALS['language']->direction == LANGUAGE_RTL ? '_rtl' : '';
415
-    $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'] . $language, '');
415
+    $vars['conditional_styles'] = variable_get('conditional_styles_'.$GLOBALS['theme'].$language, '');
416 416
     $vars['styles'] .= $vars['conditional_styles'];
417 417
   }
418 418
 }
@@ -459,11 +459,11 @@  discard block
 block discarded – undo
459 459
   $vars['user_picture'] = $vars['picture'];
460 460
 
461 461
   // Create the Drupal 7 $display_submitted variable.
462
-  $vars['display_submitted'] = theme_get_setting('toggle_node_info_' . $vars['node']->type);
462
+  $vars['display_submitted'] = theme_get_setting('toggle_node_info_'.$vars['node']->type);
463 463
 
464 464
   // Special classes for nodes.
465 465
   // Class for node type: "node-type-page", "node-type-story", "node-type-my-custom-type", etc.
466
-  $vars['classes_array'][] = drupal_html_class('node-type-' . $vars['type']);
466
+  $vars['classes_array'][] = drupal_html_class('node-type-'.$vars['type']);
467 467
   if ($vars['promote']) {
468 468
     $vars['classes_array'][] = 'node-promoted';
469 469
   }
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
   if (isset($vars['preview'])) {
487 487
     $vars['classes_array'][] = 'node-preview';
488 488
   }
489
-  $vars['classes_array'][] = 'build-mode-' . $vars['build_mode'] ;
489
+  $vars['classes_array'][] = 'build-mode-'.$vars['build_mode'];
490 490
 }
491 491
 
492 492
 /**
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
  *   The name of the template being rendered ("comment" in this case.)
499 499
  */
500 500
 function zen_preprocess_comment(&$vars, $hook) {
501
-  include_once './' . _zen_path() . '/zen-internals/template.comment.inc';
501
+  include_once './'._zen_path().'/zen-internals/template.comment.inc';
502 502
   _zen_preprocess_comment($vars, $hook);
503 503
 }
504 504
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
   $vars['region'] = $vars['elements']['#region'];
517 517
 
518 518
   // Setup the default classes.
519
-  $vars['classes_array'] = array('region', 'region-' . str_replace('_', '-', $vars['region']));
519
+  $vars['classes_array'] = array('region', 'region-'.str_replace('_', '-', $vars['region']));
520 520
 
521 521
   // Sidebar regions get a couple extra classes.
522 522
   if (strpos($vars['region'], 'sidebar_') === 0) {
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
   $vars['title'] = $block->subject;
543 543
 
544 544
   // Special classes for blocks.
545
-  $vars['classes_array'][] = 'block-' . $block->module;
545
+  $vars['classes_array'][] = 'block-'.$block->module;
546 546
   // Classes describing the position of the block within the region.
547 547
   if ($vars['block_id'] == 1) {
548 548
     $vars['classes_array'][] = 'first';
@@ -550,17 +550,17 @@  discard block
 block discarded – undo
550 550
   if (!function_exists('context_blocks') && count(block_list($vars['block']->region)) == $vars['block_id']) {
551 551
     $vars['classes_array'][] = 'last';
552 552
   }
553
-  $vars['classes_array'][] = 'region-' . $vars['block_zebra'];
553
+  $vars['classes_array'][] = 'region-'.$vars['block_zebra'];
554 554
   $vars['classes_array'][] = $vars['zebra'];
555
-  $vars['classes_array'][] = 'region-count-' . $vars['block_id'];
556
-  $vars['classes_array'][] = 'count-' . $vars['id'];
555
+  $vars['classes_array'][] = 'region-count-'.$vars['block_id'];
556
+  $vars['classes_array'][] = 'count-'.$vars['id'];
557 557
 
558 558
   // Create the block ID.
559
-  $vars['block_html_id'] = 'block-' . $block->module . '-' . $block->delta;
559
+  $vars['block_html_id'] = 'block-'.$block->module.'-'.$block->delta;
560 560
 
561 561
   $vars['edit_links_array'] = array();
562 562
   if (theme_get_setting('zen_block_editing') && user_access('administer blocks')) {
563
-    include_once './' . _zen_path() . '/zen-internals/template.block-editing.inc';
563
+    include_once './'._zen_path().'/zen-internals/template.block-editing.inc';
564 564
     zen_preprocess_block_editing($vars, $hook);
565 565
     $vars['classes_array'][] = 'with-block-editing';
566 566
   }
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
  *   The name of the template being rendered ("block" in this case.)
591 591
  */
592 592
 function zen_process_block(&$vars, $hook) {
593
-  $vars['edit_links'] = !empty($vars['edit_links_array']) ? '<div class="edit">' . implode(' ', $vars['edit_links_array']) . '</div>' : '';
593
+  $vars['edit_links'] = !empty($vars['edit_links_array']) ? '<div class="edit">'.implode(' ', $vars['edit_links_array']).'</div>' : '';
594 594
 }
595 595
 
596 596
 if (!function_exists('drupal_html_class')) {
Please login to merge, or discard this patch.
drupal/sites/all/themes/zen/theme-settings.php 2 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -15,51 +15,51 @@  discard block
 block discarded – undo
15 15
  */
16 16
 function zen_settings($saved_settings, $subtheme_defaults = array()) {
17 17
 
18
-  // Add the form's CSS
19
-  drupal_add_css(drupal_get_path('theme', 'zen') . '/zen-internals/css/theme-settings.css', 'theme');
18
+    // Add the form's CSS
19
+    drupal_add_css(drupal_get_path('theme', 'zen') . '/zen-internals/css/theme-settings.css', 'theme');
20 20
 
21
-  // Add javascript to show/hide optional settings
22
-  drupal_add_js(drupal_get_path('theme', 'zen') . '/zen-internals/js/theme-settings.js', 'theme');
21
+    // Add javascript to show/hide optional settings
22
+    drupal_add_js(drupal_get_path('theme', 'zen') . '/zen-internals/js/theme-settings.js', 'theme');
23 23
 
24
-  // Get the default values from the .info file.
25
-  $defaults = zen_theme_get_default_settings('zen');
24
+    // Get the default values from the .info file.
25
+    $defaults = zen_theme_get_default_settings('zen');
26 26
 
27
-  // Allow a subtheme to override the default values.
28
-  $defaults = array_merge($defaults, $subtheme_defaults);
27
+    // Allow a subtheme to override the default values.
28
+    $defaults = array_merge($defaults, $subtheme_defaults);
29 29
 
30
-  // Merge the saved variables and their default values.
31
-  $settings = array_merge($defaults, $saved_settings);
30
+    // Merge the saved variables and their default values.
31
+    $settings = array_merge($defaults, $saved_settings);
32 32
 
33
-  /*
33
+    /*
34 34
    * Create the form using Forms API
35 35
    */
36
-  $form['zen-div-opening'] = array(
36
+    $form['zen-div-opening'] = array(
37 37
     '#value'         => '<div id="zen-settings">',
38
-  );
38
+    );
39 39
 
40
-  $form['zen_block_editing'] = array(
40
+    $form['zen_block_editing'] = array(
41 41
     '#type'          => 'checkbox',
42 42
     '#title'         => t('Show block editing on hover'),
43 43
     '#description'   => t('When hovering over a block, privileged users will see block editing links.'),
44 44
     '#default_value' => $settings['zen_block_editing'],
45
-  );
45
+    );
46 46
 
47
-  $form['breadcrumb'] = array(
47
+    $form['breadcrumb'] = array(
48 48
     '#type'          => 'fieldset',
49 49
     '#title'         => t('Breadcrumb settings'),
50 50
     '#attributes'    => array('id' => 'zen-breadcrumb'),
51
-  );
52
-  $form['breadcrumb']['zen_breadcrumb'] = array(
51
+    );
52
+    $form['breadcrumb']['zen_breadcrumb'] = array(
53 53
     '#type'          => 'select',
54 54
     '#title'         => t('Display breadcrumb'),
55 55
     '#default_value' => $settings['zen_breadcrumb'],
56 56
     '#options'       => array(
57
-                          'yes'   => t('Yes'),
58
-                          'admin' => t('Only in admin section'),
59
-                          'no'    => t('No'),
57
+                            'yes'   => t('Yes'),
58
+                            'admin' => t('Only in admin section'),
59
+                            'no'    => t('No'),
60 60
                         ),
61
-  );
62
-  $form['breadcrumb']['zen_breadcrumb_separator'] = array(
61
+    );
62
+    $form['breadcrumb']['zen_breadcrumb_separator'] = array(
63 63
     '#type'          => 'textfield',
64 64
     '#title'         => t('Breadcrumb separator'),
65 65
     '#description'   => t('Text only. Don’t forget to include spaces.'),
@@ -67,61 +67,61 @@  discard block
 block discarded – undo
67 67
     '#size'          => 5,
68 68
     '#maxlength'     => 10,
69 69
     '#prefix'        => '<div id="div-zen-breadcrumb-collapse">', // jquery hook to show/hide optional widgets
70
-  );
71
-  $form['breadcrumb']['zen_breadcrumb_home'] = array(
70
+    );
71
+    $form['breadcrumb']['zen_breadcrumb_home'] = array(
72 72
     '#type'          => 'checkbox',
73 73
     '#title'         => t('Show home page link in breadcrumb'),
74 74
     '#default_value' => $settings['zen_breadcrumb_home'],
75
-  );
76
-  $form['breadcrumb']['zen_breadcrumb_trailing'] = array(
75
+    );
76
+    $form['breadcrumb']['zen_breadcrumb_trailing'] = array(
77 77
     '#type'          => 'checkbox',
78 78
     '#title'         => t('Append a separator to the end of the breadcrumb'),
79 79
     '#default_value' => $settings['zen_breadcrumb_trailing'],
80 80
     '#description'   => t('Useful when the breadcrumb is placed just before the title.'),
81
-  );
82
-  $form['breadcrumb']['zen_breadcrumb_title'] = array(
81
+    );
82
+    $form['breadcrumb']['zen_breadcrumb_title'] = array(
83 83
     '#type'          => 'checkbox',
84 84
     '#title'         => t('Append the content title to the end of the breadcrumb'),
85 85
     '#default_value' => $settings['zen_breadcrumb_title'],
86 86
     '#description'   => t('Useful when the breadcrumb is not placed just before the title.'),
87 87
     '#suffix'        => '</div>', // #div-zen-breadcrumb
88
-  );
88
+    );
89 89
 
90
-  $form['themedev'] = array(
90
+    $form['themedev'] = array(
91 91
     '#type'          => 'fieldset',
92 92
     '#title'         => t('Theme development settings'),
93 93
     '#attributes'    => array('id' => 'zen-themedev'),
94
-  );
95
-  $form['themedev']['zen_rebuild_registry'] = array(
94
+    );
95
+    $form['themedev']['zen_rebuild_registry'] = array(
96 96
     '#type'          => 'checkbox',
97 97
     '#title'         => t('Rebuild theme registry on every page.'),
98 98
     '#default_value' => $settings['zen_rebuild_registry'],
99 99
     '#description'   => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a>. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'http://drupal.org/node/173880#theme-registry')),
100 100
     '#prefix'        => '<div id="div-zen-registry"><strong>' . t('Theme registry:') . '</strong>',
101 101
     '#suffix'        => '</div>',
102
-  );
103
-  $form['themedev']['zen_layout'] = array(
102
+    );
103
+    $form['themedev']['zen_layout'] = array(
104 104
     '#type'          => 'radios',
105 105
     '#title'         => t('Layout method'),
106 106
     '#options'       => array(
107
-                          'zen-columns-liquid' => t('Liquid layout') . ' <small>(layout-liquid.css)</small>',
108
-                          'zen-columns-fixed' => t('Fixed layout') . ' <small>(layout-fixed.css)</small>',
107
+                            'zen-columns-liquid' => t('Liquid layout') . ' <small>(layout-liquid.css)</small>',
108
+                            'zen-columns-fixed' => t('Fixed layout') . ' <small>(layout-fixed.css)</small>',
109 109
                         ),
110 110
     '#default_value' => $settings['zen_layout'],
111
-  );
112
-  $form['themedev']['zen_wireframes'] = array(
111
+    );
112
+    $form['themedev']['zen_wireframes'] = array(
113 113
     '#type'          => 'checkbox',
114 114
     '#title'         => t('Display borders around main layout elements'),
115 115
     '#default_value' => $settings['zen_wireframes'],
116 116
     '#description'   => t('<a href="!link">Wireframes</a> are useful when prototyping a website.', array('!link' => 'http://www.boxesandarrows.com/view/html_wireframes_and_prototypes_all_gain_and_no_pain')),
117 117
     '#prefix'        => '<div id="div-zen-wireframes"><strong>' . t('Wireframes:') . '</strong>',
118 118
     '#suffix'        => '</div>',
119
-  );
119
+    );
120 120
 
121
-  $form['zen-div-closing'] = array(
121
+    $form['zen-div-closing'] = array(
122 122
     '#value'         => '</div>',
123
-  );
123
+    );
124 124
 
125
-  // Return the form
126
-  return $form;
125
+    // Return the form
126
+    return $form;
127 127
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // Include the definition of zen_theme_get_default_settings().
3
-include_once './' . drupal_get_path('theme', 'zen') . '/zen-internals/template.theme-registry.inc';
3
+include_once './'.drupal_get_path('theme', 'zen').'/zen-internals/template.theme-registry.inc';
4 4
 
5 5
 
6 6
 /**
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
 function zen_settings($saved_settings, $subtheme_defaults = array()) {
17 17
 
18 18
   // Add the form's CSS
19
-  drupal_add_css(drupal_get_path('theme', 'zen') . '/zen-internals/css/theme-settings.css', 'theme');
19
+  drupal_add_css(drupal_get_path('theme', 'zen').'/zen-internals/css/theme-settings.css', 'theme');
20 20
 
21 21
   // Add javascript to show/hide optional settings
22
-  drupal_add_js(drupal_get_path('theme', 'zen') . '/zen-internals/js/theme-settings.js', 'theme');
22
+  drupal_add_js(drupal_get_path('theme', 'zen').'/zen-internals/js/theme-settings.js', 'theme');
23 23
 
24 24
   // Get the default values from the .info file.
25 25
   $defaults = zen_theme_get_default_settings('zen');
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
     '#title'         => t('Rebuild theme registry on every page.'),
98 98
     '#default_value' => $settings['zen_rebuild_registry'],
99 99
     '#description'   => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a>. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'http://drupal.org/node/173880#theme-registry')),
100
-    '#prefix'        => '<div id="div-zen-registry"><strong>' . t('Theme registry:') . '</strong>',
100
+    '#prefix'        => '<div id="div-zen-registry"><strong>'.t('Theme registry:').'</strong>',
101 101
     '#suffix'        => '</div>',
102 102
   );
103 103
   $form['themedev']['zen_layout'] = array(
104 104
     '#type'          => 'radios',
105 105
     '#title'         => t('Layout method'),
106 106
     '#options'       => array(
107
-                          'zen-columns-liquid' => t('Liquid layout') . ' <small>(layout-liquid.css)</small>',
108
-                          'zen-columns-fixed' => t('Fixed layout') . ' <small>(layout-fixed.css)</small>',
107
+                          'zen-columns-liquid' => t('Liquid layout').' <small>(layout-liquid.css)</small>',
108
+                          'zen-columns-fixed' => t('Fixed layout').' <small>(layout-fixed.css)</small>',
109 109
                         ),
110 110
     '#default_value' => $settings['zen_layout'],
111 111
   );
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     '#title'         => t('Display borders around main layout elements'),
115 115
     '#default_value' => $settings['zen_wireframes'],
116 116
     '#description'   => t('<a href="!link">Wireframes</a> are useful when prototyping a website.', array('!link' => 'http://www.boxesandarrows.com/view/html_wireframes_and_prototypes_all_gain_and_no_pain')),
117
-    '#prefix'        => '<div id="div-zen-wireframes"><strong>' . t('Wireframes:') . '</strong>',
117
+    '#prefix'        => '<div id="div-zen-wireframes"><strong>'.t('Wireframes:').'</strong>',
118 118
     '#suffix'        => '</div>',
119 119
   );
120 120
 
Please login to merge, or discard this patch.
drupal/sites/all/themes/zen/STARTERKIT/template.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,13 +65,13 @@
 block discarded – undo
65 65
  * Implementation of HOOK_theme().
66 66
  */
67 67
 function STARTERKIT_theme(&$existing, $type, $theme, $path) {
68
-  $hooks = zen_theme($existing, $type, $theme, $path);
69
-  // Add your theme hooks like this:
70
-  /*
68
+    $hooks = zen_theme($existing, $type, $theme, $path);
69
+    // Add your theme hooks like this:
70
+    /*
71 71
   $hooks['hook_name_here'] = array( // Details go here );
72 72
   */
73
-  // @TODO: Needs detailed comments. Patches welcome!
74
-  return $hooks;
73
+    // @TODO: Needs detailed comments. Patches welcome!
74
+    return $hooks;
75 75
 }
76 76
 
77 77
 /**
Please login to merge, or discard this patch.
drupal/sites/all/themes/zen/STARTERKIT/theme-settings.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@  discard block
 block discarded – undo
13 13
  */
14 14
 function STARTERKIT_settings($saved_settings) {
15 15
 
16
-  // Get the default values from the .info file.
17
-  $defaults = zen_theme_get_default_settings('STARTERKIT');
16
+    // Get the default values from the .info file.
17
+    $defaults = zen_theme_get_default_settings('STARTERKIT');
18 18
 
19
-  // Merge the saved variables and their default values.
20
-  $settings = array_merge($defaults, $saved_settings);
19
+    // Merge the saved variables and their default values.
20
+    $settings = array_merge($defaults, $saved_settings);
21 21
 
22
-  /*
22
+    /*
23 23
    * Create the form using Forms API: http://api.drupal.org/api/6
24 24
    */
25
-  $form = array();
26
-  /* -- Delete this line if you want to use this setting
25
+    $form = array();
26
+    /* -- Delete this line if you want to use this setting
27 27
   $form['STARTERKIT_example'] = array(
28 28
     '#type'          => 'checkbox',
29 29
     '#title'         => t('Use this sample setting'),
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
   );
33 33
   // */
34 34
 
35
-  // Add the base theme's settings.
36
-  $form += zen_settings($saved_settings, $defaults);
35
+    // Add the base theme's settings.
36
+    $form += zen_settings($saved_settings, $defaults);
37 37
 
38
-  // Remove some of the base theme's settings.
39
-  unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
38
+    // Remove some of the base theme's settings.
39
+    unset($form['themedev']['zen_layout']); // We don't need to select the base stylesheet.
40 40
 
41
-  // Return the form
42
-  return $form;
41
+    // Return the form
42
+    return $form;
43 43
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 // Include the definition of zen_settings() and zen_theme_get_default_settings().
3
-include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php';
3
+include_once './'.drupal_get_path('theme', 'zen').'/theme-settings.php';
4 4
 
5 5
 
6 6
 /**
Please login to merge, or discard this patch.
html/user/merge_by_name.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         }
41 41
         $error = merge_hosts($host, $newest_host);
42 42
         if (!$error) {
43
-            echo "<br>".tra("Merged %1 into %2",$host->id,$newest_host->id)."\n";
43
+            echo "<br>".tra("Merged %1 into %2", $host->id, $newest_host->id)."\n";
44 44
         } else {
45 45
             echo "<br>$error\n";
46 46
         }
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 function merge_by_name($userid) {
53 53
     $hosts = array();
54 54
     $host_list = BoincHost::enum("userid=$userid");
55
-    foreach($host_list as $host) {
55
+    foreach ($host_list as $host) {
56 56
         $hosts[$host->domain_name][] = $host;
57 57
     }
58
-    foreach($hosts as $hlist) {
58
+    foreach ($hosts as $hlist) {
59 59
         merge_name($hlist);
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
html/user/host_edit_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 $nhosts = get_int("nhosts");
42 42
 $hostid = get_int("id_0");
43 43
 $latest_host = get_host($hostid, $user);
44
-for ($i=1; $i<$nhosts; $i++) {
44
+for ($i = 1; $i < $nhosts; $i++) {
45 45
     $var = "id_$i";
46 46
     $hostid = get_int($var, true);
47 47
     if (!$hostid) continue;
Please login to merge, or discard this patch.
html/user/team_edit_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 if (!is_valid_country($country)) {
55 55
     error_page(tra("bad country"));
56 56
 }
57
-$joinable = post_str('joinable', true)?1:0;
57
+$joinable = post_str('joinable', true) ? 1 : 0;
58 58
 
59 59
 $t = BoincTeam::lookup("name='$team_name'");
60 60
 if ($t && $t->id != $teamid) {
Please login to merge, or discard this patch.