summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/bootstrap.inc12
-rw-r--r--includes/common.inc2
-rw-r--r--includes/database.inc4
-rw-r--r--includes/database.mysql.inc8
-rw-r--r--includes/database.mysqli.inc8
-rw-r--r--includes/database.pgsql.inc16
-rw-r--r--includes/file.inc10
-rw-r--r--includes/form.inc26
-rw-r--r--includes/image.inc2
-rw-r--r--includes/install.inc8
-rw-r--r--includes/install.pgsql.inc4
-rw-r--r--includes/language.inc6
-rw-r--r--includes/locale.inc12
-rw-r--r--includes/menu.inc6
-rw-r--r--includes/theme.inc24
-rw-r--r--includes/xmlrpc.inc8
-rw-r--r--install.php7
-rw-r--r--modules/aggregator/aggregator.module12
-rw-r--r--modules/blogapi/blogapi.module6
-rw-r--r--modules/book/book.module4
-rw-r--r--modules/comment/comment.module4
-rw-r--r--modules/contact/contact.module6
-rw-r--r--modules/drupal/drupal.module4
-rw-r--r--modules/filter/filter.module8
-rw-r--r--modules/forum/forum.module6
-rw-r--r--modules/help/help.module2
-rw-r--r--modules/locale/locale.module8
-rw-r--r--modules/node/content_types.inc4
-rw-r--r--modules/search/search.module10
-rw-r--r--modules/statistics/statistics.module6
-rw-r--r--modules/system/system.module2
-rw-r--r--modules/taxonomy/taxonomy.module2
-rw-r--r--modules/upload/upload.module12
-rw-r--r--modules/user/user.module2
-rw-r--r--themes/garland/template.php2
-rw-r--r--update.php2
36 files changed, 133 insertions, 132 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index b68c95363..4046cbd7b 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -267,7 +267,7 @@ function conf_init() {
if (!isset($parts['path'])) {
$parts['path'] = '';
}
- $base_path = $parts['path'] . '/';
+ $base_path = $parts['path'] .'/';
// Build $base_root (everything until first slash after "scheme://").
$base_root = substr($base_url, 0, strlen($base_url) - strlen($parts['path']));
}
@@ -513,7 +513,7 @@ function drupal_load($type, $name) {
*/
function drupal_page_header() {
header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
}
@@ -530,7 +530,7 @@ function drupal_page_header() {
function drupal_page_cache_header($cache) {
// Set default values:
$last_modified = gmdate('D, d M Y H:i:s', $cache->created) .' GMT';
- $etag = '"'.md5($last_modified).'"';
+ $etag = '"'. md5($last_modified) .'"';
// See if the client has provided the required HTTP headers:
$if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) : FALSE;
@@ -840,7 +840,7 @@ function _drupal_bootstrap($phase) {
// Deny access to hosts which were banned - t() is not yet available.
if (drupal_is_denied('host', $_SERVER['REMOTE_ADDR'])) {
header('HTTP/1.1 403 Forbidden');
- print 'Sorry, '. $_SERVER['REMOTE_ADDR']. ' has been banned.';
+ print 'Sorry, '. $_SERVER['REMOTE_ADDR'] .' has been banned.';
exit();
}
break;
@@ -933,7 +933,7 @@ function drupal_maintenance_theme() {
$themes = drupal_common_themes();
foreach ($themes as $hook => $info) {
if (!isset($info['file']) && !isset($info['function'])) {
- $themes[$hook]['function'] = 'theme_' . $hook;
+ $themes[$hook]['function'] = 'theme_'. $hook;
}
}
_theme_set_registry($themes);
@@ -993,7 +993,7 @@ function language_list($field = 'language', $reset = FALSE) {
// Return the array indexed by the right field
if (!isset($languages[$field])) {
$languages[$field] = array();
- foreach($languages['language'] as $lang) {
+ foreach ($languages['language'] as $lang) {
// Some values should be collected into an array
if (in_array($field, array('enabled', 'weight'))) {
$languages[$field][$lang->$field][$lang->language] = $lang;
diff --git a/includes/common.inc b/includes/common.inc
index 5f4e85922..1ab8a0195 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1199,7 +1199,7 @@ function url($path = NULL, $options = array()) {
$clean_url = (bool)variable_get('clean_url', '0');
}
- $base = $options['absolute'] ? $base_url . '/' : base_path();
+ $base = $options['absolute'] ? $base_url .'/' : base_path();
// The special path '<front>' links to the default front page.
if (!empty($path) && $path != '<front>') {
diff --git a/includes/database.inc b/includes/database.inc
index 66e00df03..f1117b090 100644
--- a/includes/database.inc
+++ b/includes/database.inc
@@ -64,13 +64,13 @@ function db_prefix_tables($sql) {
$tmp = $db_prefix;
unset($tmp['default']);
foreach ($tmp as $key => $val) {
- $sql = strtr($sql, array('{'. $key. '}' => $val. $key));
+ $sql = strtr($sql, array('{'. $key .'}' => $val . $key));
}
return strtr($sql, array('{' => $db_prefix['default'], '}' => ''));
}
else {
foreach ($db_prefix as $key => $val) {
- $sql = strtr($sql, array('{'. $key. '}' => $val. $key));
+ $sql = strtr($sql, array('{'. $key .'}' => $val . $key));
}
return strtr($sql, array('{' => '', '}' => ''));
}
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc
index f8eda3052..4617ca125 100644
--- a/includes/database.mysql.inc
+++ b/includes/database.mysql.inc
@@ -72,7 +72,7 @@ function db_connect($url) {
// Decode url-encoded information in the db connection string
$url['user'] = urldecode($url['user']);
// Test if database url has a password.
- if(isset($url['pass'])) {
+ if (isset($url['pass'])) {
$url['pass'] = urldecode($url['pass']);
}
else {
@@ -154,7 +154,7 @@ function _db_query($query, $debug = 0) {
if (variable_get('dev_query', 0)) {
$bt = debug_backtrace();
- $query = $bt[2]['function'] . "\n" . $query;
+ $query = $bt[2]['function'] ."\n". $query;
list($usec, $sec) = explode(' ', microtime());
$stop = (float)$usec + (float)$sec;
$diff = $stop - $timer;
@@ -377,7 +377,7 @@ function db_query_temporary($query) {
*/
function db_encode_blob($data) {
global $active_db;
- return "'" . mysql_real_escape_string($data, $active_db) . "'";
+ return "'". mysql_real_escape_string($data, $active_db) ."'";
}
/**
@@ -418,7 +418,7 @@ function db_unlock_tables() {
* Check if a table exists.
*/
function db_table_exists($table) {
- return db_num_rows(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
+ return db_num_rows(db_query("SHOW TABLES LIKE '{". db_escape_table($table) ."}'"));
}
/**
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc
index 3ce94c029..5e829fbd3 100644
--- a/includes/database.mysqli.inc
+++ b/includes/database.mysqli.inc
@@ -67,7 +67,7 @@ function db_connect($url) {
// Decode url-encoded information in the db connection string
$url['user'] = urldecode($url['user']);
// Test if database url has a password.
- if(isset($url['pass'])) {
+ if (isset($url['pass'])) {
$url['pass'] = urldecode($url['pass']);
}
else {
@@ -133,7 +133,7 @@ function _db_query($query, $debug = 0) {
if (variable_get('dev_query', 0)) {
$bt = debug_backtrace();
- $query = $bt[2]['function'] . "\n" . $query;
+ $query = $bt[2]['function'] ."\n". $query;
list($usec, $sec) = explode(' ', microtime());
$stop = (float)$usec + (float)$sec;
$diff = $stop - $timer;
@@ -357,7 +357,7 @@ function db_query_temporary($query) {
*/
function db_encode_blob($data) {
global $active_db;
- return "'" . mysqli_real_escape_string($active_db, $data) . "'";
+ return "'". mysqli_real_escape_string($active_db, $data) ."'";
}
/**
@@ -398,7 +398,7 @@ function db_unlock_tables() {
* Check if a table exists.
*/
function db_table_exists($table) {
- return db_num_rows(db_query("SHOW TABLES LIKE '{" . db_escape_table($table) . "}'"));
+ return db_num_rows(db_query("SHOW TABLES LIKE '{". db_escape_table($table) ."}'"));
}
/**
diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc
index 71723d84d..56a30ee9a 100644
--- a/includes/database.pgsql.inc
+++ b/includes/database.pgsql.inc
@@ -65,19 +65,19 @@ function db_connect($url) {
// Decode url-encoded information in the db connection string
if (isset($url['user'])) {
- $conn_string .= ' user=' . urldecode($url['user']);
+ $conn_string .= ' user='. urldecode($url['user']);
}
if (isset($url['pass'])) {
- $conn_string .= ' password=' . urldecode($url['pass']);
+ $conn_string .= ' password='. urldecode($url['pass']);
}
if (isset($url['host'])) {
- $conn_string .= ' host=' . urldecode($url['host']);
+ $conn_string .= ' host='. urldecode($url['host']);
}
if (isset($url['path'])) {
- $conn_string .= ' dbname=' . substr(urldecode($url['path']), 1);
+ $conn_string .= ' dbname='. substr(urldecode($url['path']), 1);
}
if (isset($url['port'])) {
- $conn_string .= ' port=' . urldecode($url['port']);
+ $conn_string .= ' port='. urldecode($url['port']);
}
// pg_last_error() does not return a useful error message for database
@@ -126,7 +126,7 @@ function _db_query($query, $debug = 0) {
if (variable_get('dev_query', 0)) {
$bt = debug_backtrace();
- $query = $bt[2]['function'] . "\n" . $query;
+ $query = $bt[2]['function'] ."\n". $query;
list($usec, $sec) = explode(' ', microtime());
$stop = (float)$usec + (float)$sec;
$diff = $stop - $timer;
@@ -391,7 +391,7 @@ function db_unlock_tables() {
* Check if a table exists.
*/
function db_table_exists($table) {
- return db_num_rows(db_query("SELECT relname FROM pg_class WHERE relname = '{" . db_escape_table($table) . "}'"));
+ return db_num_rows(db_query("SELECT relname FROM pg_class WHERE relname = '{". db_escape_table($table) ."}'"));
}
/**
@@ -421,7 +421,7 @@ function db_distinct_field($table, $field, $query) {
$field_to_select = 'DISTINCT ON ('. $table .'.'. $field .") $table.$field";
// (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT).
$query = preg_replace('/(SELECT.*)(?:'. $table .'\.|\s)(?<!DISTINCT\()(?<!DISTINCT\('. $table .'\.)'. $field .'(.*FROM )/AUsi', '\1 '. $field_to_select .'\2', $query);
- $query = preg_replace('/(ORDER BY )(?!'.$table.'\.'.$field.')/', '\1'."$table.$field, ", $query);
+ $query = preg_replace('/(ORDER BY )(?!'. $table .'\.'. $field .')/', '\1'."$table.$field, ", $query);
return $query;
}
diff --git a/includes/file.inc b/includes/file.inc
index 18bf144cd..7e70ed882 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -28,7 +28,7 @@ define('FILE_EXISTS_ERROR', 2);
*/
function file_create_url($path) {
// Strip file_directory_path from $path. We only include relative paths in urls.
- if (strpos($path, file_directory_path() . '/') === 0) {
+ if (strpos($path, file_directory_path() .'/') === 0) {
$path = trim(substr($path, strlen(file_directory_path())), '\\/');
}
switch (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC)) {
@@ -63,8 +63,8 @@ function file_create_path($dest = 0) {
return $dest;
}
// Not found, try again with prefixed directory path.
- else if (file_check_location($file_path . '/' . $dest, $file_path)) {
- return $file_path . '/' . $dest;
+ else if (file_check_location($file_path .'/'. $dest, $file_path)) {
+ return $file_path .'/'. $dest;
}
// File not found.
return FALSE;
@@ -215,7 +215,7 @@ function file_check_upload($source = 'upload') {
// Unknown error
default:
- drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.', array('%file' => $source)),'error');
+ drupal_set_message(t('The file %file could not be saved. An unknown error has occurred.', array('%file' => $source)), 'error');
return 0;
}
@@ -699,7 +699,7 @@ function file_directory_temp() {
}
// if a directory has been found, use it, otherwise default to 'files/tmp' or 'files\\tmp';
- $temporary_directory = $temporary_directory ? $temporary_directory : file_directory_path() . $path_delimiter . 'tmp';
+ $temporary_directory = $temporary_directory ? $temporary_directory : file_directory_path() . $path_delimiter .'tmp';
variable_set('file_directory_temp', $temporary_directory);
}
diff --git a/includes/form.inc b/includes/form.inc
index 1845f4d9a..53f35ea69 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -728,7 +728,7 @@ function form_builder($form_id, $form) {
}
}
if (!isset($form['#value'])) {
- $function = $form['#type'] . '_value';
+ $function = $form['#type'] .'_value';
if (function_exists($function)) {
$function($form);
}
@@ -928,7 +928,7 @@ function form_options_flatten($array, $reset = TRUE) {
*/
function theme_select($element) {
$select = '';
- $size = $element['#size'] ? ' size="' . $element['#size'] . '"' : '';
+ $size = $element['#size'] ? ' size="'. $element['#size'] .'"' : '';
_form_set_class($element, array('form-select'));
$multiple = $element['#multiple'];
return theme('form_element', $element, '<select name="'. $element['#name'] .''. ($multiple ? '[]' : '') .'"'. ($multiple ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) .' id="'. $element['#id'] .'" '. $size .'>'. form_select_options($element) .'</select>');
@@ -1039,7 +1039,7 @@ function theme_fieldset($element) {
}
}
- return '<fieldset' . drupal_attributes($element['#attributes']) .'>' . ($element['#title'] ? '<legend>'. $element['#title'] .'</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">'. $element['#description'] .'</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . $element['#value'] . "</fieldset>\n";
+ return '<fieldset'. drupal_attributes($element['#attributes']) .'>'. ($element['#title'] ? '<legend>'. $element['#title'] .'</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">'. $element['#description'] .'</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . $element['#value'] ."</fieldset>\n";
}
/**
@@ -1054,7 +1054,7 @@ function theme_fieldset($element) {
function theme_radio($element) {
_form_set_class($element, array('form-radio'));
$output = '<input type="radio" ';
- $output .= 'name="' . $element['#name'] .'" ';
+ $output .= 'name="'. $element['#name'] .'" ';
$output .= 'value="'. $element['#return_value'] .'" ';
$output .= ($element['#value'] == $element['#return_value']) ? ' checked="checked" ' : ' ';
$output .= drupal_attributes($element['#attributes']) .' />';
@@ -1306,10 +1306,10 @@ function theme_checkbox($element) {
$checkbox = '<input ';
$checkbox .= 'type="checkbox" ';
$checkbox .= 'name="'. $element['#name'] .'" ';
- $checkbox .= 'id="'. $element['#id'].'" ' ;
+ $checkbox .= 'id="'. $element['#id'] .'" ' ;
$checkbox .= 'value="'. $element['#return_value'] .'" ';
$checkbox .= $element['#value'] ? ' checked="checked" ' : ' ';
- $checkbox .= drupal_attributes($element['#attributes']) . ' />';
+ $checkbox .= drupal_attributes($element['#attributes']) .' />';
if (!is_null($element['#title'])) {
$checkbox = '<label class="option">'. $checkbox .' '. $element['#title'] .'</label>';
@@ -1371,7 +1371,7 @@ function theme_button($element) {
$element['#attributes']['class'] = 'form-'. $element['#button_type'];
}
- return '<input type="submit" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'id="'. $element['#id'].'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." />\n";
+ return '<input type="submit" '. (empty($element['#name']) ? '' : 'name="'. $element['#name'] .'" ') .'id="'. $element['#id'] .'" value="'. check_plain($element['#value']) .'" '. drupal_attributes($element['#attributes']) ." />\n";
}
/**
@@ -1384,7 +1384,7 @@ function theme_button($element) {
* A themed HTML string representing the hidden form field.
*/
function theme_hidden($element) {
- return '<input type="hidden" name="'. $element['#name'] . '" id="'. $element['#id'] . '" value="'. check_plain($element['#value']) ."\" " . drupal_attributes($element['#attributes']) ." />\n";
+ return '<input type="hidden" name="'. $element['#name'] .'" id="'. $element['#id'] .'" value="'. check_plain($element['#value']) ."\" ". drupal_attributes($element['#attributes']) ." />\n";
}
function theme_token($element) {
@@ -1401,7 +1401,7 @@ function theme_token($element) {
* A themed HTML string representing the textfield.
*/
function theme_textfield($element) {
- $size = $element['#size'] ? ' size="' . $element['#size'] . '"' : '';
+ $size = $element['#size'] ? ' size="'. $element['#size'] .'"' : '';
$class = array('form-text');
$extra = '';
$output = '';
@@ -1423,7 +1423,7 @@ function theme_textfield($element) {
$output .= ' <span class="field-suffix">'. $element['#field_suffix'] .'</span>';
}
- return theme('form_element', $element, $output). $extra;
+ return theme('form_element', $element, $output) . $extra;
}
/**
@@ -1437,8 +1437,8 @@ function theme_textfield($element) {
*/
function theme_form($element) {
// Anonymous div to satisfy XHTML compliance.
- $action = $element['#action'] ? 'action="' . check_url($element['#action']) . '" ' : '';
- return '<form '. $action . ' method="'. $element['#method'] .'" '. 'id="'. $element['#id'] .'"'. drupal_attributes($element['#attributes']) .">\n<div>". $element['#children'] ."\n</div></form>\n";
+ $action = $element['#action'] ? 'action="'. check_url($element['#action']) .'" ' : '';
+ return '<form '. $action .' method="'. $element['#method'] .'" id="'. $element['#id'] .'"'. drupal_attributes($element['#attributes']) .">\n<div>". $element['#children'] ."\n</div></form>\n";
}
/**
@@ -1600,7 +1600,7 @@ function _form_set_class(&$element, $class = array()) {
if ($element['#required']) {
$class[] = 'required';
}
- if (form_get_error($element)){
+ if (form_get_error($element)) {
$class[] = 'error';
}
if (isset($element['#attributes']['class'])) {
diff --git a/includes/image.inc b/includes/image.inc
index 5013d09a3..01db0c5e1 100644
--- a/includes/image.inc
+++ b/includes/image.inc
@@ -31,7 +31,7 @@ function image_get_toolkit() {
static $toolkit;
if (!$toolkit) {
$toolkit = variable_get('image_toolkit', 'gd');
- $toolkit_file = './includes/image.'.$toolkit.'.inc';
+ $toolkit_file = './includes/image.'. $toolkit .'.inc';
if ($toolkit != 'gd' && file_exists($toolkit_file)) {
include_once $toolkit_file;
}
diff --git a/includes/install.inc b/includes/install.inc
index 940df006f..e08196996 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -307,11 +307,11 @@ function drupal_install_profile($profile, $module_list) {
$module_list = array_diff($module_list, array('system'));
$system_path = dirname(drupal_get_filename('module', 'system', NULL));
- require_once './' . $system_path . '/system.install';
+ require_once './'. $system_path .'/system.install';
module_invoke('system', 'install');
$system_versions = drupal_get_schema_versions('system');
$system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED;
- db_query("INSERT INTO {system} (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES('%s', '%s', 'module', '', 1, 0, 0, %d)", $system_path . '/system.module', 'system', $system_version);
+ db_query("INSERT INTO {system} (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES('%s', '%s', 'module', '', 1, 0, 0, %d)", $system_path .'/system.module', 'system', $system_version);
// Now that we've installed things properly, bootstrap the full Drupal environment
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@@ -564,7 +564,7 @@ function drupal_install_fix_file($file, $mask, $message = TRUE) {
*/
function install_goto($path) {
global $base_url;
- header('Location: '. $base_url . '/' . $path);
+ header('Location: '. $base_url .'/'. $path);
exit();
}
@@ -578,7 +578,7 @@ function st($string, $args = array()) {
if (!isset($locale_strings)) {
$locale_strings = array();
- $filename = './profiles/' . $profile . '/' . $install_locale . '.po';
+ $filename = './profiles/'. $profile .'/'. $install_locale .'.po';
if (file_exists($filename)) {
require_once './includes/locale.inc';
$file = (object) array('filepath' => $filename);
diff --git a/includes/install.pgsql.inc b/includes/install.pgsql.inc
index 6a37e06ed..c642186a3 100644
--- a/includes/install.pgsql.inc
+++ b/includes/install.pgsql.inc
@@ -34,8 +34,8 @@ function drupal_test_pgsql($url, &$success) {
$url['path'] = urldecode($url['path']);
// Build pgsql connection string and allow for non-standard PostgreSQL port.
- $conn_string = ' user='. $url['user'] .' dbname='. substr($url['path'], 1) .' password='. $url['pass'] . ' host=' . $url['host'];
- $conn_string .= isset($url['port']) ? ' port=' . $url['port'] : '';
+ $conn_string = ' user='. $url['user'] .' dbname='. substr($url['path'], 1) .' password='. $url['pass'] .' host='. $url['host'];
+ $conn_string .= isset($url['port']) ? ' port='. $url['port'] : '';
// Test connecting to the database.
$connection = @pg_connect($conn_string);
diff --git a/includes/language.inc b/includes/language.inc
index 0d87f6a2c..cb8196d02 100644
--- a/includes/language.inc
+++ b/includes/language.inc
@@ -13,13 +13,13 @@ function language_initialize() {
global $user;
$mode = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
- switch($mode) {
+ switch ($mode) {
case LANGUAGE_NEGOTIATION_NONE:
return language_default();
case LANGUAGE_NEGOTIATION_DOMAIN:
$languages = language_list();
- foreach($languages as $language) {
+ foreach ($languages as $language) {
$parts = parse_url($language->domain);
if ($_SERVER['SERVER_NAME'] == $parts['host']) {
return $language;
@@ -101,7 +101,7 @@ function language_url_rewrite(&$path, &$options) {
// Language can be passed as an option, or we go for current language.
$path_language = isset($options['language']) ? $options['language'] : $language;
- switch(variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE)) {
+ switch (variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE)) {
case LANGUAGE_NEGOTIATION_NONE:
break;
diff --git a/includes/locale.inc b/includes/locale.inc
index e65e10c59..e9f60f627 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -351,7 +351,7 @@ function locale_edit_language_form_submit($form_id, $form_values) {
$default = language_default();
if ($default->language == $form_values['langcode']) {
$properties = array('name', 'native', 'direction', 'enabled', 'plurals', 'formula', 'domain', 'prefix', 'weight');
- foreach($properties as $keyname) {
+ foreach ($properties as $keyname) {
$default->$keyname = $form_values[$keyname];
}
variable_set('language_default', $default);
@@ -595,7 +595,7 @@ function _locale_string_edit($lid) {
}
// Handle erroneous lid.
- if (!isset($orig)){
+ if (!isset($orig)) {
drupal_set_message(t('String not found.'));
drupal_goto('admin/build/locale/string/search');
}
@@ -1409,8 +1409,8 @@ function _locale_export_po($language = NULL) {
}
}
else {
- print 'msgstr[0] ""'. "\n";
- print 'msgstr[1] ""'. "\n";
+ print 'msgstr[0] ""'."\n";
+ print 'msgstr[1] ""'."\n";
}
}
else {
@@ -1418,7 +1418,7 @@ function _locale_export_po($language = NULL) {
print 'msgstr '. _locale_export_print($message['translation']);
}
else {
- print 'msgstr ""'. "\n";
+ print 'msgstr ""'."\n";
}
}
print "\n";
@@ -1479,7 +1479,7 @@ function _locale_export_wrap($str, $len) {
$nstr = 0;
}
elseif (strlen("$cur $word") > $len) {
- $ret[] = $cur . " ";
+ $ret[] = $cur ." ";
$cur = $word;
}
else {
diff --git a/includes/menu.inc b/includes/menu.inc
index 54c6f4617..9a7f35016 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -533,11 +533,11 @@ function theme_menu_tree($tree) {
* Generate the HTML output for a menu item and submenu.
*/
function theme_menu_item($link, $has_children, $menu = '') {
- return '<li class="'. ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf')) .'">'. $link . $menu .'</li>' . "\n";
+ return '<li class="'. ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf')) .'">'. $link . $menu .'</li>'."\n";
}
function theme_menu_local_task($link, $active = FALSE) {
- return '<li '. ($active ? 'class="active" ' : ''). '>'. $link .'</li>';
+ return '<li '. ($active ? 'class="active" ' : '') .'>'. $link .'</li>';
}
/**
@@ -603,7 +603,7 @@ function menu_rebuild() {
}
else {
if (function_exists($matches[1] .'_to_arg')) {
- $to_arg_functions[$k] = $matches[1].'_to_arg';
+ $to_arg_functions[$k] = $matches[1] .'_to_arg';
$load_functions[$k] = NULL;
$match = TRUE;
}
diff --git a/includes/theme.inc b/includes/theme.inc
index bf12b0518..4d02c0ecc 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -71,12 +71,12 @@ function init_theme() {
if (strpos($themes[$theme]->filename, '.theme')) {
// file is a theme; include it
- include_once './' . $themes[$theme]->filename;
+ include_once './'. $themes[$theme]->filename;
_theme_load_registry($theme);
}
elseif (strpos($themes[$theme]->description, '.engine')) {
// file is a template; include its engine
- include_once './' . $themes[$theme]->description;
+ include_once './'. $themes[$theme]->description;
$theme_engine = basename($themes[$theme]->description, '.engine');
if (function_exists($theme_engine .'_init')) {
call_user_func($theme_engine .'_init', $themes[$theme]);
@@ -483,7 +483,7 @@ function theme_get_settings($key = NULL) {
if (module_exists('node')) {
foreach (node_get_types() as $type => $name) {
- $defaults['toggle_node_info_' . $type] = 1;
+ $defaults['toggle_node_info_'. $type] = 1;
}
}
$settings = array_merge($defaults, variable_get('theme_settings', array()));
@@ -549,7 +549,7 @@ function theme_get_setting($setting_name, $refresh = FALSE) {
$settings['favicon'] = base_path() . $favicon;
}
else {
- $settings['favicon'] = base_path() . 'misc/favicon.ico';
+ $settings['favicon'] = base_path() .'misc/favicon.ico';
}
}
elseif ($settings['favicon_path']) {
@@ -680,7 +680,7 @@ function theme_page($content) {
$output .= '</td><td style="vertical-align: top;">';
$output .= theme('breadcrumb', drupal_get_breadcrumb());
- $output .= '<h1>' . drupal_get_title() . '</h1>';
+ $output .= '<h1>'. drupal_get_title() .'</h1>';
if ($tabs = theme('menu_local_tasks')) {
$output .= $tabs;
@@ -864,7 +864,7 @@ function theme_links($links, $attributes = array('class' => 'links')) {
// Automatically add a class to each link and also to each LI
if (isset($link['attributes']) && isset($link['attributes']['class'])) {
- $link['attributes']['class'] .= ' ' . $key;
+ $link['attributes']['class'] .= ' '. $key;
$class = $key;
}
else {
@@ -1155,7 +1155,7 @@ function theme_table_select_header_cell() {
* A themed sort icon.
*/
function theme_tablesort_indicator($style) {
- if ($style == "asc"){
+ if ($style == "asc") {
return theme('image', 'misc/arrow-asc.png', t('sort icon'), t('sort ascending'));
}
else {
@@ -1250,7 +1250,7 @@ function theme_item_list($items = array(), $title = NULL, $type = 'ul', $attribu
}
if (!empty($items)) {
- $output .= "<$type" . drupal_attributes($attributes) . '>';
+ $output .= "<$type". drupal_attributes($attributes) .'>';
foreach ($items as $item) {
$attributes = array();
$children = array();
@@ -1273,7 +1273,7 @@ function theme_item_list($items = array(), $title = NULL, $type = 'ul', $attribu
if (count($children) > 0) {
$data .= theme_item_list($children, NULL, $type, $attributes); // Render nested list
}
- $output .= '<li' . drupal_attributes($attributes) . '>'. $data .'</li>';
+ $output .= '<li'. drupal_attributes($attributes) .'>'. $data .'</li>';
}
$output .= "</$type>";
}
@@ -1285,7 +1285,7 @@ function theme_item_list($items = array(), $title = NULL, $type = 'ul', $attribu
* Returns code that emits the 'more help'-link.
*/
function theme_more_help_link($url) {
- return '<div class="more-help-link">' . t('[<a href="@link">more help...</a>]', array('@link' => check_url($url))) . '</div>';
+ return '<div class="more-help-link">'. t('[<a href="@link">more help...</a>]', array('@link' => check_url($url))) .'</div>';
}
/**
@@ -1293,7 +1293,7 @@ function theme_more_help_link($url) {
*/
function theme_xml_icon($url) {
if ($image = theme('image', 'misc/xml.png', t('XML feed'), t('XML feed'))) {
- return '<a href="'. check_url($url) .'" class="xml-icon">'. $image. '</a>';
+ return '<a href="'. check_url($url) .'" class="xml-icon">'. $image .'</a>';
}
}
@@ -1302,7 +1302,7 @@ function theme_xml_icon($url) {
*/
function theme_feed_icon($url) {
if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), t('Syndicate content'))) {
- return '<a href="'. check_url($url) .'" class="feed-icon">'. $image. '</a>';
+ return '<a href="'. check_url($url) .'" class="feed-icon">'. $image .'</a>';
}
}
diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
index 818114281..f9e0886e2 100644
--- a/includes/xmlrpc.inc
+++ b/includes/xmlrpc.inc
@@ -114,7 +114,7 @@ function xmlrpc_value_get_xml($xmlrpc_value) {
$return = '<struct>'."\n";
foreach ($xmlrpc_value->data as $name => $value) {
$return .= " <member><name>". check_plain($name) ."</name><value>";
- $return .= xmlrpc_value_get_xml($value)."</value></member>\n";
+ $return .= xmlrpc_value_get_xml($value) ."</value></member>\n";
}
$return .= '</struct>';
return $return;
@@ -207,7 +207,7 @@ function xmlrpc_message_tag_open($parser, $tag, $attr) {
$xmlrpc_message = xmlrpc_message_get();
$xmlrpc_message->current_tag_contents = '';
$xmlrpc_message->last_open = $tag;
- switch($tag) {
+ switch ($tag) {
case 'methodCall':
case 'methodResponse':
case 'fault':
@@ -235,7 +235,7 @@ function xmlrpc_message_cdata($parser, $cdata) {
function xmlrpc_message_tag_close($parser, $tag) {
$xmlrpc_message = xmlrpc_message_get();
$value_flag = FALSE;
- switch($tag) {
+ switch ($tag) {
case 'int':
case 'i4':
$value = (int)trim($xmlrpc_message->current_tag_contents);
@@ -355,7 +355,7 @@ function xmlrpc_error($code = NULL, $message = NULL) {
}
function xmlrpc_error_get_xml($xmlrpc_error) {
- return <<<EOD
+ return <<<EOD
<methodResponse>
<fault>
<value>
diff --git a/install.php b/install.php
index 003e68f65..1e7cbf240 100644
--- a/install.php
+++ b/install.php
@@ -336,7 +336,7 @@ function _install_settings_form_validate($db_prefix, $db_type, $db_user, $db_pas
}
else {
// Verify
- $db_url = $db_type .'://'. urlencode($db_user) .($db_pass ? ':'. urlencode($db_pass) : '') .'@'. ($db_host ? urlencode($db_host) : 'localhost'). ($db_port ? ":$db_port" : '') .'/'. urlencode($db_path);
+ $db_url = $db_type .'://'. urlencode($db_user) . ($db_pass ? ':'. urlencode($db_pass) : '') .'@'. ($db_host ? urlencode($db_host) : 'localhost') . ($db_port ? ":$db_port" : '') .'/'. urlencode($db_path);
if (isset($form)) {
form_set_value($form['_db_url'], $db_url);
}
@@ -465,7 +465,8 @@ function install_select_locale($profilename) {
// Don't need to choose locale if only one (English) is available.
if (sizeof($locales) == 1) {
return FALSE;
- } else {
+ }
+ else {
foreach ($locales as $locale) {
if ($_POST['locale'] == $locale->name) {
return $locale->name;
@@ -576,7 +577,7 @@ function install_complete($profile) {
}
else {
// No more steps
- $output .= '<p>' . (drupal_set_message() ? st('Please review the messages above before continuing on to <a href="@url">your new site</a>.', array('@url' => url(''))) : st('You may now visit <a href="@url">your new site</a>.', array('@url' => url('')))) . '</p>';
+ $output .= '<p>'. (drupal_set_message() ? st('Please review the messages above before continuing on to <a href="@url">your new site</a>.', array('@url' => url(''))) : st('You may now visit <a href="@url">your new site</a>.', array('@url' => url('')))) .'</p>';
}
// Output page.
print theme('maintenance_page', $output);
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index b4d884070..ead329dad 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -1048,7 +1048,7 @@ function aggregator_admin_overview() {
* Menu callback; displays the most recent items gathered from any feed.
*/
function aggregator_page_last() {
- drupal_add_feed(url('aggregator/rss'), variable_get('site_name', 'Drupal') . ' ' . t('aggregator'));
+ drupal_add_feed(url('aggregator/rss'), variable_get('site_name', 'Drupal') .' '. t('aggregator'));
return _aggregator_page_list('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_item} i INNER JOIN {aggregator_feed} f ON i.fid = f.fid ORDER BY i.timestamp DESC, i.iid DESC', arg(1));
}
@@ -1070,7 +1070,7 @@ function aggregator_page_source() {
function aggregator_page_category() {
$category = db_fetch_object(db_query('SELECT cid, title FROM {aggregator_category} WHERE cid = %d', arg(2)));
- drupal_add_feed(url('aggregator/rss/'. arg(2)), variable_get('site_name', 'Drupal') . ' ' . t('aggregator - @title', array('@title' => $category->title)));
+ drupal_add_feed(url('aggregator/rss/'. arg(2)), variable_get('site_name', 'Drupal') .' '. t('aggregator - @title', array('@title' => $category->title)));
return _aggregator_page_list('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = '. $category->cid .' ORDER BY timestamp DESC, iid DESC', arg(3));
}
@@ -1213,8 +1213,8 @@ function aggregator_page_rss() {
$result = NULL;
if (arg(2)) {
$category = db_fetch_object(db_query('SELECT cid, title FROM {aggregator_category} WHERE cid = %d', arg(2)));
- $url = '/categories/' . $category->cid;
- $title = ' ' . t('in category') . ' ' . $category->title;
+ $url = '/categories/'. $category->cid;
+ $title = ' '. t('in category') .' '. $category->title;
$sql = 'SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = %d ORDER BY timestamp DESC, iid DESC';
$result = db_query_range($sql, $category->cid, 0, variable_get('feed_default_items', 10));
}
@@ -1237,7 +1237,7 @@ function aggregator_page_rss() {
$item->description = '';
break;
}
- $items .= format_rss_item($item->ftitle . ': ' . $item->title, $item->link, $item->description, array('pubDate' => date('r', $item->timestamp)));
+ $items .= format_rss_item($item->ftitle .': '. $item->title, $item->link, $item->description, array('pubDate' => date('r', $item->timestamp)));
}
$output .= "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
@@ -1421,7 +1421,7 @@ function theme_aggregator_page_item($item) {
* Safely render HTML content, as allowed.
*/
function aggregator_filter_xss($value) {
- return filter_xss($value, preg_split('/\s+|<|>/', variable_get("aggregator_allowed_html_tags", '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'), -1, PREG_SPLIT_NO_EMPTY));
+ return filter_xss($value, preg_split('/\s+|<|>/', variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'), -1, PREG_SPLIT_NO_EMPTY));
}
/**
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index d17825498..fa6cfc0fa 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -138,7 +138,7 @@ function blogapi_blogger_get_users_blogs($appid, $username, $password) {
$types = _blogapi_get_node_types();
$structs = array();
foreach ($types as $type) {
- $structs[] = array('url' => url('blog/' . $user->uid, array('absolute' => TRUE)), 'blogid' => $type, 'blogName' => $user->name . ": " . $type);
+ $structs[] = array('url' => url('blog/'. $user->uid, array('absolute' => TRUE)), 'blogid' => $type, 'blogName' => $user->name .": ". $type);
}
return $structs;
}
@@ -161,7 +161,7 @@ function blogapi_blogger_get_user_info($appkey, $username, $password) {
'firstname' => $name[0],
'nickname' => $user->name,
'email' => $user->mail,
- 'url' => url('blog/' . $user->uid, array('absolute' => TRUE)));
+ 'url' => url('blog/'. $user->uid, array('absolute' => TRUE)));
}
else {
return blogapi_error($user);
@@ -582,7 +582,7 @@ function blogapi_init() {
function blogapi_rsd() {
global $base_url;
- $xmlrpc = $base_url .'/'. 'xmlrpc.php';
+ $xmlrpc = $base_url .'/xmlrpc.php';
$base = url('', array('absolute' => TRUE));
$blogid = 1; # until we figure out how to handle multiple bloggers
diff --git a/modules/book/book.module b/modules/book/book.module
index 2c4a4f31f..9451e623d 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -706,7 +706,7 @@ function theme_book_export_html($title, $content) {
$html .= '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">';
$html .= "<head>\n<title>". $title ."</title>\n";
$html .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
- $html .= '<base href="'. $base_url .'/" />' . "\n";
+ $html .= '<base href="'. $base_url .'/" />'."\n";
$html .= "<style type=\"text/css\">\n@import url(misc/print.css);\n</style>\n";
$html .= "</head>\n<body>\n". $content ."\n</body>\n</html>\n";
return $html;
@@ -864,7 +864,7 @@ function theme_book_admin_table($form) {
drupal_render($form[$key]['weight']),
l(t('view'), 'node/'. $nid),
l(t('edit'), 'node/'. $nid .'/edit'),
- l(t('delete'), 'node/'. $nid .'/delete', NULL, 'destination=admin/content/book'. (arg(3) == 'orphan' ? '/orphan' : '') . ($pid != $nid ? '/'.$pid : ''))
+ l(t('delete'), 'node/'. $nid .'/delete', NULL, 'destination=admin/content/book'. (arg(3) == 'orphan' ? '/orphan' : '') . ($pid != $nid ? '/'. $pid : ''))
);
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 48a6ba5b5..23d4e28b8 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1814,7 +1814,7 @@ function comment_controls_submit($form_id, $form_values) {
function theme_comment($comment, $links = array()) {
$output = '<div class="comment'. ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') .'">';
- $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")) . ' ' . theme('mark', $comment->new) ."</div>\n";
+ $output .= '<div class="subject">'. l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")) .' '. theme('mark', $comment->new) ."</div>\n";
$output .= '<div class="credit">'. t('by %a on %b', array('%a' => theme('username', $comment), '%b' => format_date($comment->timestamp))) ."</div>\n";
$output .= '<div class="body">'. $comment->comment .'</div>';
$output .= theme('user_signature', $comment->signature);
@@ -1825,7 +1825,7 @@ function theme_comment($comment, $links = array()) {
function theme_comment_folded($comment) {
$output = "<div class=\"comment-folded\">\n";
- $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, array('fragment' => "comment-$comment->cid")) . ' '. theme('mark', $comment->new) .'</span> ';
+ $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, array('fragment' => "comment-$comment->cid")) .' '. theme('mark', $comment->new) .'</span> ';
$output .= '<span class="credit">'. t('by') .' '. theme('username', $comment) ."</span>\n";
$output .= "</div>\n";
return $output;
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index f9d5e7fda..23d4e3cdf 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -27,7 +27,7 @@ function contact_help($section) {
$menu_note = '';
}
$output .= '<p>'. t('The contact module also adds a <a href="@menu-settings">menu item</a> (disabled by default) to the navigation block.', array('@menu-settings' => url('admin/build/menu'))) .' '. $menu_note .'</p>';
- return($output);
+ return $output;
}
}
@@ -235,7 +235,7 @@ function contact_admin_edit_submit($form_id, $form_values) {
db_query('UPDATE {contact} SET selected = 0');
}
$recipients = explode(',', $form_values['recipients']);
- foreach ($recipients as $key=>$recipient) {
+ foreach ($recipients as $key => $recipient) {
// E-mail address validation has already been done in _validate.
$recipients[$key] = trim($recipient);
}
@@ -550,6 +550,6 @@ function contact_mail_page_submit($form_id, $form_values) {
drupal_set_message(t('Your message has been sent.'));
// Jump to home page rather than back to contact page to avoid contradictory messages if flood control has been activated.
- return('');
+ return '';
}
diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module
index acdc64584..980467109 100644
--- a/modules/drupal/drupal.module
+++ b/modules/drupal/drupal.module
@@ -240,8 +240,8 @@ function theme_client_list($clients) {
// The mission is stripped of any HTML tags to keep the output simple and consistent.
$output = "\n<dl>\n";
foreach ($clients as $client) {
- $output .= ' <dt><a href="' . check_url($client->link) . '">' . check_plain($client->name) . '</a> - ' . check_plain($client->slogan) . "</dt>\n";
- $output .= ' <dd>' . strip_tags($client->mission) . "</dd>\n";
+ $output .= ' <dt><a href="'. check_url($client->link) .'">'. check_plain($client->name) .'</a> - '. check_plain($client->slogan) ."</dt>\n";
+ $output .= ' <dd>'. strip_tags($client->mission) ."</dd>\n";
}
$output .= "</dl>\n";
return $output;
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 620aa6c3e..337ecfaee 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -173,7 +173,7 @@ function filter_filter_tips($delta, $format, $long = FALSE) {
'a' => array( t('Anchors are used to make links to other pages.'), '<a href="'. $base_url .'">'. variable_get('site_name', 'Drupal') .'</a>'),
'br' => array( t('By default line break tags are automatically added, so use this tag to add additional ones. Use of this tag is different because it is not used with an open/close pair like all the others. Use the extra " /" inside the tag to maintain XHTML 1.0 compatibility'), t('Text with <br />line break')),
'p' => array( t('By default paragraph tags are automatically added, so use this tag to add additional ones.'), '<p>'. t('Paragraph one.') .'</p> <p>'. t('Paragraph two.') .'</p>'),
- 'strong' => array( t('Strong'), '<strong>'. t('Strong'). '</strong>'),
+ 'strong' => array( t('Strong'), '<strong>'. t('Strong') .'</strong>'),
'em' => array( t('Emphasized'), '<em>'. t('Emphasized') .'</em>'),
'cite' => array( t('Cited'), '<cite>'. t('Cited') .'</cite>'),
'code' => array( t('Coded text used to show programming source code'), '<code>'. t('Coded') .'</code>'),
@@ -315,7 +315,7 @@ function filter_admin_overview() {
$default = ($id == variable_get('filter_default_format', 1));
$options[$id] = '';
$form[$format->name]['id'] = array('#value' => $id);
- $form[$format->name]['roles'] = array('#value' => $default ? t('All roles may use default format') : ($roles ? implode(', ',$roles) : t('No roles may use this format')));
+ $form[$format->name]['roles'] = array('#value' => $default ? t('All roles may use default format') : ($roles ? implode(', ', $roles) : t('No roles may use this format')));
$form[$format->name]['configure'] = array('#value' => l(t('configure'), 'admin/settings/filters/'. $id));
$form[$format->name]['delete'] = array('#value' => $default ? '' : l(t('delete'), 'admin/settings/filters/delete/'. $id));
}
@@ -633,7 +633,7 @@ function filter_formats($index = NULL) {
$where[] = "roles LIKE '%%,%d,%%'";
$args[] = $rid;
}
- $query .= ' WHERE '. implode(' OR ', $where) . ' OR format = %d';
+ $query .= ' WHERE '. implode(' OR ', $where) .' OR format = %d';
$args[] = variable_get('filter_default_format', 1);
}
@@ -934,7 +934,7 @@ function theme_filter_tips($tips, $long = FALSE, $extra = '') {
$tips = '';
foreach ($tiplist as $tip) {
- $tips .= '<li'. ($long ? ' id="filter-'. str_replace("/", "-", $tip['id']) .'">' : '>') . $tip['tip'] . '</li>';
+ $tips .= '<li'. ($long ? ' id="filter-'. str_replace("/", "-", $tip['id']) .'">' : '>') . $tip['tip'] .'</li>';
}
if ($tips) {
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index b5895d40f..ac6bb27cc 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -217,7 +217,7 @@ function forum_admin_settings() {
'#options' => $number,
'#description' => t('The default number of topics displayed per page; links to browse older messages are automatically being displayed.'),
);
- $forder = array(1 => t('Date - newest first'), 2 => t('Date - oldest first'), 3 => t('Posts - most active first'), 4=> t('Posts - least active first'));
+ $forder = array(1 => t('Date - newest first'), 2 => t('Date - oldest first'), 3 => t('Posts - most active first'), 4 => t('Posts - least active first'));
$form['forum_order'] = array('#type' => 'radios',
'#title' => t('Default order'),
'#default_value' => variable_get('forum_order', '1'),
@@ -365,7 +365,7 @@ function forum_submit(&$node) {
$node->tid = $term;
}
}
- $old_tid = db_result(db_query_range("SELECT tid FROM {forum} WHERE nid = %d ORDER BY vid DESC", $node->nid, 0,1));
+ $old_tid = db_result(db_query_range("SELECT tid FROM {forum} WHERE nid = %d ORDER BY vid DESC", $node->nid, 0, 1));
if ($old_tid) {
if (($node->tid != $old_tid) && $node->shadow) {
// A shadow copy needs to be created. Retain new term and add old term.
@@ -639,7 +639,7 @@ function forum_overview() {
}
}
else {
- $rows[] = array(array('data' => '<em>' . t('There are no existing containers or forums. You may add some on the <a href="@container">add container</a> or <a href="@forum">add forum</a> pages.', array('@container' => url('admin/content/forum/add/container'), '@forum' => url('admin/content/forum/add/forum'))) . '</em>', 'colspan' => 2));
+ $rows[] = array(array('data' => '<em>'. t('There are no existing containers or forums. You may add some on the <a href="@container">add container</a> or <a href="@forum">add forum</a> pages.', array('@container' => url('admin/content/forum/add/container'), '@forum' => url('admin/content/forum/add/forum'))) .'</em>', 'colspan' => 2));
}
return theme('table', $header, $rows);
}
diff --git a/modules/help/help.module b/modules/help/help.module
index 399110041..bacdf616d 100644
--- a/modules/help/help.module
+++ b/modules/help/help.module
@@ -111,7 +111,7 @@ function help_page() {
$name = arg(2);
$output = '';
if (module_hook($name, 'help')) {
- $module = _module_parse_info_file(drupal_get_path('module', $name).'/'. $name .'.info');
+ $module = _module_parse_info_file(drupal_get_path('module', $name) .'/'. $name .'.info');
drupal_set_title($module['name']);
$temp = module_invoke($name, 'help', "admin/help#$name");
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 9d769a851..3eecc4562 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -155,7 +155,7 @@ function locale_user($type, $edit, &$user, $category = NULL) {
$user->language = $default->language;
}
$names = array();
- foreach($languages as $langcode => $language) {
+ foreach ($languages as $langcode => $language) {
$names[$langcode] = t($language->name) .' ('. $language->native .')';
}
$form['locale'] = array('#type' => 'fieldset',
@@ -246,7 +246,7 @@ function locale($string) {
}
}
// Clear locale cache in DB
- cache_clear_all('locale:' . $language->language, 'cache');
+ cache_clear_all('locale:'. $language->language, 'cache');
}
}
@@ -268,7 +268,7 @@ function locale_refresh_cache() {
while ($data = db_fetch_object($result)) {
$t[$data->source] = (empty($data->translation) ? TRUE : $data->translation);
}
- cache_set('locale:' . $language->language, 'cache', serialize($t));
+ cache_set('locale:'. $language->language, 'cache', serialize($t));
}
}
@@ -328,7 +328,7 @@ function locale_language_list($field = 'name', $all = FALSE) {
$languages = $languages[1];
}
$list = array();
- foreach($languages as $language) {
+ foreach ($languages as $language) {
$list[$language->language] = ($field == 'name') ? t($language->name) : $language->$field;
}
return $list;
diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc
index b3bf3442f..eef1589aa 100644
--- a/modules/node/content_types.inc
+++ b/modules/node/content_types.inc
@@ -109,7 +109,7 @@ function node_type_form($type = NULL) {
$form['submission'] = array(
'#type' => 'fieldset',
- '#title' =>t('Submission form'),
+ '#title' => t('Submission form'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
@@ -147,7 +147,7 @@ function node_type_form($type = NULL) {
);
$form['workflow'] = array(
'#type' => 'fieldset',
- '#title' =>t('Workflow'),
+ '#title' => t('Workflow'),
'#collapsible' => TRUE,
);
$form['workflow']['node_options'] = array('#type' => 'checkboxes',
diff --git a/modules/search/search.module b/modules/search/search.module
index 67971dc70..93cfeb0e6 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -233,7 +233,7 @@ function search_admin_settings() {
}
}
$count = format_plural($remaining, 'There is 1 item left to index.', 'There are @count items left to index.');
- $percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) . '%';
+ $percentage = ((int)min(100, 100 * ($total - $remaining) / max(1, $total))) .'%';
$status = '<p><strong>'. t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) .' '. $count .'</strong></p>';
$form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status'));
$form['status']['status'] = array('#value' => $status);
@@ -385,7 +385,7 @@ function search_simplify($text) {
// With the exception of the rules above, we consider all punctuation,
// marks, spacers, etc, to be a word boundary.
- $text = preg_replace('/['. PREG_CLASS_SEARCH_EXCLUDE . ']+/u', ' ', $text);
+ $text = preg_replace('/['. PREG_CLASS_SEARCH_EXCLUDE .']+/u', ' ', $text);
return $text;
}
@@ -1198,7 +1198,7 @@ function search_excerpt($keys, $text) {
// If we didn't find anything, return the beginning.
if (count($ranges) == 0) {
- return truncate_utf8($text, 256) . ' ...';
+ return truncate_utf8($text, 256) .' ...';
}
// Sort the text ranges by starting position.
@@ -1228,7 +1228,7 @@ function search_excerpt($keys, $text) {
foreach ($newranges as $from => $to) {
$out[] = substr($text, $from, $to - $from);
}
- $text = (isset($newranges[0]) ? '' : '... '). implode(' ... ', $out) .' ...';
+ $text = (isset($newranges[0]) ? '' : '... ') . implode(' ... ', $out) .' ...';
// Highlight keywords. Must be done at once to prevent conflicts ('strong' and '<strong>').
$text = preg_replace('/'. $boundary .'('. implode('|', $keys) .')'. $boundary .'/iu', '<strong>\0</strong>', $text);
@@ -1275,7 +1275,7 @@ function theme_search_item($item, $type) {
if (isset($item['extra']) && is_array($item['extra'])) {
$info = array_merge($info, $item['extra']);
}
- $output .= ' <dd>'. (!empty($item['snippet']) ? '<p>'. $item['snippet'] . '</p>' : '') . '<p class="search-info">' . implode(' - ', $info) .'</p></dd>';
+ $output .= ' <dd>'. (!empty($item['snippet']) ? '<p>'. $item['snippet'] .'</p>' : '') .'<p class="search-info">'. implode(' - ', $info) .'</p></dd>';
return $output;
}
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index d53371433..6660e2d90 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -199,7 +199,7 @@ function statistics_node_tracker() {
array('data' => t('User'), 'field' => 'u.name'),
array('data' => t('Operations')));
- $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\'' . tablesort_sql($header), 30, 0, NULL, $node->nid);
+ $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\''. tablesort_sql($header), 30, 0, NULL, $node->nid);
$rows = array();
while ($log = db_fetch_object($result)) {
$rows[] = array(
@@ -229,7 +229,7 @@ function statistics_user_tracker() {
array('data' => t('Page'), 'field' => 'path'),
array('data' => t('Operations')));
- $result = pager_query('SELECT aid, timestamp, path, title FROM {accesslog} WHERE uid = %d' . tablesort_sql($header), 30, 0, NULL, $account->uid);
+ $result = pager_query('SELECT aid, timestamp, path, title FROM {accesslog} WHERE uid = %d'. tablesort_sql($header), 30, 0, NULL, $account->uid);
while ($log = db_fetch_object($result)) {
$rows[] = array(
array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
@@ -258,7 +258,7 @@ function statistics_recent_hits() {
array('data' => t('Operations'))
);
- $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {users} u ON u.uid = a.uid' . tablesort_sql($header);
+ $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {users} u ON u.uid = a.uid'. tablesort_sql($header);
$result = pager_query($sql, 30);
$rows = array();
diff --git a/modules/system/system.module b/modules/system/system.module
index 1ca4fa194..b9c83c3ab 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -355,7 +355,7 @@ function system_user($type, $edit, &$user, $category = NULL) {
if (variable_get('configurable_timezones', 1)) {
$zones = _system_zonelist();
$form['timezone'] = array(
- '#type'=>'fieldset',
+ '#type' => 'fieldset',
'#title' => t('Locale settings'),
'#weight' => 6,
'#collapsible' => TRUE,
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 94ea2abce..41fd596d7 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -202,7 +202,7 @@ function taxonomy_overview_terms($vocabulary) {
if (($start_from && ($start_from * $page_increment) >= $total_entries) || ($displayed_count == $page_increment)) {
continue;
}
- $rows[] = array(str_repeat('--', $term->depth) . ' ' . l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array('query' => $destination)));
+ $rows[] = array(str_repeat('--', $term->depth) .' '. l($term->name, "taxonomy/term/$term->tid"), l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array('query' => $destination)));
$displayed_count++; // we're counting tids displayed
}
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 46de72dc1..aff48c849 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -108,7 +108,7 @@ function upload_init() {
if (strpos($filename, file_directory_path()) !== FALSE) {
$filename = trim(substr($filename, strlen(file_directory_path())), '\\/');
}
- $filename = 'system/files/' . $filename;
+ $filename = 'system/files/'. $filename;
}
$_SESSION['file_previews'][$fid]->_filename = $filename;
menu_set_item($filename, $item);
@@ -129,7 +129,7 @@ function upload_admin_settings_validate($form_id, $form_values) {
$default_uploadsize = $form_values['upload_uploadsize_default'];
$default_usersize = $form_values['upload_usersize_default'];
- $exceed_max_msg = t('Your PHP settings limit the maximum file size per upload to %size MB.', array('%size' => file_upload_max_size())).'<br/>';
+ $exceed_max_msg = t('Your PHP settings limit the maximum file size per upload to %size MB.', array('%size' => file_upload_max_size())) .'<br/>';
$more_info = t("Depending on your sever environment, these settings may be changed in the system-wide php.ini file, a php.ini file in your Drupal root directory, in your Drupal site's settings.php file, or in the .htaccess file in your Drupal root directory.");
if (!is_numeric($default_uploadsize) || ($default_uploadsize <= 0)) {
@@ -222,7 +222,7 @@ function upload_admin_settings() {
'#field_suffix' => t('MB')
);
- $form['settings_general']['upload_max_size'] = array('#value' => '<p>'. t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))).'</p>');
+ $form['settings_general']['upload_max_size'] = array('#value' => '<p>'. t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))) .'</p>');
$roles = user_roles(0, 'upload files');
$form['roles'] = array('#type' => 'value', '#value' => $roles);
@@ -301,7 +301,7 @@ function _upload_prepare(&$node) {
// Clean up old file previews if a post didn't get the user to this page.
// i.e. the user left the edit page, because they didn't want to upload anything.
- if(count($_POST) == 0) {
+ if (count($_POST) == 0) {
if (!empty($_SESSION['file_previews']) && is_array($_SESSION['file_previews'])) {
foreach ($_SESSION['file_previews'] as $fid => $file) {
file_delete($file->filepath);
@@ -329,7 +329,7 @@ function _upload_prepare(&$node) {
$key = 'upload_'. (isset($_SESSION['file_previews']) ? 0 : count($_SESSION['file_previews']));
$file->fid = $key;
$file->source = $key;
- $file->list = variable_get('upload_list_default',1);
+ $file->list = variable_get('upload_list_default', 1);
$_SESSION['file_previews'][$key] = $file;
// Store the uploaded fid for this page request in case of submit without
@@ -796,7 +796,7 @@ function _upload_form($node) {
// if the file was uploaded this page request, set value. this fixes the problem
// formapi has recognizing new checkboxes. see comments in _upload_prepare.
if (isset($_SESSION['file_current_upload']) && $_SESSION['file_current_upload'] == $file->fid) {
- $form['files'][$key]['list']['#value'] = variable_get('upload_list_default',1);
+ $form['files'][$key]['list']['#value'] = variable_get('upload_list_default', 1);
}
$form['files'][$key]['filename'] = array('#type' => 'value', '#value' => $file->filename);
$form['files'][$key]['filepath'] = array('#type' => 'value', '#value' => $file->filepath);
diff --git a/modules/user/user.module b/modules/user/user.module
index 49a6204aa..e0a2e9b39 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1267,7 +1267,7 @@ function user_pass_reset($uid, $timestamp, $hashed_pass, $action = NULL) {
function user_pass_reset_url($account) {
$timestamp = time();
- return url("user/reset/$account->uid/$timestamp/".user_pass_rehash($account->pass, $timestamp, $account->login), array('absolute' => TRUE));
+ return url("user/reset/$account->uid/$timestamp/". user_pass_rehash($account->pass, $timestamp, $account->login), array('absolute' => TRUE));
}
function user_pass_rehash($password, $timestamp, $login) {
diff --git a/themes/garland/template.php b/themes/garland/template.php
index b1b8edee7..9caf7dfd6 100644
--- a/themes/garland/template.php
+++ b/themes/garland/template.php
@@ -45,7 +45,7 @@ function phptemplate_comment_wrapper($content, $type = null) {
if (isset($type)) $node_type = $type;
if (!$content || $node_type == 'forum') {
- return '<div id="comments">'. $content . '</div>';
+ return '<div id="comments">'. $content .'</div>';
}
else {
return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
diff --git a/update.php b/update.php
index 98b5d0588..51a4181b5 100644
--- a/update.php
+++ b/update.php
@@ -358,7 +358,7 @@ function update_script_selection_form() {
$form['start'][$module] = array(
'#type' => 'select',
- '#title' => $module . ' module',
+ '#title' => $module .' module',
'#default_value' => $default,
'#options' => $updates,
);