@@ -94,13 +94,11 @@ |
||
94 | 94 | if (db_is_active()) { |
95 | 95 | variable_set('conditional_styles_' . $theme, $conditional_styles); |
96 | 96 | variable_set('conditional_styles_' . $theme . '_rtl', $conditional_styles_rtl); |
97 | - } |
|
98 | - else { |
|
97 | + } else { |
|
99 | 98 | $GLOBALS['conf']['conditional_styles_' . $theme] = $conditional_styles; |
100 | 99 | $GLOBALS['conf']['conditional_styles_' . $theme . '_rtl'] = $conditional_styles_rtl; |
101 | 100 | } |
102 | - } |
|
103 | - elseif (db_is_active()) { |
|
101 | + } elseif (db_is_active()) { |
|
104 | 102 | variable_del('conditional_styles_' . $theme); |
105 | 103 | variable_del('conditional_styles_' . $theme . '_rtl'); |
106 | 104 | } |
@@ -122,8 +122,7 @@ |
||
122 | 122 | // Save the settings back to the database. |
123 | 123 | if (db_is_active()) { |
124 | 124 | variable_set('theme_'. $theme .'_settings', $settings); |
125 | - } |
|
126 | - else { |
|
125 | + } else { |
|
127 | 126 | $GLOBALS['conf']['theme_'. $theme .'_settings'] = $settings; |
128 | 127 | } |
129 | 128 | // If the active theme has been loaded, force refresh of Drupal internals. |
@@ -19,8 +19,7 @@ |
||
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. |
@@ -29,8 +29,7 @@ discard block |
||
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 |
||
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'; |
@@ -53,8 +53,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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) { |
@@ -20,7 +20,9 @@ discard block |
||
20 | 20 | require_once("../inc/util.inc"); |
21 | 21 | require_once("../inc/team.inc"); |
22 | 22 | |
23 | -if (DISABLE_TEAMS) error_page("Teams are disabled"); |
|
23 | +if (DISABLE_TEAMS) { |
|
24 | + error_page("Teams are disabled"); |
|
25 | +} |
|
24 | 26 | |
25 | 27 | check_get_args(array("teamid")); |
26 | 28 | |
@@ -28,7 +30,9 @@ discard block |
||
28 | 30 | |
29 | 31 | $teamid = get_int("teamid"); |
30 | 32 | $team = BoincTeam::lookup_id($teamid); |
31 | -if (!$team) error_page(tra("no such team")); |
|
33 | +if (!$team) { |
|
34 | + error_page(tra("no such team")); |
|
35 | +} |
|
32 | 36 | require_admin($user, $team); |
33 | 37 | |
34 | 38 | $team_name = strtr($team->name, '"', "'"); |
@@ -28,7 +28,9 @@ |
||
28 | 28 | xml_header(); |
29 | 29 | |
30 | 30 | $retval = db_init_xml(); |
31 | -if ($retval) xml_error($retval); |
|
31 | +if ($retval) { |
|
32 | + xml_error($retval); |
|
33 | +} |
|
32 | 34 | |
33 | 35 | $config = get_config(); |
34 | 36 | if (parse_bool($config, "disable_account_creation")) { |
@@ -20,7 +20,9 @@ discard block |
||
20 | 20 | require_once("../inc/util.inc"); |
21 | 21 | require_once("../inc/team.inc"); |
22 | 22 | |
23 | -if (DISABLE_TEAMS) error_page("Teams are disabled"); |
|
23 | +if (DISABLE_TEAMS) { |
|
24 | + error_page("Teams are disabled"); |
|
25 | +} |
|
24 | 26 | |
25 | 27 | check_get_args(array("teamid", "action", "tnow", "ttok")); |
26 | 28 | |
@@ -84,7 +86,9 @@ discard block |
||
84 | 86 | $user = get_logged_in_user(true); |
85 | 87 | $teamid = get_int('teamid'); |
86 | 88 | $team = BoincTeam::lookup_id($teamid); |
87 | -if (!$team) error_page(tra("No such team")); |
|
89 | +if (!$team) { |
|
90 | + error_page(tra("No such team")); |
|
91 | +} |
|
88 | 92 | |
89 | 93 | $action = get_str('action', true); |
90 | 94 | if ($action == 'delete') { |
@@ -23,7 +23,9 @@ |
||
23 | 23 | require_once('../inc/util.inc'); |
24 | 24 | require_once('../inc/forum.inc'); |
25 | 25 | |
26 | -if (DISABLE_FORUMS) error_page("Forums are disabled"); |
|
26 | +if (DISABLE_FORUMS) { |
|
27 | + error_page("Forums are disabled"); |
|
28 | +} |
|
27 | 29 | |
28 | 30 | check_get_args(array("id", "action", "userid", "tnow", "ttok")); |
29 | 31 |