@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | // Render the stylesheets to link elements. |
65 | 65 | $conditional_styles = $conditional_styles_rtl = ''; |
66 | 66 | if (!empty($stylesheets)) { |
67 | - $query_string = '?'. substr(variable_get('css_js_query_string', '0'), 0, 1); |
|
67 | + $query_string = '?'.substr(variable_get('css_js_query_string', '0'), 0, 1); |
|
68 | 68 | $base_path = base_path(); |
69 | 69 | foreach ($stylesheets AS $condition => $css) { |
70 | 70 | // Each condition requires its own set of links. |
@@ -92,17 +92,17 @@ discard block |
||
92 | 92 | // Save the stylesheets for later retrieval. |
93 | 93 | if ($conditional_styles) { |
94 | 94 | if (db_is_active()) { |
95 | - variable_set('conditional_styles_' . $theme, $conditional_styles); |
|
96 | - variable_set('conditional_styles_' . $theme . '_rtl', $conditional_styles_rtl); |
|
95 | + variable_set('conditional_styles_'.$theme, $conditional_styles); |
|
96 | + variable_set('conditional_styles_'.$theme.'_rtl', $conditional_styles_rtl); |
|
97 | 97 | } |
98 | 98 | else { |
99 | - $GLOBALS['conf']['conditional_styles_' . $theme] = $conditional_styles; |
|
100 | - $GLOBALS['conf']['conditional_styles_' . $theme . '_rtl'] = $conditional_styles_rtl; |
|
99 | + $GLOBALS['conf']['conditional_styles_'.$theme] = $conditional_styles; |
|
100 | + $GLOBALS['conf']['conditional_styles_'.$theme.'_rtl'] = $conditional_styles_rtl; |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | elseif (db_is_active()) { |
104 | - variable_del('conditional_styles_' . $theme); |
|
105 | - variable_del('conditional_styles_' . $theme . '_rtl'); |
|
104 | + variable_del('conditional_styles_'.$theme); |
|
105 | + variable_del('conditional_styles_'.$theme.'_rtl'); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | // Display 'edit block' for custom blocks. |
19 | 19 | if ($block->module == 'block') { |
20 | - $vars['edit_links_array']['block-edit'] = l('<span>' . t('edit block') . '</span>', 'admin/build/block/configure/' . $block->module . '/' . $block->delta, |
|
20 | + $vars['edit_links_array']['block-edit'] = l('<span>'.t('edit block').'</span>', 'admin/build/block/configure/'.$block->module.'/'.$block->delta, |
|
21 | 21 | array( |
22 | 22 | 'attributes' => array( |
23 | 23 | 'title' => t('edit the content of this block'), |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | // Display 'configure' for other blocks. |
32 | 32 | else { |
33 | - $vars['edit_links_array']['block-config'] = l('<span>' . t('configure') . '</span>', 'admin/build/block/configure/' . $block->module . '/' . $block->delta, |
|
33 | + $vars['edit_links_array']['block-config'] = l('<span>'.t('configure').'</span>', 'admin/build/block/configure/'.$block->module.'/'.$block->delta, |
|
34 | 34 | array( |
35 | 35 | 'attributes' => array( |
36 | 36 | 'title' => t('configure this block'), |
@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | // Display 'edit view' for Views blocks. |
46 | 46 | if ($block->module == 'views' && user_access('administer views')) { |
47 | 47 | list($view_name, $view_block) = explode('-block', $block->delta); |
48 | - $vars['edit_links_array']['block-edit-view'] = l('<span>' . t('edit view') . '</span>', 'admin/build/views/edit/' . $view_name, |
|
48 | + $vars['edit_links_array']['block-edit-view'] = l('<span>'.t('edit view').'</span>', 'admin/build/views/edit/'.$view_name, |
|
49 | 49 | array( |
50 | 50 | 'attributes' => array( |
51 | 51 | 'title' => t('edit the view that defines this block'), |
52 | 52 | 'class' => 'block-edit-view', |
53 | 53 | ), |
54 | 54 | 'query' => drupal_get_destination(), |
55 | - 'fragment' => 'views-tab-block' . $view_block, |
|
55 | + 'fragment' => 'views-tab-block'.$view_block, |
|
56 | 56 | 'html' => TRUE, |
57 | 57 | ) |
58 | 58 | ); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // Display 'edit menu' for Menu blocks. |
61 | 61 | elseif (($block->module == 'menu' || ($block->module == 'user' && $block->delta == 1)) && user_access('administer menu')) { |
62 | 62 | $menu_name = ($block->module == 'user') ? 'navigation' : $block->delta; |
63 | - $vars['edit_links_array']['block-edit-menu'] = l('<span>' . t('edit menu') . '</span>', 'admin/build/menu-customize/' . $menu_name, |
|
63 | + $vars['edit_links_array']['block-edit-menu'] = l('<span>'.t('edit menu').'</span>', 'admin/build/menu-customize/'.$menu_name, |
|
64 | 64 | array( |
65 | 65 | 'attributes' => array( |
66 | 66 | 'title' => t('edit the menu that defines this block'), |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | } |
74 | 74 | // Display 'edit menu' for Menu block blocks. |
75 | 75 | elseif ($block->module == 'menu_block' && user_access('administer menu')) { |
76 | - list($menu_name, ) = split(':', variable_get("menu_block_{$block->delta}_parent", 'navigation:0')); |
|
77 | - $vars['edit_links_array']['block-edit-menu'] = l('<span>' . t('edit menu') . '</span>', 'admin/build/menu-customize/' . $menu_name, |
|
76 | + list($menu_name,) = split(':', variable_get("menu_block_{$block->delta}_parent", 'navigation:0')); |
|
77 | + $vars['edit_links_array']['block-edit-menu'] = l('<span>'.t('edit menu').'</span>', 'admin/build/menu-customize/'.$menu_name, |
|
78 | 78 | array( |
79 | 79 | 'attributes' => array( |
80 | 80 | 'title' => t('edit the menu that defines this block'), |
@@ -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'])) { |
@@ -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]--> |
@@ -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 |
@@ -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 |
@@ -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 | } |
@@ -41,7 +41,7 @@ |
||
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; |