summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/block.tpl.php2
-rw-r--r--modules/system/system.admin.inc94
-rw-r--r--modules/system/system.install80
-rw-r--r--modules/system/system.module102
4 files changed, 139 insertions, 139 deletions
diff --git a/modules/system/block.tpl.php b/modules/system/block.tpl.php
index 30f95b458..8ca0f2ba4 100644
--- a/modules/system/block.tpl.php
+++ b/modules/system/block.tpl.php
@@ -26,7 +26,7 @@
* @see template_preprocess_block()
*/
?>
-<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?>">
+<div id="block-<?php print $block->module . '-' . $block->delta; ?>" class="block block-<?php print $block->module ?>">
<?php if ($block->subject): ?>
<h2><?php print $block->subject ?></h2>
<?php endif;?>
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index c144c15d6..8c9d0aa0e 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -47,7 +47,7 @@ function system_main_admin_page($arg = NULL) {
$block['content'] .= theme('admin_block_content', system_admin_menu_block($item));
// Prepare for sorting as in function _menu_tree_check_access().
// The weight is offset so it is always positive, with a uniform 5-digits.
- $blocks[(50000 + $item['weight']) .' '. $item['title'] .' '. $item['mlid']] = $block;
+ $blocks[(50000 + $item['weight']) . ' ' . $item['title'] . ' ' . $item['mlid']] = $block;
}
}
if ($blocks) {
@@ -143,7 +143,7 @@ function system_admin_theme_settings() {
uasort($themes, 'system_sort_modules_by_info_name');
- $options[0] = '<'. t('System default') .'>';
+ $options[0] = '<' . t('System default') . '>';
foreach ($themes as $theme) {
$options[$theme->name] = $theme->info['name'];
}
@@ -204,7 +204,7 @@ function system_themes_form() {
$options[$theme->name] = '';
if (!empty($theme->status) || $theme->name == variable_get('admin_theme', '0')) {
- $form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/'. $theme->name) );
+ $form[$theme->name]['operations'] = array('#value' => l(t('configure'), 'admin/build/themes/settings/' . $theme->name) );
}
else {
// Dummy element for drupal_render. Cleaner than adding a check in the theme function.
@@ -319,7 +319,7 @@ function system_theme_settings(&$form_state, $key = '') {
// Default settings are defined in theme_get_settings() in includes/theme.inc
if ($key) {
$settings = theme_get_settings($key);
- $var = str_replace('/', '_', 'theme_'. $key .'_settings');
+ $var = str_replace('/', '_', 'theme_' . $key . '_settings');
$themes = system_theme_data();
$features = $themes[$key]->info['features'];
}
@@ -333,7 +333,7 @@ function system_theme_settings(&$form_state, $key = '') {
// Check for a new uploaded logo, and use that instead.
if ($file = file_save_upload('logo_upload', array('file_validate_is_image' => array()))) {
$parts = pathinfo($file->filename);
- $filename = ($key) ? str_replace('/', '_', $key) .'_logo.'. $parts['extension'] : 'logo.'. $parts['extension'];
+ $filename = ($key) ? str_replace('/', '_', $key) . '_logo.' . $parts['extension'] : 'logo.' . $parts['extension'];
// The image was saved using file_save_upload() and was added to the
// files table as a temporary file. We'll make a copy and let the garbage
@@ -348,7 +348,7 @@ function system_theme_settings(&$form_state, $key = '') {
// Check for a new uploaded favicon, and use that instead.
if ($file = file_save_upload('favicon_upload')) {
$parts = pathinfo($file->filename);
- $filename = ($key) ? str_replace('/', '_', $key) .'_favicon.'. $parts['extension'] : 'favicon.'. $parts['extension'];
+ $filename = ($key) ? str_replace('/', '_', $key) . '_favicon.' . $parts['extension'] : 'favicon.' . $parts['extension'];
// The image was saved using file_save_upload() and was added to the
// files table as a temporary file. We'll make a copy and let the garbage
@@ -391,10 +391,10 @@ function system_theme_settings(&$form_state, $key = '') {
);
foreach ($toggles as $name => $title) {
if ((!$key) || in_array($name, $features)) {
- $form['theme_settings']['toggle_'. $name] = array('#type' => 'checkbox', '#title' => $title, '#default_value' => $settings['toggle_'. $name]);
+ $form['theme_settings']['toggle_' . $name] = array('#type' => 'checkbox', '#title' => $title, '#default_value' => $settings['toggle_' . $name]);
// Disable checkboxes for features not supported in the current configuration.
- if (isset($disabled['toggle_'. $name])) {
- $form['theme_settings']['toggle_'. $name]['#disabled'] = TRUE;
+ if (isset($disabled['toggle_' . $name])) {
+ $form['theme_settings']['toggle_' . $name]['#disabled'] = TRUE;
}
}
}
@@ -485,18 +485,18 @@ function system_theme_settings(&$form_state, $key = '') {
if ($key) {
// Include the theme's theme-settings.php file
- $filename = './'. str_replace("/$key.info", '', $themes[$key]->filename) .'/theme-settings.php';
+ $filename = './' . str_replace("/$key.info", '', $themes[$key]->filename) . '/theme-settings.php';
if (!file_exists($filename) and !empty($themes[$key]->info['base theme'])) {
// If the theme doesn't have a theme-settings.php file, use the base theme's.
$base = $themes[$key]->info['base theme'];
- $filename = './'. str_replace("/$base.info", '', $themes[$base]->filename) .'/theme-settings.php';
+ $filename = './' . str_replace("/$base.info", '', $themes[$base]->filename) . '/theme-settings.php';
}
if (file_exists($filename)) {
require_once $filename;
}
// Call engine-specific settings.
- $function = $themes[$key]->prefix .'_engine_settings';
+ $function = $themes[$key]->prefix . '_engine_settings';
if (function_exists($function)) {
$group = $function($settings);
if (!empty($group)) {
@@ -505,9 +505,9 @@ function system_theme_settings(&$form_state, $key = '') {
}
}
// Call theme-specific settings.
- $function = $key .'_settings';
+ $function = $key . '_settings';
if (!function_exists($function)) {
- $function = $themes[$key]->prefix .'_settings';
+ $function = $themes[$key]->prefix . '_settings';
}
if (function_exists($function)) {
$group = $function($settings);
@@ -1049,7 +1049,7 @@ function system_modules_uninstall_confirm_form($storage) {
// Construct the hidden form elements and list items.
foreach (array_filter($storage['uninstall']) as $module => $value) {
- $info = drupal_parse_info_file(dirname(drupal_get_filename('module', $module)) .'/'. $module .'.info');
+ $info = drupal_parse_info_file(dirname(drupal_get_filename('module', $module)) . '/' . $module . '.info');
$uninstall[] = $info['name'];
$form['uninstall'][$module] = array('#type' => 'hidden',
'#value' => 1,
@@ -1060,7 +1060,7 @@ function system_modules_uninstall_confirm_form($storage) {
if (isset($uninstall)) {
$form['#confirmed'] = TRUE;
$form['uninstall']['#tree'] = TRUE;
- $form['modules'] = array('#value' => '<p>'. t('The following modules will be completely uninstalled from your site, and <em>all data from these modules will be lost</em>!') .'</p>'. theme('item_list', $uninstall));
+ $form['modules'] = array('#value' => '<p>' . t('The following modules will be completely uninstalled from your site, and <em>all data from these modules will be lost</em>!') . '</p>' . theme('item_list', $uninstall));
$form = confirm_form(
$form,
t('Confirm uninstall'),
@@ -1328,16 +1328,16 @@ function system_logging_overview() {
*/
function system_performance_settings() {
- $description = '<p>'. t("The normal cache mode is suitable for most sites and does not cause any side effects. The aggressive cache mode causes Drupal to skip the loading (boot) and unloading (exit) of enabled modules when serving a cached page. This results in an additional performance boost but can cause unwanted side effects.") .'</p>';
+ $description = '<p>' . t("The normal cache mode is suitable for most sites and does not cause any side effects. The aggressive cache mode causes Drupal to skip the loading (boot) and unloading (exit) of enabled modules when serving a cached page. This results in an additional performance boost but can cause unwanted side effects.") . '</p>';
$problem_modules = array_unique(array_merge(module_implements('boot'), module_implements('exit')));
sort($problem_modules);
if (count($problem_modules) > 0) {
- $description .= '<p>'. t('<strong class="error">The following enabled modules are incompatible with aggressive mode caching and will not function properly: %modules</strong>', array('%modules' => implode(', ', $problem_modules))) .'.</p>';
+ $description .= '<p>' . t('<strong class="error">The following enabled modules are incompatible with aggressive mode caching and will not function properly: %modules</strong>', array('%modules' => implode(', ', $problem_modules))) . '.</p>';
}
else {
- $description .= '<p>'. t('<strong class="ok">Currently, all enabled modules are compatible with the aggressive caching policy.</strong> Please note, if you use aggressive caching and enable new modules, you will need to check this page again to ensure compatibility.') .'</p>';
+ $description .= '<p>' . t('<strong class="ok">Currently, all enabled modules are compatible with the aggressive caching policy.</strong> Please note, if you use aggressive caching and enable new modules, you will need to check this page again to ensure compatibility.') . '</p>';
}
$form['page_cache'] = array(
'#type' => 'fieldset',
@@ -1354,7 +1354,7 @@ function system_performance_settings() {
);
$period = drupal_map_assoc(array(0, 60, 180, 300, 600, 900, 1800, 2700, 3600, 10800, 21600, 32400, 43200, 86400), 'format_interval');
- $period[0] = '<'. t('none') .'>';
+ $period[0] = '<' . t('none') . '>';
$form['page_cache']['cache_lifetime'] = array(
'#type' => 'select',
'#title' => t('Minimum cache lifetime'),
@@ -1388,7 +1388,7 @@ function system_performance_settings() {
$form['bandwidth_optimizations'] = array(
'#type' => 'fieldset',
'#title' => t('Bandwidth optimizations'),
- '#description' => '<p>'. t('Drupal can automatically optimize external resources like CSS and JavaScript, which can reduce both the size and number of requests made to your website. CSS files can be aggregated and compressed into a single file, while JavaScript files are aggregated (but not compressed). These optional optimizations may reduce server load, bandwidth requirements, and page loading times.') .'</p><p>'. t('These options are disabled if you have not set up your files directory, or if your download method is set to private.') .'</p>'
+ '#description' => '<p>' . t('Drupal can automatically optimize external resources like CSS and JavaScript, which can reduce both the size and number of requests made to your website. CSS files can be aggregated and compressed into a single file, while JavaScript files are aggregated (but not compressed). These optional optimizations may reduce server load, bandwidth requirements, and page loading times.') . '</p><p>' . t('These options are disabled if you have not set up your files directory, or if your download method is set to private.') . '</p>'
);
$directory = file_directory_path();
@@ -1534,7 +1534,7 @@ function system_rss_feeds_settings() {
* @see system_date_time_settings_submit()
*/
function system_date_time_settings() {
- drupal_add_js(drupal_get_path('module', 'system') .'/system.js', 'module');
+ drupal_add_js(drupal_get_path('module', 'system') . '/system.js', 'module');
drupal_add_js(array('dateTime' => array('lookup' => url('admin/settings/date-time/lookup'))), 'setting');
// Date settings:
@@ -1742,16 +1742,16 @@ function system_clean_url_settings() {
if (!variable_get('clean_url', 0)) {
if (strpos(request_uri(), '?q=') !== FALSE) {
- drupal_add_js(drupal_get_path('module', 'system') .'/system.js', 'module');
+ drupal_add_js(drupal_get_path('module', 'system') . '/system.js', 'module');
- $form['clean_url']['#description'] .= ' <span>'. t('Before enabling clean URLs, you must perform a test to determine if your server is properly configured. If you are able to see this page again after clicking the "Run the clean URL test" link, the test has succeeded and the radio buttons above will be available. If instead you are directed to a "Page not found" error, you will need to change the configuration of your server. The <a href="@handbook">handbook page on Clean URLs</a> has additional troubleshooting information.', array('@handbook' => 'http://drupal.org/node/15365')) .'</span>';
+ $form['clean_url']['#description'] .= ' <span>' . t('Before enabling clean URLs, you must perform a test to determine if your server is properly configured. If you are able to see this page again after clicking the "Run the clean URL test" link, the test has succeeded and the radio buttons above will be available. If instead you are directed to a "Page not found" error, you will need to change the configuration of your server. The <a href="@handbook">handbook page on Clean URLs</a> has additional troubleshooting information.', array('@handbook' => 'http://drupal.org/node/15365')) . '</span>';
$form['clean_url']['#disabled'] = TRUE;
$form['clean_url']['#prefix'] = '<div id="clean-url">';
- $form['clean_url']['#suffix'] = '<p>'. t('<a href="@clean_url">Run the clean url test</a>.', array('@clean_url' => base_path() .'admin/settings/clean-urls')) .'</p></div>';
+ $form['clean_url']['#suffix'] = '<p>' . t('<a href="@clean_url">Run the clean url test</a>.', array('@clean_url' => base_path() . 'admin/settings/clean-urls')) . '</p></div>';
}
else {
- $form['clean_url']['#description'] .= ' <div class="ok">'. t('Your server has been successfully tested to support this feature.') .'</div>';
+ $form['clean_url']['#description'] .= ' <div class="ok">' . t('Your server has been successfully tested to support this feature.') . '</div>';
}
}
@@ -1839,7 +1839,7 @@ function system_sql() {
$data[$entry->Variable_name] = $entry->Value;
}
- $output = '<h2>'. t('Command counters') .'</h2>';
+ $output = '<h2>' . t('Command counters') . '</h2>';
$output .= _system_sql($data, array(
'Com_select' => t('The number of <code>SELECT</code>-statements.'),
'Com_insert' => t('The number of <code>INSERT</code>-statements.'),
@@ -1849,7 +1849,7 @@ function system_sql() {
'Com_unlock_tables' => t('The number of table unlocks.')
));
- $output .= '<h2>'. t('Query performance') .'</h2>';
+ $output .= '<h2>' . t('Query performance') . '</h2>';
$output .= _system_sql($data, array(
'Select_full_join' => t('The number of joins without an index; should be zero.'),
'Select_range_check' => t('The number of joins without keys that check for key usage after each row; should be zero.'),
@@ -1858,8 +1858,8 @@ function system_sql() {
'Table_locks_waited' => t('The number of times the server had to wait for a lock.')
));
- $output .= '<h2>'. t('Query cache information') .'</h2>';
- $output .= '<p>'. t('The MySQL query cache can improve performance of your site by storing the result of queries. Then, if an identical query is received later, the MySQL server retrieves the result from the query cache rather than parsing and executing the statement again.') .'</p>';
+ $output .= '<h2>' . t('Query cache information') . '</h2>';
+ $output .= '<p>' . t('The MySQL query cache can improve performance of your site by storing the result of queries. Then, if an identical query is received later, the MySQL server retrieves the result from the query cache rather than parsing and executing the statement again.') . '</p>';
$output .= _system_sql($data, array(
'Qcache_queries_in_cache' => t('The number of queries in the query cache.'),
'Qcache_hits' => t('The number of times MySQL found previous results in the cache.'),
@@ -1932,15 +1932,15 @@ function theme_admin_block_content($content) {
if (system_admin_compact_mode()) {
$output = '<ul class="menu">';
foreach ($content as $item) {
- $output .= '<li class="leaf">'. l($item['title'], $item['href'], $item['localized_options']) .'</li>';
+ $output .= '<li class="leaf">' . l($item['title'], $item['href'], $item['localized_options']) . '</li>';
}
$output .= '</ul>';
}
else {
$output = '<dl class="admin-list">';
foreach ($content as $item) {
- $output .= '<dt>'. l($item['title'], $item['href'], $item['localized_options']) .'</dt>';
- $output .= '<dd>'. $item['description'] .'</dd>';
+ $output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
+ $output .= '<dd>' . $item['description'] . '</dd>';
}
$output .= '</dl>';
}
@@ -1978,7 +1978,7 @@ function theme_admin_page($blocks) {
$output .= theme('system_compact_link');
foreach ($container as $id => $data) {
- $output .= '<div class="'. $id .' clear-block">';
+ $output .= '<div class="' . $id . ' clear-block">';
$output .= $data;
$output .= '</div>';
}
@@ -2024,7 +2024,7 @@ function theme_system_admin_by_module($menu_items) {
$output = '<div class="admin clear-block">';
foreach ($container as $id => $data) {
- $output .= '<div class="'. $id .' clear-block">';
+ $output .= '<div class="' . $id . ' clear-block">';
$output .= $data;
$output .= '</div>';
}
@@ -2053,15 +2053,15 @@ function theme_status_report(&$requirements) {
REQUIREMENT_WARNING => 'warning',
REQUIREMENT_ERROR => 'error',
);
- $class = $classes[isset($requirement['severity']) ? (int)$requirement['severity'] : 0] .' '. $class;
+ $class = $classes[isset($requirement['severity']) ? (int)$requirement['severity'] : 0] . ' ' . $class;
// Output table row(s)
if (!empty($requirement['description'])) {
- $output .= '<tr class="'. $class .' merge-down"><th>'. $requirement['title'] .'</th><td>'. $requirement['value'] .'</td></tr>';
- $output .= '<tr class="'. $class .' merge-up"><td colspan="2">'. $requirement['description'] .'</td></tr>';
+ $output .= '<tr class="' . $class . ' merge-down"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
+ $output .= '<tr class="' . $class . ' merge-up"><td colspan="2">' . $requirement['description'] . '</td></tr>';
}
else {
- $output .= '<tr class="'. $class .'"><th>'. $requirement['title'] .'</th><td>'. $requirement['value'] .'</td></tr>';
+ $output .= '<tr class="' . $class . '"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
}
}
}
@@ -2112,7 +2112,7 @@ function theme_system_modules($form) {
if (isset($form['status']['#incompatible_modules_core'][$key])) {
unset($form['status'][$key]);
$status = theme('image', 'misc/watchdog-error.png', t('incompatible'), t('Incompatible with this version of Drupal core'));
- $description .= '<div class="incompatible">'. t('This version is incompatible with the !core_version version of Drupal core.', array('!core_version' => VERSION)) .'</div>';
+ $description .= '<div class="incompatible">' . t('This version is incompatible with the !core_version version of Drupal core.', array('!core_version' => VERSION)) . '</div>';
}
elseif (isset($form['status']['#incompatible_modules_php'][$key])) {
unset($form['status'][$key]);
@@ -2121,7 +2121,7 @@ function theme_system_modules($form) {
if (substr_count($php_required, '.') < 2) {
$php_required .= '.*';
}
- $description .= '<div class="incompatible">'. t('This module requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $php_required, '!php_version' => phpversion())) .'</div>';
+ $description .= '<div class="incompatible">' . t('This module requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $php_required, '!php_version' => phpversion())) . '</div>';
}
else {
$status = drupal_render($form['status'][$key]);
@@ -2133,10 +2133,10 @@ function theme_system_modules($form) {
// Add labels only when there is also a checkbox.
if (isset($form['status'][$key])) {
- $row[] = '<strong><label for="'. $form['status'][$key]['#id'] .'">'. drupal_render($form['name'][$key]) .'</label></strong>';
+ $row[] = '<strong><label for="' . $form['status'][$key]['#id'] . '">' . drupal_render($form['name'][$key]) . '</label></strong>';
}
else {
- $row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>';
+ $row[] = '<strong>' . drupal_render($form['name'][$key]) . '</strong>';
}
$row[] = drupal_render($form['version'][$key]);
@@ -2182,7 +2182,7 @@ function theme_system_modules_uninstall($form) {
foreach (element_children($form['modules']) as $module) {
$rows[] = array(
array('data' => drupal_render($form['uninstall'][$module]), 'align' => 'center'),
- '<strong>'. drupal_render($form['modules'][$module]['name']) .'</strong>',
+ '<strong>' . drupal_render($form['modules'][$module]['name']) . '</strong>',
array('data' => drupal_render($form['modules'][$module]['description']), 'class' => 'description'),
);
}
@@ -2242,7 +2242,7 @@ function theme_system_themes_form($form) {
if (isset($form['status']['#incompatible_themes_core'][$key])) {
unset($form['status'][$key]);
$status = theme('image', 'misc/watchdog-error.png', t('incompatible'), t('Incompatible with this version of Drupal core'));
- $description .= '<div class="incompatible">'. t('This version is incompatible with the !core_version version of Drupal core.', array('!core_version' => VERSION)) .'</div>';
+ $description .= '<div class="incompatible">' . t('This version is incompatible with the !core_version version of Drupal core.', array('!core_version' => VERSION)) . '</div>';
}
elseif (isset($form['status']['#incompatible_themes_php'][$key])) {
unset($form['status'][$key]);
@@ -2251,14 +2251,14 @@ function theme_system_themes_form($form) {
if (substr_count($php_required, '.') < 2) {
$php_required .= '.*';
}
- $description .= '<div class="incompatible">'. t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $php_required, '!php_version' => phpversion())) .'</div>';
+ $description .= '<div class="incompatible">' . t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $php_required, '!php_version' => phpversion())) . '</div>';
}
else {
$status = drupal_render($form['status'][$key]);
}
// Style theme info
- $theme = '<div class="theme-info"><h2>'. $info['name'] .'</h2><div class="description">'. $description .'</div></div>';
+ $theme = '<div class="theme-info"><h2>' . $info['name'] . '</h2><div class="description">' . $description . '</div></div>';
// Build rows
$row = array();
diff --git a/modules/system/system.install b/modules/system/system.install
index b4dcd1fd1..db804064e 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -81,13 +81,13 @@ function system_requirements($phase) {
if (!empty($description)) {
if ($php_ini_path = get_cfg_var('cfg_file_path')) {
- $description .= ' '. $t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path));
+ $description .= ' ' . $t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path));
}
else {
- $description .= ' '. $t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.');
+ $description .= ' ' . $t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.');
}
- $requirements['php_memory_limit']['description'] = $description .' '. $t('See the <a href="@url">Drupal requirements</a> for more information.', array('@url' => 'http://drupal.org/requirements'));
+ $requirements['php_memory_limit']['description'] = $description . ' ' . $t('See the <a href="@url">Drupal requirements</a> for more information.', array('@url' => 'http://drupal.org/requirements'));
$requirements['php_memory_limit']['severity'] = REQUIREMENT_WARNING;
}
}
@@ -101,7 +101,7 @@ function system_requirements($phase) {
// Test settings.php file writability
if ($phase == 'runtime') {
$conf_dir = drupal_verify_install_file(conf_path(), FILE_NOT_WRITABLE, 'dir');
- $conf_file = drupal_verify_install_file(conf_path() .'/settings.php', FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE);
+ $conf_file = drupal_verify_install_file(conf_path() . '/settings.php', FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE);
if (!$conf_dir || !$conf_file) {
$requirements['settings.php'] = array(
'value' => $t('Not protected'),
@@ -112,7 +112,7 @@ function system_requirements($phase) {
$requirements['settings.php']['description'] .= $t('The directory %file is not protected from modifications and poses a security risk. You must change the directory\'s permissions to be non-writable. ', array('%file' => conf_path()));
}
if (!$conf_file) {
- $requirements['settings.php']['description'] .= $t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.', array('%file' => conf_path() .'/settings.php'));
+ $requirements['settings.php']['description'] .= $t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.', array('%file' => conf_path() . '/settings.php'));
}
}
else {
@@ -160,18 +160,18 @@ function system_requirements($phase) {
// Set summary and description based on values determined above.
if ($never_run) {
$summary = $t('Never run');
- $description = $t('Cron has not run.') .' '. $help;
+ $description = $t('Cron has not run.') . ' ' . $help;
}
else {
$summary = $t('Last run !time ago', array('!time' => format_interval(time() - $cron_last)));
$description = '';
if ($severity != REQUIREMENT_OK) {
- $description = $t('Cron has not run recently.') .' '. $help;
+ $description = $t('Cron has not run recently.') . ' ' . $help;
}
}
- $description .= ' '. $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
- $description .= '<br />'. $t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url('cron.php', array('absolute' => true, 'query' => 'cron_key='. variable_get('cron_key', 'drupal')))));
+ $description .= ' ' . $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
+ $description .= '<br />' . $t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url('cron.php', array('absolute' => true, 'query' => 'cron_key=' . variable_get('cron_key', 'drupal')))));
$requirements['cron'] = array(
'title' => $t('Cron maintenance tasks'),
@@ -205,12 +205,12 @@ function system_requirements($phase) {
}
// The files directory requirement check is done only during install and runtime.
if ($phase == 'runtime') {
- $description = $error .' '. $t('You may need to set the correct directory at the <a href="@admin-file-system">file system settings page</a> or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/settings/file-system')));
+ $description = $error . ' ' . $t('You may need to set the correct directory at the <a href="@admin-file-system">file system settings page</a> or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/settings/file-system')));
}
elseif ($phase == 'install') {
// For the installer UI, we need different wording. 'value' will
// be treated as version, so provide none there.
- $description = $error .' '. $t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the <a href="@handbook_url">on-line handbook</a>.', array('@handbook_url' => 'http://drupal.org/server-permissions'));
+ $description = $error . ' ' . $t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the <a href="@handbook_url">on-line handbook</a>.', array('@handbook_url' => 'http://drupal.org/server-permissions'));
$requirements['file system']['value'] = '';
}
if (!empty($description)) {
@@ -243,7 +243,7 @@ function system_requirements($phase) {
if (max($updates) > $default) {
$requirements['update']['severity'] = REQUIREMENT_ERROR;
$requirements['update']['value'] = $t('Out of date');
- $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the <a href="@update">database update script</a> immediately.', array('@update' => base_path() .'update.php'));
+ $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the <a href="@update">database update script</a> immediately.', array('@update' => base_path() . 'update.php'));
break;
}
}
@@ -1130,7 +1130,7 @@ function system_schema() {
'default' => '',
),
'owner' => array(
- 'description' => t("A theme's 'parent'. Can be either a theme or an engine."),
+ 'description' => t("A theme's 'parent' . Can be either a theme or an engine."),
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
@@ -1397,9 +1397,9 @@ function system_update_6006() {
*/
function system_update_6007() {
$ret = array();
- $ret[] = update_sql("UPDATE {watchdog} SET severity = ". WATCHDOG_NOTICE ." WHERE severity = 0");
- $ret[] = update_sql("UPDATE {watchdog} SET severity = ". WATCHDOG_WARNING ." WHERE severity = 1");
- $ret[] = update_sql("UPDATE {watchdog} SET severity = ". WATCHDOG_ERROR ." WHERE severity = 2");
+ $ret[] = update_sql("UPDATE {watchdog} SET severity = " . WATCHDOG_NOTICE . " WHERE severity = 0");
+ $ret[] = update_sql("UPDATE {watchdog} SET severity = " . WATCHDOG_WARNING . " WHERE severity = 1");
+ $ret[] = update_sql("UPDATE {watchdog} SET severity = " . WATCHDOG_ERROR . " WHERE severity = 2");
return $ret;
}
@@ -1592,15 +1592,15 @@ function system_update_6017() {
);
foreach ($var_names as $old => $new) {
foreach (array('_subject', '_body') as $suffix) {
- $old_name = 'user_mail_'. $old . $suffix;
- $new_name = 'user_mail_'. $new . $suffix;
+ $old_name = 'user_mail_' . $old . $suffix;
+ $new_name = 'user_mail_' . $new . $suffix;
if ($old_val = variable_get($old_name, FALSE)) {
variable_set($new_name, $old_val);
variable_del($old_name);
$ret[] = array('success' => TRUE, 'query' => "variable_set($new_name)");
$ret[] = array('success' => TRUE, 'query' => "variable_del($old_name)");
if ($old_name == 'user_mail_approval_body') {
- drupal_set_message('Saving an old value of the welcome message body for users that are pending administrator approval. However, you should consider modifying this text, since Drupal can now be configured to automatically notify users and send them their login information when their accounts are approved. See the <a href="'. url('admin/user/settings') .'">User settings</a> page for details.');
+ drupal_set_message('Saving an old value of the welcome message body for users that are pending administrator approval. However, you should consider modifying this text, since Drupal can now be configured to automatically notify users and send them their login information when their accounts are approved. See the <a href="' . url('admin/user/settings') . '">User settings</a> page for details.');
}
}
}
@@ -1627,7 +1627,7 @@ function system_update_6018() {
while ($format = db_fetch_object($result)) {
$weight = db_result(db_query("SELECT MAX(weight) FROM {filters} WHERE format = %d", $format->format));
db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES (%d, '%s', %d, %d)", $format->format, 'filter', 3, max(10, $weight + 1));
- $ret[] = array('success' => TRUE, 'query' => "HTML corrector filter added to the '". $format->name ."' input format.");
+ $ret[] = array('success' => TRUE, 'query' => "HTML corrector filter added to the '" . $format->name . "' input format.");
}
return $ret;
@@ -1732,16 +1732,16 @@ function system_update_6019() {
// Remove default => 0, set auto increment.
$new_uid = 1 + db_result(db_query('SELECT MAX(uid) FROM {users}'));
- $ret[] = update_sql('UPDATE {users} SET uid = '. $new_uid .' WHERE uid = 0');
+ $ret[] = update_sql('UPDATE {users} SET uid = ' . $new_uid . ' WHERE uid = 0');
db_drop_primary_key($ret, 'users');
db_change_field($ret, 'users', 'uid', 'uid', array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('uid')));
- $ret[] = update_sql('UPDATE {users} SET uid = 0 WHERE uid = '. $new_uid);
+ $ret[] = update_sql('UPDATE {users} SET uid = 0 WHERE uid = ' . $new_uid);
// Special field names.
$map = array('node_revisions' => 'vid');
// Make sure these tables have proper auto_increment fields.
foreach (array('boxes', 'files', 'node', 'node_revisions') as $table) {
- $field = isset($map[$table]) ? $map[$table] : $table[0] .'id';
+ $field = isset($map[$table]) ? $map[$table] : $table[0] . 'id';
db_drop_primary_key($ret, $table);
db_change_field($ret, $table, $field, $field, array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array($field)));
}
@@ -1930,7 +1930,7 @@ function system_update_6021() {
$_SESSION['menu_item_map'][$item['mid']] = array('mlid' => $item['mlid'], 'menu_name' => $item['menu_name']);
}
elseif (!isset($_SESSION['menu_menu_map'][$item['mid']])) {
- $item['menu_name'] = 'menu-'. preg_replace('/[^a-zA-Z0-9]/', '-', strtolower($item['title']));
+ $item['menu_name'] = 'menu-' . preg_replace('/[^a-zA-Z0-9]/', '-', strtolower($item['title']));
$item['menu_name'] = substr($item['menu_name'], 0, 20);
$original_menu_name = $item['menu_name'];
$i = 0;
@@ -1957,7 +1957,7 @@ function system_update_6021() {
if (!empty($_SESSION['menu_bogus_menus'])) {
// Remove entries in bogus menus. This is secure because we deleted
// every non-alpanumeric character from the menu name.
- $ret[] = update_sql("DELETE FROM {menu_links} WHERE menu_name IN ('". implode("', '", $_SESSION['menu_bogus_menus']) ."')");
+ $ret[] = update_sql("DELETE FROM {menu_links} WHERE menu_name IN ('" . implode("', '", $_SESSION['menu_bogus_menus']) . "')");
}
$menu_primary_menu = variable_get('menu_primary_menu', 0);
@@ -1983,7 +1983,7 @@ function system_update_6021() {
// Change the existing menu name to 'primary-links'.
$replace = array('%new_name' => 'primary-links', '%desc' => $menus['primary-links']['description'], '%old_name' => $_SESSION['menu_menu_map'][$updated_primary_links_menu]);
$ret[] = update_sql(strtr("UPDATE {menu_custom} SET menu_name = '%new_name', description = '%desc' WHERE menu_name = '%old_name'", $replace));
- $ret[] = update_sql("UPDATE {menu_links} SET menu_name = 'primary-links' WHERE menu_name = '". $_SESSION['menu_menu_map'][$updated_primary_links_menu] ."'");
+ $ret[] = update_sql("UPDATE {menu_links} SET menu_name = 'primary-links' WHERE menu_name = '" . $_SESSION['menu_menu_map'][$updated_primary_links_menu] . "'");
$_SESSION['menu_menu_map'][$updated_primary_links_menu] = 'primary-links';
}
@@ -2007,7 +2007,7 @@ function system_update_6021() {
// Change the existing menu name to 'secondary-links'.
$replace = array('%new_name' => 'secondary-links', '%desc' => $menus['secondary-links']['description'], '%old_name' => $_SESSION['menu_menu_map'][$updated_secondary_links_menu]);
$ret[] = update_sql(strtr("UPDATE {menu_custom} SET menu_name = '%new_name', description = '%desc' WHERE menu_name = '%old_name'", $replace));
- $ret[] = update_sql("UPDATE {menu_links} SET menu_name = 'secondary-links' WHERE menu_name = '". $_SESSION['menu_menu_map'][$updated_secondary_links_menu] ."'");
+ $ret[] = update_sql("UPDATE {menu_links} SET menu_name = 'secondary-links' WHERE menu_name = '" . $_SESSION['menu_menu_map'][$updated_secondary_links_menu] . "'");
$_SESSION['menu_menu_map'][$updated_secondary_links_menu] = 'secondary-links';
}
@@ -2032,10 +2032,10 @@ function system_update_6021() {
foreach ($_SESSION['menu_menu_map'] as $mid => $menu_name) {
// This is again secure because we deleted every non-alpanumeric
// character from the menu name.
- $ret[] = update_sql("UPDATE {blocks} SET delta = '". $menu_name ."' WHERE module = 'menu' AND delta = '". $mid ."'");
- $ret[] = update_sql("UPDATE {blocks_roles} SET delta = '". $menu_name ."' WHERE module = 'menu' AND delta = '". $mid ."'");
+ $ret[] = update_sql("UPDATE {blocks} SET delta = '" . $menu_name . "' WHERE module = 'menu' AND delta = '" . $mid . "'");
+ $ret[] = update_sql("UPDATE {blocks_roles} SET delta = '" . $menu_name . "' WHERE module = 'menu' AND delta = '" . $mid . "'");
}
- $ret[] = array('success' => TRUE, 'query' => 'Relocated '. $_SESSION['system_update_6021'] .' existing items to the new menu system.');
+ $ret[] = array('success' => TRUE, 'query' => 'Relocated ' . $_SESSION['system_update_6021'] . ' existing items to the new menu system.');
$ret[] = update_sql("DROP TABLE {menu}");
unset($_SESSION['system_update_6021'], $_SESSION['system_update_6021_max'], $_SESSION['menu_menu_map'], $_SESSION['menu_item_map'], $_SESSION['menu_bogus_menus']);
// Create the menu overview links - also calls menu_rebuild(). If menu is
@@ -2134,7 +2134,7 @@ function system_update_6026() {
$ret = array();
// Notify user that new update module exists.
- drupal_set_message('Drupal can check periodically for important bug fixes and security releases using the new update status module. This module can be turned on from the <a href="'. url('admin/build/modules') .'">modules administration page</a>. For more information please read the <a href="http://drupal.org/handbook/modules/update">Update status handbook page</a>.');
+ drupal_set_message('Drupal can check periodically for important bug fixes and security releases using the new update status module. This module can be turned on from the <a href="' . url('admin/build/modules') . '">modules administration page</a>. For more information please read the <a href="http://drupal.org/handbook/modules/update">Update status handbook page</a>.');
return $ret;
}
@@ -2394,7 +2394,7 @@ function system_update_6038() {
if (db_table_exists('profile_fields')) {
$ret[] = update_sql("UPDATE {profile_fields} SET category = 'Account settings' WHERE LOWER(category) = 'account'");
if ($affectedrows = db_affected_rows()) {
- drupal_set_message('There were '. $affectedrows .' profile fields that used a reserved category name. They have been assigned to the category "Account settings".');
+ drupal_set_message('There were ' . $affectedrows . ' profile fields that used a reserved category name. They have been assigned to the category "Account settings".');
}
}
return $ret;
@@ -2438,7 +2438,7 @@ function system_update_6041() {
$vid = intval(variable_get('forum_nav_vocabulary', ''));
if (db_table_exists('vocabulary') && $vid) {
$ret[] = update_sql("UPDATE {vocabulary} SET required = 0 WHERE vid = " . $vid);
- $ret[] = update_sql("UPDATE {system} SET weight = ". $weight ." WHERE name = 'forum'");
+ $ret[] = update_sql("UPDATE {system} SET weight = " . $weight . " WHERE name = 'forum'");
}
return $ret;
}
@@ -2448,10 +2448,10 @@ function system_update_6041() {
*/
function system_update_6042() {
foreach (list_themes() as $theme) {
- $stylesheet = variable_get('color_'. $theme->name .'_stylesheet', NULL);
+ $stylesheet = variable_get('color_' . $theme->name . '_stylesheet', NULL);
if (!empty($stylesheet)) {
- variable_set('color_'. $theme->name .'_stylesheets', array($stylesheet));
- variable_del('color_'. $theme->name .'_stylesheet');
+ variable_set('color_' . $theme->name . '_stylesheets', array($stylesheet));
+ variable_del('color_' . $theme->name . '_stylesheet');
}
}
return array();
@@ -2616,7 +2616,7 @@ function system_update_6045() {
// Notify user that delete permissions may have been changed. This was in
// effect since system_update_6039(), but there was no user notice.
- drupal_set_message('Drupal now has separate edit and delete permissions. Previously, users who were able to edit content were automatically allowed to delete it. For added security, delete permissions for individual core content types have been <strong>removed</strong> from all roles on your site (only roles with the "administer nodes" permission can now delete these types of content). If you would like to reenable any individual delete permissions, you can do this at the <a href="'. url('admin/user/permissions', array('fragment' => 'module-node')) .'">permissions page</a>.');
+ drupal_set_message('Drupal now has separate edit and delete permissions. Previously, users who were able to edit content were automatically allowed to delete it. For added security, delete permissions for individual core content types have been <strong>removed</strong> from all roles on your site (only roles with the "administer nodes" permission can now delete these types of content). If you would like to reenable any individual delete permissions, you can do this at the <a href="' . url('admin/user/permissions', array('fragment' => 'module-node')) . '">permissions page</a>.');
return $ret;
}
@@ -2737,7 +2737,7 @@ function system_update_7003() {
}
else {
$invalid_host = check_plain($blocked->mask);
- $ret[] = array('success' => TRUE, 'query' => 'The host '. $invalid_host .' is no longer blocked because it is not a valid IP address.');
+ $ret[] = array('success' => TRUE, 'query' => 'The host ' . $invalid_host . ' is no longer blocked because it is not a valid IP address.');
}
}
if (isset($invalid_host)) {
@@ -2791,8 +2791,8 @@ function system_update_7004(&$sandbox) {
foreach ($renamed_deltas as $module => $deltas) {
foreach ($deltas as $old_delta => $new_delta) {
// Only do the update if the old block actually exists.
- if (db_result(db_query("SELECT COUNT(*) FROM {". $table ."} WHERE module = '%s' AND delta = '%s'", $module, $old_delta))) {
- $ret[] = update_sql("UPDATE {". $table ."} SET delta = '". $new_delta ."' WHERE module = '". $module ."' AND delta = '". $old_delta ."'");
+ if (db_result(db_query("SELECT COUNT(*) FROM {" . $table . "} WHERE module = '%s' AND delta = '%s'", $module, $old_delta))) {
+ $ret[] = update_sql("UPDATE {" . $table . "} SET delta = '" . $new_delta . "' WHERE module = '" . $module . "' AND delta = '" . $old_delta . "'");
}
}
}
diff --git a/modules/system/system.module b/modules/system/system.module
index c864d8082..432881ef9 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -49,60 +49,60 @@ function system_help($path, $arg) {
switch ($path) {
case 'admin/help#system':
- $output = '<p>'. t('The system module is at the foundation of your Drupal website, and provides basic but extensible functionality for use by other modules and themes. Some integral elements of Drupal are contained in and managed by the system module, including caching, enabling or disabling of modules and themes, preparing and displaying the administrative page, and configuring fundamental site settings. A number of key system maintenance operations are also part of the system module.') .'</p>';
- $output .= '<p>'. t('The system module provides:') .'</p>';
- $output .= '<ul><li>'. t('support for enabling and disabling <a href="@modules">modules</a>. Drupal comes packaged with a number of core modules; each module provides a discrete set of features and may be enabled depending on the needs of your site. A wide array of additional modules contributed by members of the Drupal community are available for download at the <a href="@drupal-modules">Drupal.org module page</a>.', array('@modules' => url('admin/build/modules'), '@drupal-modules' => 'http://drupal.org/project/modules')) .'</li>';
- $output .= '<li>'. t('support for enabling and disabling <a href="@themes">themes</a>, which determine the design and presentation of your site. Drupal comes packaged with several core themes and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/build/themes'), '@drupal-themes' => 'http://drupal.org/project/themes')) .'</li>';
- $output .= '<li>'. t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/settings/performance'))) .'</li>';
- $output .= '<li>'. t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) .'</li>';
- $output .= '<li>'. t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily off-line.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) .'</li></ul>';
- $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) .'</p>';
+ $output = '<p>' . t('The system module is at the foundation of your Drupal website, and provides basic but extensible functionality for use by other modules and themes. Some integral elements of Drupal are contained in and managed by the system module, including caching, enabling or disabling of modules and themes, preparing and displaying the administrative page, and configuring fundamental site settings. A number of key system maintenance operations are also part of the system module.') . '</p>';
+ $output .= '<p>' . t('The system module provides:') . '</p>';
+ $output .= '<ul><li>' . t('support for enabling and disabling <a href="@modules">modules</a>. Drupal comes packaged with a number of core modules; each module provides a discrete set of features and may be enabled depending on the needs of your site. A wide array of additional modules contributed by members of the Drupal community are available for download at the <a href="@drupal-modules">Drupal.org module page</a>.', array('@modules' => url('admin/build/modules'), '@drupal-modules' => 'http://drupal.org/project/modules')) . '</li>';
+ $output .= '<li>' . t('support for enabling and disabling <a href="@themes">themes</a>, which determine the design and presentation of your site. Drupal comes packaged with several core themes and additional contributed themes are available at the <a href="@drupal-themes">Drupal.org theme page</a>.', array('@themes' => url('admin/build/themes'), '@drupal-themes' => 'http://drupal.org/project/themes')) . '</li>';
+ $output .= '<li>' . t('a robust <a href="@cache-settings">caching system</a> that allows the efficient re-use of previously-constructed web pages and web page components. Drupal stores the pages requested by anonymous users in a compressed format; depending on your site configuration and the amount of your web traffic tied to anonymous visitors, Drupal\'s caching system may significantly increase the speed of your site.', array('@cache-settings' => url('admin/settings/performance'))) . '</li>';
+ $output .= '<li>' . t('a set of routine administrative operations that rely on a correctly-configured <a href="@cron">cron maintenance task</a> to run automatically. A number of other modules, including the feed aggregator, and search also rely on <a href="@cron">cron maintenance tasks</a>. For more information, see the online handbook entry for <a href="@handbook">configuring cron jobs</a>.', array('@cron' => url('admin/reports/status'), '@handbook' => 'http://drupal.org/cron')) . '</li>';
+ $output .= '<li>' . t('basic configuration options for your site, including <a href="@date-settings">date and time settings</a>, <a href="@file-system">file system settings</a>, <a href="@clean-url">clean URL support</a>, <a href="@site-info">site name and other information</a>, and a <a href="@site-maintenance">site maintenance</a> function for taking your site temporarily off-line.', array('@date-settings' => url('admin/settings/date-time'), '@file-system' => url('admin/settings/file-system'), '@clean-url' => url('admin/settings/clean-urls'), '@site-info' => url('admin/settings/site-information'), '@site-maintenance' => url('admin/settings/site-maintenance'))) . '</li></ul>';
+ $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@system">System module</a>.', array('@system' => 'http://drupal.org/handbook/modules/system/')) . '</p>';
return $output;
case 'admin':
- return '<p>'. t('Welcome to the administration section. Here you may control how your site functions.') .'</p>';
+ return '<p>' . t('Welcome to the administration section. Here you may control how your site functions.') . '</p>';
case 'admin/by-module':
- return '<p>'. t('This page shows you all available administration tasks for each module.') .'</p>';
+ return '<p>' . t('This page shows you all available administration tasks for each module.') . '</p>';
case 'admin/build/themes':
- $output = '<p>'. t('Select which themes are available to your users and specify the default theme. To configure site-wide display settings, click the "configure" task above. Alternatively, to override these settings in a specific theme, click the "configure" link for that theme. Note that different themes may have different regions available for displaying content; for consistency in presentation, you may wish to enable only one theme.') .'</p>';
- $output .= '<p>'. t('To change the appearance of your site, a number of <a href="@themes">contributed themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) .'</p>';
+ $output = '<p>' . t('Select which themes are available to your users and specify the default theme. To configure site-wide display settings, click the "configure" task above. Alternatively, to override these settings in a specific theme, click the "configure" link for that theme. Note that different themes may have different regions available for displaying content; for consistency in presentation, you may wish to enable only one theme.') . '</p>';
+ $output .= '<p>' . t('To change the appearance of your site, a number of <a href="@themes">contributed themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) . '</p>';
return $output;
- case 'admin/build/themes/settings/'. $arg[4]:
+ case 'admin/build/themes/settings/' . $arg[4]:
$reference = explode('.', $arg[4], 2);
$theme = array_pop($reference);
- return '<p>'. t('These options control the display settings for the <code>%template</code> theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the <a href="@global">global settings</a> for this theme.', array('%template' => $theme, '@global' => url('admin/build/themes/settings'))) .'</p>';
+ return '<p>' . t('These options control the display settings for the <code>%template</code> theme. When your site is displayed using this theme, these settings will be used. By clicking "Reset to defaults," you can choose to use the <a href="@global">global settings</a> for this theme.', array('%template' => $theme, '@global' => url('admin/build/themes/settings'))) . '</p>';
case 'admin/build/themes/settings':
- return '<p>'. t('These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.') .'</p>';
+ return '<p>' . t('These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.') . '</p>';
case 'admin/build/modules':
- $output = '<p>'. t('Modules are plugins that extend Drupal\'s core functionality. Enable modules by selecting the <em>Enabled</em> checkboxes below and clicking the <em>Save configuration</em> button. Once a module is enabled, new <a href="@permissions">permissions</a> may be available. To reduce server load, modules with their <em>Throttle</em> checkbox selected are temporarily disabled when your site becomes extremely busy. (Note that the <em>Throttle</em> checkbox is only available if the Throttle module is enabled.)', array('@permissions' => url('admin/user/permissions')));
+ $output = '<p>' . t('Modules are plugins that extend Drupal\'s core functionality. Enable modules by selecting the <em>Enabled</em> checkboxes below and clicking the <em>Save configuration</em> button. Once a module is enabled, new <a href="@permissions">permissions</a> may be available. To reduce server load, modules with their <em>Throttle</em> checkbox selected are temporarily disabled when your site becomes extremely busy. (Note that the <em>Throttle</em> checkbox is only available if the Throttle module is enabled.)', array('@permissions' => url('admin/user/permissions')));
if (module_exists('throttle')) {
- $output .= ' '. t('The auto-throttle functionality must be enabled on the <a href="@throttle">throttle configuration page</a> after having enabled the throttle module.', array('@throttle' => url('admin/settings/throttle')));
+ $output .= ' ' . t('The auto-throttle functionality must be enabled on the <a href="@throttle">throttle configuration page</a> after having enabled the throttle module.', array('@throttle' => url('admin/settings/throttle')));
}
$output .= '</p>';
- $output .= '<p>'. t('It is important that <a href="@update-php">update.php</a> is run every time a module is updated to a newer version.', array('@update-php' => $base_url .'/update.php')) .'</p>';
- $output .= '<p>'. t('You can find all administration tasks belonging to a particular module on the <a href="@by-module">administration by module page</a>.', array('@by-module' => url('admin/by-module'))) .'</p>';
- $output .= '<p>'. t('To extend the functionality of your site, a number of <a href="@modules">contributed modules</a> are available.', array('@modules' => 'http://drupal.org/project/modules')) .'</p>';
+ $output .= '<p>' . t('It is important that <a href="@update-php">update.php</a> is run every time a module is updated to a newer version.', array('@update-php' => $base_url . '/update.php')) . '</p>';
+ $output .= '<p>' . t('You can find all administration tasks belonging to a particular module on the <a href="@by-module">administration by module page</a>.', array('@by-module' => url('admin/by-module'))) . '</p>';
+ $output .= '<p>' . t('To extend the functionality of your site, a number of <a href="@modules">contributed modules</a> are available.', array('@modules' => 'http://drupal.org/project/modules')) . '</p>';
return $output;
case 'admin/build/modules/uninstall':
- return '<p>'. t('The uninstall process removes all data related to a module. To uninstall a module, you must first disable it. Not all modules support this feature.') .'</p>';
+ return '<p>' . t('The uninstall process removes all data related to a module. To uninstall a module, you must first disable it. Not all modules support this feature.') . '</p>';
case 'admin/build/block/configure':
if ($arg[4] == 'system' && $arg[5] == 0) {
- return '<p>'. t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') .'</p>';
+ return '<p>' . t('The <em>Powered by Drupal</em> block is an optional link to the home page of the Drupal project. While there is absolutely no requirement that sites feature this link, it may be used to show support for Drupal.') . '</p>';
}
break;
case 'admin/settings/actions':
case 'admin/settings/actions/manage':
- $output = '<p>'. t('Actions are individual tasks that the system can do, such as unpublishing a piece of content or banning a user. Modules, such as the trigger module, can fire these actions when certain system events happen; for example, when a new post is added or when a user logs in. Modules may also provide additional actions.') .'</p>';
- $output .= '<p>'. t('There are two types of actions: simple and advanced. Simple actions do not require any additional configuration, and are listed here automatically. Advanced actions can do more than simple actions; for example, send an e-mail to a specified address, or check for certain words within a piece of content. These actions need to be created and configured first before they may be used. To create an advanced action, select the action from the drop-down below and click the <em>Create</em> button.') .'</p>';
+ $output = '<p>' . t('Actions are individual tasks that the system can do, such as unpublishing a piece of content or banning a user. Modules, such as the trigger module, can fire these actions when certain system events happen; for example, when a new post is added or when a user logs in. Modules may also provide additional actions.') . '</p>';
+ $output .= '<p>' . t('There are two types of actions: simple and advanced. Simple actions do not require any additional configuration, and are listed here automatically. Advanced actions can do more than simple actions; for example, send an e-mail to a specified address, or check for certain words within a piece of content. These actions need to be created and configured first before they may be used. To create an advanced action, select the action from the drop-down below and click the <em>Create</em> button.') . '</p>';
if (module_exists('trigger')) {
- $output .= '<p>'. t('You may proceed to the <a href="@url">Triggers</a> page to assign these actions to system events.', array('@url' => url('admin/build/trigger'))) .'</p>';
+ $output .= '<p>' . t('You may proceed to the <a href="@url">Triggers</a> page to assign these actions to system events.', array('@url' => url('admin/build/trigger'))) . '</p>';
}
return $output;
case 'admin/settings/actions/configure':
return t('An advanced action offers additional configuration options which may be filled out below. Changing the <em>Description</em> field is recommended, in order to better identify the precise action taking place. This description will be displayed in modules such as the trigger module when assigning actions to system events, so it is best if it is as descriptive as possible (for example, "Send e-mail to Moderation Team" rather than simply "Send e-mail").');
case 'admin/settings/ip-blocking':
- return '<p>'. t('IP addresses listed here are blocked from your site before any modules are loaded. You may add IP addresses to the list, or delete existing entries.') .'</p>';
+ return '<p>' . t('IP addresses listed here are blocked from your site before any modules are loaded. You may add IP addresses to the list, or delete existing entries.') . '</p>';
case 'admin/reports/status':
- return '<p>'. t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on drupal.org's support forums and project issue queues.") .'</p>';
+ return '<p>' . t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on drupal.org's support forums and project issue queues.") . '</p>';
}
}
@@ -420,7 +420,7 @@ function system_menu() {
);
foreach (list_themes() as $theme) {
- $items['admin/build/themes/settings/'. $theme->name] = array(
+ $items['admin/build/themes/settings/' . $theme->name] = array(
'title' => $theme->info['name'],
'page arguments' => array('system_theme_settings', $theme->name),
'type' => MENU_LOCAL_TASK,
@@ -684,13 +684,13 @@ function system_init() {
if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit'))) {
global $custom_theme;
$custom_theme = variable_get('admin_theme', '0');
- drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
+ drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', 'module');
}
// Add the CSS for this module.
- drupal_add_css(drupal_get_path('module', 'system') .'/defaults.css', 'module');
- drupal_add_css(drupal_get_path('module', 'system') .'/system.css', 'module');
- drupal_add_css(drupal_get_path('module', 'system') .'/system-menus.css', 'module');
+ drupal_add_css(drupal_get_path('module', 'system') . '/defaults.css', 'module');
+ drupal_add_css(drupal_get_path('module', 'system') . '/system.css', 'module');
+ drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', 'module');
}
/**
@@ -758,7 +758,7 @@ function system_block($op = 'list', $delta = '', $edit = NULL) {
variable_set('drupal_badge_size', $edit['size']);
break;
case 'view':
- $image_path = 'misc/'. variable_get('drupal_badge_color', 'powered-blue') .'-'. variable_get('drupal_badge_size', '80x15') .'.png';
+ $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
$block['subject'] = NULL; // Don't display a title
$block['content'] = theme('system_powered_by', $image_path);
return $block;
@@ -793,7 +793,7 @@ function system_admin_menu_block($item) {
}
// Prepare for sorting as in function _menu_tree_check_access().
// The weight is offset so it is always positive, with a uniform 5-digits.
- $content[(50000 + $item['weight']) .' '. $item['title'] .' '. $item['mlid']] = $item;
+ $content[(50000 + $item['weight']) . ' ' . $item['title'] . ' ' . $item['mlid']] = $item;
}
ksort($content);
return $content;
@@ -863,7 +863,7 @@ function system_theme_select_form($description = '', $default_value = '', $weigh
$screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $info->name)), '', array('class' => 'screenshot'), FALSE) : t('no screenshot');
$form['themes'][$info->key]['screenshot'] = array('#value' => $screenshot);
- $form['themes'][$info->key]['description'] = array('#type' => 'item', '#title' => $info->name, '#value' => dirname($info->filename) . ($info->name == variable_get('theme_default', 'garland') ? '<br /> <em>'. t('(site default theme)') .'</em>' : ''));
+ $form['themes'][$info->key]['description'] = array('#type' => 'item', '#title' => $info->name, '#value' => dirname($info->filename) . ($info->name == variable_get('theme_default', 'garland') ? '<br /> <em>' . t('(site default theme)') . '</em>' : ''));
$options[$info->key] = '';
}
@@ -1005,7 +1005,7 @@ function _system_theme_data() {
$sub_themes[] = $key;
}
if (empty($themes[$key]->info['engine'])) {
- $filename = dirname($themes[$key]->filename) .'/'. $themes[$key]->name .'.theme';
+ $filename = dirname($themes[$key]->filename) . '/' . $themes[$key]->name . '.theme';
if (file_exists($filename)) {
$themes[$key]->owner = $filename;
$themes[$key]->prefix = $key;
@@ -1024,7 +1024,7 @@ function _system_theme_data() {
$pathed_stylesheets = array();
foreach ($themes[$key]->info['stylesheets'] as $media => $stylesheets) {
foreach ($stylesheets as $stylesheet) {
- $pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->filename) .'/'. $stylesheet;
+ $pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->filename) . '/' . $stylesheet;
}
}
$themes[$key]->info['stylesheets'] = $pathed_stylesheets;
@@ -1032,12 +1032,12 @@ function _system_theme_data() {
// Give the scripts proper path information.
$scripts = array();
foreach ($themes[$key]->info['scripts'] as $script) {
- $scripts[$script] = dirname($themes[$key]->filename) .'/'. $script;
+ $scripts[$script] = dirname($themes[$key]->filename) . '/' . $script;
}
$themes[$key]->info['scripts'] = $scripts;
// Give the screenshot proper path information.
if (!empty($themes[$key]->info['screenshot'])) {
- $themes[$key]->info['screenshot'] = dirname($themes[$key]->filename) .'/'. $themes[$key]->info['screenshot'];
+ $themes[$key]->info['screenshot'] = dirname($themes[$key]->filename) . '/' . $themes[$key]->info['screenshot'];
}
}
@@ -1237,8 +1237,8 @@ function _system_sort_requirements($a, $b) {
*/
function system_node_type($op, $info) {
if ($op == 'update' && !empty($info->old_type) && $info->type != $info->old_type) {
- $old = 'toggle_node_info_'. $info->old_type;
- $new = 'toggle_node_info_'. $info->type;
+ $old = 'toggle_node_info_' . $info->old_type;
+ $new = 'toggle_node_info_' . $info->type;
$theme_settings = variable_get('theme_settings', array());
if (isset($theme_settings[$old])) {
@@ -1359,7 +1359,7 @@ function system_get_module_admin_tasks($module) {
$admin_task_count = 0;
// Check for permissions.
if (module_hook($module, 'perm') && $admin_access) {
- $admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/permissions', array('fragment' => 'module-'. $module));
+ $admin_tasks[-1] = l(t('Configure permissions'), 'admin/user/permissions', array('fragment' => 'module-' . $module));
}
// Check for menu items that are admin links.
@@ -1474,7 +1474,7 @@ function system_actions_manage() {
foreach ($actions_map as $key => $array) {
if ($array['configurable']) {
- $options[$key] = $array['description'] .'...';
+ $options[$key] = $array['description'] . '...';
}
else {
$unconfigurable[] = $array;
@@ -1504,7 +1504,7 @@ function system_actions_manage() {
if (!empty($pager)) {
$row[] = array(array('data' => $pager, 'colspan' => '3'));
}
- $output .= '<h3>'. t('Actions available to Drupal:') .'</h3>';
+ $output .= '<h3>' . t('Actions available to Drupal:') . '</h3>';
$output .= theme('table', $header, $row);
}
@@ -1552,7 +1552,7 @@ function system_actions_manage_form($form_state, $options = array()) {
*/
function system_actions_manage_form_submit($form, &$form_state) {
if ($form_state['values']['action']) {
- $form_state['redirect'] = 'admin/settings/actions/configure/'. $form_state['values']['action'];
+ $form_state['redirect'] = 'admin/settings/actions/configure/' . $form_state['values']['action'];
}
}
@@ -1612,7 +1612,7 @@ function system_actions_configure($form_state, $action = NULL) {
'#description' => t('A unique description for this advanced action. This description will be displayed in the interface of modules that integrate with actions, such as Trigger module.'),
'#weight' => -10
);
- $action_form = $function .'_form';
+ $action_form = $function . '_form';
$form = array_merge($form, $action_form($edit));
$form['actions_type'] = array(
'#type' => 'value',
@@ -1646,7 +1646,7 @@ function system_actions_configure($form_state, $action = NULL) {
* Validate system_actions_configure form submissions.
*/
function system_actions_configure_validate($form, $form_state) {
- $function = actions_function_lookup($form_state['values']['actions_action']) .'_validate';
+ $function = actions_function_lookup($form_state['values']['actions_action']) . '_validate';
// Hand off validation to the action.
if (function_exists($function)) {
$function($form, $form_state);
@@ -1658,7 +1658,7 @@ function system_actions_configure_validate($form, $form_state) {
*/
function system_actions_configure_submit($form, &$form_state) {
$function = actions_function_lookup($form_state['values']['actions_action']);
- $submit_function = $function .'_submit';
+ $submit_function = $function . '_submit';
// Action will return keyed array of values to store.
$params = $submit_function($form, $form_state);
@@ -1893,7 +1893,7 @@ function system_mail($key, &$message, $params) {
$node = $params['node'];
$variables += array(
'%uid' => $node->uid,
- '%node_url' => url('node/'. $node->nid, array('absolute' => TRUE)),
+ '%node_url' => url('node/' . $node->nid, array('absolute' => TRUE)),
'%node_type' => node_get_types('name', $node),
'%title' => $node->title,
'%teaser' => $node->teaser,
@@ -1967,7 +1967,7 @@ function system_message_action(&$object, $context = array()) {
if (isset($node) && is_object($node)) {
$variables = array_merge($variables, array(
'%uid' => $node->uid,
- '%node_url' => url('node/'. $node->nid, array('absolute' => TRUE)),
+ '%node_url' => url('node/' . $node->nid, array('absolute' => TRUE)),
'%node_type' => check_plain(node_get_types('name', $node)),
'%title' => filter_xss($node->title),
'%teaser' => filter_xss($node->teaser),
@@ -2022,7 +2022,7 @@ function _system_zonelist() {
$zones = array();
foreach ($zonelist as $offset) {
$zone = $offset * 3600;
- $zones[$zone] = format_date($timestamp, 'custom', variable_get('date_format_long', 'l, F j, Y - H:i') .' O', $zone);
+ $zones[$zone] = format_date($timestamp, 'custom', variable_get('date_format_long', 'l, F j, Y - H:i') . ' O', $zone);
}
return $zones;
}