@@ -10,63 +10,63 @@ discard block |
||
10 | 10 | * We are simply using this hook as a convenient time to do some related work. |
11 | 11 | */ |
12 | 12 | function _zen_theme(&$existing, $type, $theme, $path) { |
13 | - // Compute the conditional stylesheets. |
|
14 | - if (!module_exists('conditional_styles')) { |
|
13 | + // Compute the conditional stylesheets. |
|
14 | + if (!module_exists('conditional_styles')) { |
|
15 | 15 | include_once './' . _zen_path() . '/zen-internals/template.conditional-styles.inc'; |
16 | 16 | // _conditional_styles_theme() only needs to be run once. |
17 | 17 | if ($theme == 'zen') { |
18 | - _conditional_styles_theme($existing, $type, $theme, $path); |
|
18 | + _conditional_styles_theme($existing, $type, $theme, $path); |
|
19 | + } |
|
19 | 20 | } |
20 | - } |
|
21 | 21 | |
22 | - // Since we are rebuilding the theme registry and the theme settings' default |
|
23 | - // values may have changed, make sure they are saved in the database properly. |
|
24 | - zen_theme_get_default_settings($theme); |
|
22 | + // Since we are rebuilding the theme registry and the theme settings' default |
|
23 | + // values may have changed, make sure they are saved in the database properly. |
|
24 | + zen_theme_get_default_settings($theme); |
|
25 | 25 | |
26 | - // If we are auto-rebuilding the theme registry, warn about the feature. |
|
27 | - // Always display the warning in the admin section, otherwise limit to three |
|
28 | - // warnings per hour. |
|
29 | - if (function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('zen_rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'] . '_rebuild_registry_warning', 3))) { |
|
26 | + // If we are auto-rebuilding the theme registry, warn about the feature. |
|
27 | + // Always display the warning in the admin section, otherwise limit to three |
|
28 | + // warnings per hour. |
|
29 | + if (function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('zen_rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'] . '_rebuild_registry_warning', 3))) { |
|
30 | 30 | flood_register_event($GLOBALS['theme'] . '_rebuild_registry_warning'); |
31 | 31 | drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href="!link">turn off this feature</a> on production websites.', array('!link' => url('admin/build/themes/settings/' . $GLOBALS['theme']))), 'warning', FALSE); |
32 | - } |
|
32 | + } |
|
33 | 33 | |
34 | - // Keep track of all the base themes. |
|
35 | - static $base_themes = array(); |
|
36 | - $base_themes[] = $theme; |
|
34 | + // Keep track of all the base themes. |
|
35 | + static $base_themes = array(); |
|
36 | + $base_themes[] = $theme; |
|
37 | 37 | |
38 | - // Add a "process" phase to come after the "preprocess" functions. |
|
39 | - if ($type == 'theme') { |
|
38 | + // Add a "process" phase to come after the "preprocess" functions. |
|
39 | + if ($type == 'theme') { |
|
40 | 40 | foreach (array_keys($existing) as $hook) { |
41 | - // Normally, preprocess functions are added to the registry after |
|
42 | - // HOOK_theme() returns, but if we add them first, they won't be re-added. |
|
43 | - if (function_exists($theme . '_preprocess')) { |
|
41 | + // Normally, preprocess functions are added to the registry after |
|
42 | + // HOOK_theme() returns, but if we add them first, they won't be re-added. |
|
43 | + if (function_exists($theme . '_preprocess')) { |
|
44 | 44 | $existing[$hook]['preprocess functions'][] = $theme . '_preprocess'; |
45 | - } |
|
46 | - if (function_exists($theme . '_preprocess_' . $hook)) { |
|
45 | + } |
|
46 | + if (function_exists($theme . '_preprocess_' . $hook)) { |
|
47 | 47 | $existing[$hook]['preprocess functions'][] = $theme . '_preprocess_' . $hook; |
48 | - } |
|
49 | - // Add base theme process functions. |
|
50 | - foreach ($base_themes as $base_theme) { |
|
48 | + } |
|
49 | + // Add base theme process functions. |
|
50 | + foreach ($base_themes as $base_theme) { |
|
51 | 51 | if (function_exists($base_theme . '_process')) { |
52 | - $existing[$hook]['preprocess functions'][] = $base_theme . '_process'; |
|
52 | + $existing[$hook]['preprocess functions'][] = $base_theme . '_process'; |
|
53 | 53 | } |
54 | 54 | if (function_exists($base_theme . '_process_' . $hook)) { |
55 | - $existing[$hook]['preprocess functions'][] = $base_theme . '_process_' . $hook; |
|
55 | + $existing[$hook]['preprocess functions'][] = $base_theme . '_process_' . $hook; |
|
56 | + } |
|
56 | 57 | } |
57 | - } |
|
58 | - // Add the theme process functions. |
|
59 | - if (function_exists($theme . '_process')) { |
|
58 | + // Add the theme process functions. |
|
59 | + if (function_exists($theme . '_process')) { |
|
60 | 60 | $existing[$hook]['preprocess functions'][] = $theme . '_process'; |
61 | - } |
|
62 | - if (function_exists($theme . '_process_' . $hook)) { |
|
61 | + } |
|
62 | + if (function_exists($theme . '_process_' . $hook)) { |
|
63 | 63 | $existing[$hook]['preprocess functions'][] = $theme . '_process_' . $hook; |
64 | - } |
|
64 | + } |
|
65 | + } |
|
65 | 66 | } |
66 | - } |
|
67 | 67 | |
68 | - // Manipulations only to be done by the base theme. |
|
69 | - if ($theme == 'zen') { |
|
68 | + // Manipulations only to be done by the base theme. |
|
69 | + if ($theme == 'zen') { |
|
70 | 70 | // Insert zen_show_blocks_discovery() before template_preprocess_page(). |
71 | 71 | $existing['page']['preprocess functions'] = array_merge(array('zen_show_blocks_discovery'), $existing['page']['preprocess functions']); |
72 | 72 | |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | |
76 | 76 | // The base theme registers region.tpl.php. |
77 | 77 | $templates = array( |
78 | - 'region' => array( |
|
78 | + 'region' => array( |
|
79 | 79 | 'arguments' => array('elements' => NULL), |
80 | 80 | 'pattern' => 'region_', |
81 | 81 | 'path' => drupal_get_path('theme', 'zen') . '/templates', |
82 | 82 | 'template' => 'region', |
83 | 83 | // drupal_find_theme_templates() requires this, so manually add it. |
84 | 84 | 'include files' => array(), |
85 | - ), |
|
85 | + ), |
|
86 | 86 | ); |
87 | 87 | // We have to manually find template suggestions since phptemplate_theme() |
88 | 88 | // is in charge of that, but runs before zen_theme(). |
@@ -90,18 +90,18 @@ discard block |
||
90 | 90 | // We manually register the preprocess and process functions, since Drupal |
91 | 91 | // won't auto-register template_preprocess or process functions. |
92 | 92 | foreach (array_keys($templates) as $key) { |
93 | - $templates[$key]['preprocess functions'] = array( |
|
93 | + $templates[$key]['preprocess functions'] = array( |
|
94 | 94 | 'template_preprocess', |
95 | 95 | 'zen_preprocess', |
96 | 96 | 'zen_preprocess_region', |
97 | 97 | 'zen_process', |
98 | - ); |
|
98 | + ); |
|
99 | 99 | } |
100 | 100 | return $templates; |
101 | - } |
|
101 | + } |
|
102 | 102 | |
103 | - // Else return nothing. |
|
104 | - return array(); |
|
103 | + // Else return nothing. |
|
104 | + return array(); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -111,27 +111,27 @@ discard block |
||
111 | 111 | * The name of theme. |
112 | 112 | */ |
113 | 113 | function zen_theme_get_default_settings($theme) { |
114 | - $themes = list_themes(); |
|
114 | + $themes = list_themes(); |
|
115 | 115 | |
116 | - // Get the default values from the .info file. |
|
117 | - $defaults = !empty($themes[$theme]->info['settings']) ? $themes[$theme]->info['settings'] : array(); |
|
116 | + // Get the default values from the .info file. |
|
117 | + $defaults = !empty($themes[$theme]->info['settings']) ? $themes[$theme]->info['settings'] : array(); |
|
118 | 118 | |
119 | - if (!module_exists('domain_theme') && !empty($defaults)) { |
|
119 | + if (!module_exists('domain_theme') && !empty($defaults)) { |
|
120 | 120 | // Merge the defaults with the theme settings saved in the database. |
121 | 121 | $settings = array_merge($defaults, variable_get('theme_'. $theme .'_settings', array())); |
122 | 122 | // Save the settings back to the database. |
123 | 123 | if (db_is_active()) { |
124 | - variable_set('theme_'. $theme .'_settings', $settings); |
|
124 | + variable_set('theme_'. $theme .'_settings', $settings); |
|
125 | 125 | } |
126 | 126 | else { |
127 | - $GLOBALS['conf']['theme_'. $theme .'_settings'] = $settings; |
|
127 | + $GLOBALS['conf']['theme_'. $theme .'_settings'] = $settings; |
|
128 | 128 | } |
129 | 129 | // If the active theme has been loaded, force refresh of Drupal internals. |
130 | 130 | if (!empty($GLOBALS['theme_key'])) { |
131 | - theme_get_setting('', TRUE); |
|
131 | + theme_get_setting('', TRUE); |
|
132 | + } |
|
132 | 133 | } |
133 | - } |
|
134 | 134 | |
135 | - // Return the default settings. |
|
136 | - return $defaults; |
|
135 | + // Return the default settings. |
|
136 | + return $defaults; |
|
137 | 137 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | function _zen_theme(&$existing, $type, $theme, $path) { |
13 | 13 | // Compute the conditional stylesheets. |
14 | 14 | if (!module_exists('conditional_styles')) { |
15 | - include_once './' . _zen_path() . '/zen-internals/template.conditional-styles.inc'; |
|
15 | + include_once './'._zen_path().'/zen-internals/template.conditional-styles.inc'; |
|
16 | 16 | // _conditional_styles_theme() only needs to be run once. |
17 | 17 | if ($theme == 'zen') { |
18 | 18 | _conditional_styles_theme($existing, $type, $theme, $path); |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | // If we are auto-rebuilding the theme registry, warn about the feature. |
27 | 27 | // Always display the warning in the admin section, otherwise limit to three |
28 | 28 | // warnings per hour. |
29 | - if (function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('zen_rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'] . '_rebuild_registry_warning', 3))) { |
|
30 | - flood_register_event($GLOBALS['theme'] . '_rebuild_registry_warning'); |
|
31 | - drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href="!link">turn off this feature</a> on production websites.', array('!link' => url('admin/build/themes/settings/' . $GLOBALS['theme']))), 'warning', FALSE); |
|
29 | + if (function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('zen_rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'].'_rebuild_registry_warning', 3))) { |
|
30 | + flood_register_event($GLOBALS['theme'].'_rebuild_registry_warning'); |
|
31 | + drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href="!link">turn off this feature</a> on production websites.', array('!link' => url('admin/build/themes/settings/'.$GLOBALS['theme']))), 'warning', FALSE); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | // Keep track of all the base themes. |
@@ -40,27 +40,27 @@ discard block |
||
40 | 40 | foreach (array_keys($existing) as $hook) { |
41 | 41 | // Normally, preprocess functions are added to the registry after |
42 | 42 | // HOOK_theme() returns, but if we add them first, they won't be re-added. |
43 | - if (function_exists($theme . '_preprocess')) { |
|
44 | - $existing[$hook]['preprocess functions'][] = $theme . '_preprocess'; |
|
43 | + if (function_exists($theme.'_preprocess')) { |
|
44 | + $existing[$hook]['preprocess functions'][] = $theme.'_preprocess'; |
|
45 | 45 | } |
46 | - if (function_exists($theme . '_preprocess_' . $hook)) { |
|
47 | - $existing[$hook]['preprocess functions'][] = $theme . '_preprocess_' . $hook; |
|
46 | + if (function_exists($theme.'_preprocess_'.$hook)) { |
|
47 | + $existing[$hook]['preprocess functions'][] = $theme.'_preprocess_'.$hook; |
|
48 | 48 | } |
49 | 49 | // Add base theme process functions. |
50 | 50 | foreach ($base_themes as $base_theme) { |
51 | - if (function_exists($base_theme . '_process')) { |
|
52 | - $existing[$hook]['preprocess functions'][] = $base_theme . '_process'; |
|
51 | + if (function_exists($base_theme.'_process')) { |
|
52 | + $existing[$hook]['preprocess functions'][] = $base_theme.'_process'; |
|
53 | 53 | } |
54 | - if (function_exists($base_theme . '_process_' . $hook)) { |
|
55 | - $existing[$hook]['preprocess functions'][] = $base_theme . '_process_' . $hook; |
|
54 | + if (function_exists($base_theme.'_process_'.$hook)) { |
|
55 | + $existing[$hook]['preprocess functions'][] = $base_theme.'_process_'.$hook; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | // Add the theme process functions. |
59 | - if (function_exists($theme . '_process')) { |
|
60 | - $existing[$hook]['preprocess functions'][] = $theme . '_process'; |
|
59 | + if (function_exists($theme.'_process')) { |
|
60 | + $existing[$hook]['preprocess functions'][] = $theme.'_process'; |
|
61 | 61 | } |
62 | - if (function_exists($theme . '_process_' . $hook)) { |
|
63 | - $existing[$hook]['preprocess functions'][] = $theme . '_process_' . $hook; |
|
62 | + if (function_exists($theme.'_process_'.$hook)) { |
|
63 | + $existing[$hook]['preprocess functions'][] = $theme.'_process_'.$hook; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | 'region' => array( |
79 | 79 | 'arguments' => array('elements' => NULL), |
80 | 80 | 'pattern' => 'region_', |
81 | - 'path' => drupal_get_path('theme', 'zen') . '/templates', |
|
81 | + 'path' => drupal_get_path('theme', 'zen').'/templates', |
|
82 | 82 | 'template' => 'region', |
83 | 83 | // drupal_find_theme_templates() requires this, so manually add it. |
84 | 84 | 'include files' => array(), |
@@ -118,13 +118,13 @@ discard block |
||
118 | 118 | |
119 | 119 | if (!module_exists('domain_theme') && !empty($defaults)) { |
120 | 120 | // Merge the defaults with the theme settings saved in the database. |
121 | - $settings = array_merge($defaults, variable_get('theme_'. $theme .'_settings', array())); |
|
121 | + $settings = array_merge($defaults, variable_get('theme_'.$theme.'_settings', array())); |
|
122 | 122 | // Save the settings back to the database. |
123 | 123 | if (db_is_active()) { |
124 | - variable_set('theme_'. $theme .'_settings', $settings); |
|
124 | + variable_set('theme_'.$theme.'_settings', $settings); |
|
125 | 125 | } |
126 | 126 | else { |
127 | - $GLOBALS['conf']['theme_'. $theme .'_settings'] = $settings; |
|
127 | + $GLOBALS['conf']['theme_'.$theme.'_settings'] = $settings; |
|
128 | 128 | } |
129 | 129 | // If the active theme has been loaded, force refresh of Drupal internals. |
130 | 130 | if (!empty($GLOBALS['theme_key'])) { |
@@ -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. |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | // warnings per hour. |
29 | 29 | if (function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('zen_rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'] . '_rebuild_registry_warning', 3))) { |
30 | 30 | flood_register_event($GLOBALS['theme'] . '_rebuild_registry_warning'); |
31 | - drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href="!link">turn off this feature</a> on production websites.', array('!link' => url('admin/build/themes/settings/' . $GLOBALS['theme']))), 'warning', FALSE); |
|
31 | + drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href="!link">turn off this feature</a> on production websites.', array('!link' => url('admin/build/themes/settings/' . $GLOBALS['theme']))), 'warning', false); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | // Keep track of all the base themes. |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | // The base theme registers region.tpl.php. |
77 | 77 | $templates = array( |
78 | 78 | 'region' => array( |
79 | - 'arguments' => array('elements' => NULL), |
|
79 | + 'arguments' => array('elements' => null), |
|
80 | 80 | 'pattern' => 'region_', |
81 | 81 | 'path' => drupal_get_path('theme', 'zen') . '/templates', |
82 | 82 | 'template' => 'region', |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | // If the active theme has been loaded, force refresh of Drupal internals. |
130 | 130 | if (!empty($GLOBALS['theme_key'])) { |
131 | - theme_get_setting('', TRUE); |
|
131 | + theme_get_setting('', true); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 |
@@ -14,26 +14,26 @@ |
||
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 |
@@ -14,25 +14,25 @@ |
||
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]--> |
@@ -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. |
@@ -13,46 +13,46 @@ |
||
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 | } |
@@ -17,7 +17,7 @@ |
||
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 |
@@ -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'; |
@@ -27,11 +27,11 @@ |
||
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) { |
@@ -15,51 +15,51 @@ discard block |
||
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 |
||
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 | } |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -65,13 +65,13 @@ |
||
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 | /** |
@@ -13,17 +13,17 @@ discard block |
||
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 |
||
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 | } |
@@ -1,6 +1,6 @@ |
||
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 | /** |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | xml_error(ERR_ACCT_CREATION_DISABLED); |
39 | 39 | } |
40 | 40 | |
41 | -if(defined('INVITE_CODES')) { |
|
41 | +if (defined('INVITE_CODES')) { |
|
42 | 42 | $invite_code = get_str("invite_code"); |
43 | 43 | if (!preg_match(INVITE_CODES, $invite_code)) { |
44 | 44 | xml_error(ERR_ATTACH_FAIL_INIT); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | start_table(); |
50 | 50 | |
51 | 51 | $get_reason = true; |
52 | -if (get_str('action')=="hide") { |
|
52 | +if (get_str('action') == "hide") { |
|
53 | 53 | //display input that selects reason |
54 | 54 | echo "<input type=hidden name=action value=hide>"; |
55 | 55 | row1(tra("Hide post")); |
@@ -66,12 +66,12 @@ discard block |
||
66 | 66 | ) |
67 | 67 | ) |
68 | 68 | ); |
69 | -} elseif (get_str('action')=="move") { |
|
69 | +} elseif (get_str('action') == "move") { |
|
70 | 70 | row1(tra("Move post")); |
71 | 71 | echo "<input type=hidden name=action value=move>"; |
72 | 72 | row2(tra("Destination thread ID:"), "<input name=\"threadid\">"); |
73 | 73 | // TODO: display where to move the post as a dropdown instead of having to get ID |
74 | -} elseif (get_str('action')=="banish_user") { |
|
74 | +} elseif (get_str('action') == "banish_user") { |
|
75 | 75 | $userid = get_int('userid'); |
76 | 76 | $user = BoincUser::lookup_id($userid); |
77 | 77 | BoincForumPrefs::lookup($user); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | error_page("no user found"); |
80 | 80 | } |
81 | 81 | $x = $user->prefs->banished_until; |
82 | - if ($x>time()) { |
|
82 | + if ($x > time()) { |
|
83 | 83 | error_page(tra("User is already banished")); |
84 | 84 | } |
85 | 85 | row1(tra("Banish user")); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | echo "<input type=\"hidden\" name=\"id\" value=\"".$postid."\">\n"; |
98 | 98 | echo "<input type=\"hidden\" name=\"userid\" value=\"".$userid."\">\n"; |
99 | 99 | echo "<input type=\"hidden\" name=\"confirmed\" value=\"yes\">\n"; |
100 | -} elseif (get_str('action')=="delete") { |
|
100 | +} elseif (get_str('action') == "delete") { |
|
101 | 101 | echo "<input type=hidden name=action value=delete>"; |
102 | 102 | row2( |
103 | 103 | "Are you sure want to delete this post? This cannot be undone.", |