summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/batch.inc4
-rw-r--r--includes/database.inc2
-rw-r--r--includes/database.mysql-common.inc4
-rw-r--r--includes/database.pgsql.inc2
-rw-r--r--includes/form.inc10
-rw-r--r--includes/install.inc2
-rw-r--r--includes/locale.inc6
-rw-r--r--includes/mail.inc4
-rw-r--r--includes/menu.inc2
-rw-r--r--includes/module.inc2
-rw-r--r--includes/theme.inc18
-rw-r--r--includes/xmlrpc.inc2
-rw-r--r--includes/xmlrpcs.inc4
-rw-r--r--install.php10
-rw-r--r--modules/comment/comment.module16
15 files changed, 44 insertions, 44 deletions
diff --git a/includes/batch.inc b/includes/batch.inc
index 3f93bcbbc..8bca73270 100644
--- a/includes/batch.inc
+++ b/includes/batch.inc
@@ -226,7 +226,7 @@ function _batch_process() {
'@percentage' => $percentage,
);
$message = strtr($progress_message, $values) .'<br/>';
- $message.= $task_message ? $task_message : '&nbsp';
+ $message .= $task_message ? $task_message : '&nbsp';
return array($percentage, $message);
}
@@ -272,7 +272,7 @@ function _batch_finished() {
$batch =& batch_get();
// Execute the 'finished' callbacks.
- foreach($batch['sets'] as $key => $batch_set) {
+ foreach ($batch['sets'] as $key => $batch_set) {
if (isset($batch_set['finished']) && function_exists($batch_set['finished'])) {
$batch_set['finished']($batch_set['success'], $batch_set['results'], $batch_set['operations']);
}
diff --git a/includes/database.inc b/includes/database.inc
index 7e3a98368..a1c0c8230 100644
--- a/includes/database.inc
+++ b/includes/database.inc
@@ -490,7 +490,7 @@ function _db_type_placeholder($type) {
// There is no safe value to return here, so return something that
// will cause the query to fail.
- return 'unsupported type '. $type . 'for _db_type_placeholder';
+ return 'unsupported type '. $type .'for _db_type_placeholder';
}
/**
diff --git a/includes/database.mysql-common.inc b/includes/database.mysql-common.inc
index ce96918e8..937a8e16b 100644
--- a/includes/database.mysql-common.inc
+++ b/includes/database.mysql-common.inc
@@ -406,7 +406,7 @@ function db_drop_unique_key(&$ret, $table, $name) {
* An array of field names.
*/
function db_add_index(&$ret, $table, $name, $fields) {
- $query = 'ALTER TABLE {'. $table .'} ADD INDEX '. $name .' ('. _db_create_key_sql($fields) . ')';
+ $query = 'ALTER TABLE {'. $table .'} ADD INDEX '. $name .' ('. _db_create_key_sql($fields) .')';
$ret[] = update_sql($query);
}
@@ -482,4 +482,4 @@ function db_last_insert_id($table, $field) {
/**
* @} End of "ingroup schemaapi".
- */ \ No newline at end of file
+ */
diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc
index 36ca5689a..4e4d9bbe5 100644
--- a/includes/database.pgsql.inc
+++ b/includes/database.pgsql.inc
@@ -245,7 +245,7 @@ function db_error() {
* The name of the autoincrement field.
*/
function db_last_insert_id($table, $field) {
- return db_result(db_query("SELECT currval('%s_seq')", db_prefix_tables('{'. $table .'}') . '_'. $field));
+ return db_result(db_query("SELECT currval('%s_seq')", db_prefix_tables('{'. $table .'}') .'_'. $field));
}
/**
diff --git a/includes/form.inc b/includes/form.inc
index 7be8fb061..4dcd14391 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -846,7 +846,7 @@ function _form_builder_handle_input_element($form_id, &$form, &$form_state) {
$form['#value'] = $function($form);
}
// Final catch. If we haven't set a value yet, use the explicit default value.
- if(!isset($form['#value'])) {
+ if (!isset($form['#value'])) {
$form['#value'] = isset($form['#default_value']) ? $form['#default_value'] : '';
}
}
@@ -1711,12 +1711,12 @@ function theme_image_button($element) {
$element['#attributes']['class'] = 'form-'. $element['#button_type'];
}
- return '<input type="image" name="'. $element['#name'] .'" ' .
+ return '<input type="image" name="'. $element['#name'] .'" '.
(!empty($element['#value']) ? ('value="'. check_plain($element['#value']) .'" ') : '') .
- 'id="' . $element['#id'] . '" ' .
+ 'id="'. $element['#id'] .'" '.
drupal_attributes($element['#attributes']) .
- ' src="' . base_path() . $element['#src'] . '" ' .
- (!empty($element['#title']) ? 'alt="' . check_plain($element['#title']) . '" title="' . check_plain($element['#title']) . '" ' : '' ).
+ ' src="'. base_path() . $element['#src'] .'" '.
+ (!empty($element['#title']) ? 'alt="'. check_plain($element['#title']) .'" title="'. check_plain($element['#title']) .'" ' : '' ) .
"/>\n";
}
diff --git a/includes/install.inc b/includes/install.inc
index 73ce2c263..8234c37e6 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -360,7 +360,7 @@ function drupal_uninstall_module($module) {
if (!empty($paths)) {
$paths = array_keys($paths);
// Clean out the names of load functions.
- foreach($paths as $index => $path) {
+ foreach ($paths as $index => $path) {
$parts = explode('/', $path, MENU_MAX_PARTS);
foreach ($parts as $k => $part) {
if (preg_match('/^%[a-z_]*$/', $part)) {
diff --git a/includes/locale.inc b/includes/locale.inc
index 2845db8f5..caa345765 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -81,7 +81,7 @@ function theme_locale_languages_overview_form($form) {
drupal_render($form['direction'][$key]),
drupal_render($form['site_default'][$key]),
drupal_render($form['weight'][$key]),
- l(t('edit'), 'admin/settings/language/edit/'. $key). (($key != 'en' && $key != $default->language) ? ' '. l(t('delete') ,'admin/settings/language/delete/'. $key) : '')
+ l(t('edit'), 'admin/settings/language/edit/'. $key) . (($key != 'en' && $key != $default->language) ? ' '. l(t('delete'), 'admin/settings/language/delete/'. $key) : '')
);
}
}
@@ -493,7 +493,7 @@ function locale_translate_overview_screen() {
foreach ($languages as $langcode => $language) {
$rows[$langcode] = array('name' => ($langcode == 'en' ? t('English (built-in)') : t($language->name)));
foreach ($groups as $group => $name) {
- $rows[$langcode][$group] = ($langcode == 'en' ? t('n/a') : '0/'. (isset($groupsums[$group]) ? $groupsums[$group] : 0) . ' (0%)');
+ $rows[$langcode][$group] = ($langcode == 'en' ? t('n/a') : '0/'. (isset($groupsums[$group]) ? $groupsums[$group] : 0) .' (0%)');
}
}
@@ -2449,7 +2449,7 @@ function _locale_batch_build($files, $finished = NULL) {
$t = get_t();
if (count($files)) {
$operations = array();
- foreach($files as $file) {
+ foreach ($files as $file) {
// We call _locale_batch_import for every batch operation.
$operations[] = array('_locale_batch_import', array($file->filename)); }
$batch = array(
diff --git a/includes/mail.inc b/includes/mail.inc
index 55d2b29a9..72c7258e6 100644
--- a/includes/mail.inc
+++ b/includes/mail.inc
@@ -173,7 +173,7 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N
function drupal_mail_send($message) {
// Allow for a custom mail backend.
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {
- include_once './' . variable_get('smtp_library', '');
+ include_once './'. variable_get('smtp_library', '');
return drupal_mail_wrapper($message);
}
else {
@@ -436,7 +436,7 @@ function _drupal_html_to_mail_urls($match = NULL) {
$regexp = '@^'. preg_quote($base_path, '@') .'@';
}
if ($match) {
- list(,, $url, $label) = $match;
+ list(, , $url, $label) = $match;
// Ensure all URLs are absolute.
$urls[] = strpos($url, '://') ? $url : preg_replace($regexp, $base_url .'/', $url);
return $label .' ['. count($urls) .']';
diff --git a/includes/menu.inc b/includes/menu.inc
index 087fa793f..32fa92bb3 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1023,7 +1023,7 @@ function menu_secondary_links() {
*/
function menu_navigation_links($menu_name, $level = 0) {
// Don't even bother querying the menu table if no menu is specified.
- if (empty($menu_name)){
+ if (empty($menu_name)) {
return array();
}
diff --git a/includes/module.inc b/includes/module.inc
index 4c4d5eba0..e1c1652f4 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -296,7 +296,7 @@ function module_disable($module_list) {
module_implements('', FALSE, TRUE);
}
- // If there remains no more node_access module, rebuilding will be
+ // If there remains no more node_access module, rebuilding will be
// straightforward, we can do it right now.
if (node_access_needs_rebuild() && count(module_implements('node_grants')) == 0) {
node_access_rebuild();
diff --git a/includes/theme.inc b/includes/theme.inc
index 55f5dd6cc..cca50e301 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -658,7 +658,7 @@ function drupal_find_theme_functions($cache, $prefixes) {
$matches = preg_grep('/^'. $prefix .'_'. $info['pattern'] .'/', $functions['user']);
if ($matches) {
foreach ($matches as $match) {
- $new_hook = str_replace($prefix . '_', '', $match);
+ $new_hook = str_replace($prefix .'_', '', $match);
$templates[$new_hook] = array(
'function' => $match,
'arguments' => $info['arguments'],
@@ -692,7 +692,7 @@ function drupal_find_theme_templates($cache, $extension, $path) {
$templates = array();
// Escape the dots in the extension.
- $regex = str_replace('.', '\.', $extension) . '$';
+ $regex = str_replace('.', '\.', $extension) .'$';
// Because drupal_system_listing works the way it does, we check for real
// templates separately from checking for patterns.
@@ -1731,7 +1731,7 @@ function template_preprocess_page(&$variables) {
// type (e.g. node, admin, user, etc.). To avoid illegal characters in the class,
// we're removing everything disallowed. We are not using 'a-z' as that might leave
// in certain international characters (e.g. German umlauts).
- $body_classes[] = preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-' . form_clean_id(drupal_strtolower(arg(0))));
+ $body_classes[] = preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. form_clean_id(drupal_strtolower(arg(0))));
// If on an individual node page, add the node type.
if (isset($variables['node']) && $variables['node']->type) {
$body_classes[] = 'node-type-'. form_clean_id($variables['node']->type);
@@ -1766,9 +1766,9 @@ function template_preprocess_page(&$variables) {
$suggestion = 'page';
$suggestions = array();
while ($arg = arg($i++)) {
- $suggestions[] = $suggestion . '-' . $arg;
+ $suggestions[] = $suggestion .'-'. $arg;
if (!is_numeric($arg)) {
- $suggestion .= '-' . $arg;
+ $suggestion .= '-'. $arg;
}
}
if (drupal_is_front_page()) {
@@ -1824,7 +1824,7 @@ function template_preprocess_node(&$variables) {
$variables = array_merge((array)$node, $variables);
// Display info only on certain node types.
- if (theme_get_setting('toggle_node_info_' . $node->type)) {
+ if (theme_get_setting('toggle_node_info_'. $node->type)) {
$variables['submitted'] = theme('node_submitted', $node);
$variables['picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $node) : '';
}
@@ -1863,8 +1863,8 @@ function template_preprocess_block(&$variables) {
$variables['block_zebra'] = ($block_counter[$variables['block']->region] % 2) ? 'odd' : 'even';
$variables['block_id'] = $block_counter[$variables['block']->region]++;
- $variables['template_files'][] = 'block-' . $variables['block']->region;
- $variables['template_files'][] = 'block-' . $variables['block']->module;
- $variables['template_files'][] = 'block-' . $variables['block']->module .'-'. $variables['block']->delta;
+ $variables['template_files'][] = 'block-'. $variables['block']->region;
+ $variables['template_files'][] = 'block-'. $variables['block']->module;
+ $variables['template_files'][] = 'block-'. $variables['block']->module .'-'. $variables['block']->delta;
}
diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
index c03b7b25c..80d29fc0d 100644
--- a/includes/xmlrpc.inc
+++ b/includes/xmlrpc.inc
@@ -430,7 +430,7 @@ function _xmlrpc() {
$method = 'system.multicall';
$multicall_args = array();
foreach ($args[0] as $call) {
- $multicall_args[] = array('methodName' => array_shift($call),'params' => $call);
+ $multicall_args[] = array('methodName' => array_shift($call), 'params' => $call);
}
$args = array($multicall_args);
}
diff --git a/includes/xmlrpcs.inc b/includes/xmlrpcs.inc
index 96f9a46d8..7874091a2 100644
--- a/includes/xmlrpcs.inc
+++ b/includes/xmlrpcs.inc
@@ -109,7 +109,7 @@ function xmlrpc_server_output($xml) {
header('Connection: close');
header('Content-Length: '. strlen($xml));
header('Content-Type: text/xml');
- header('Date: '.date('r'));
+ header('Date: '. date('r'));
echo $xml;
exit;
}
@@ -315,4 +315,4 @@ function xmlrpc_server_method_signature($methodname) {
function xmlrpc_server_method_help($method) {
$xmlrpc_server = xmlrpc_server_get();
return $xmlrpc_server->help[$method];
-} \ No newline at end of file
+}
diff --git a/install.php b/install.php
index 63a0e146f..2f07f0140 100644
--- a/install.php
+++ b/install.php
@@ -514,16 +514,16 @@ function install_select_locale($profilename) {
install_task_list('locale-select');
drupal_set_title(st('Choose language'));
if (!empty($_GET['localize'])) {
- $output = '<p>'. st('With the addition of an appropriate language pack, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:') . '</p>';
+ $output = '<p>'. st('With the addition of an appropriate language pack, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:') .'</p>';
$output .= '<ul><li>'. st('Determine if <a href="@translations" target="_blank">a translation of this Drupal version</a> is available in your language of choice. A translation is provided via a translation pack; each translation pack enables the display of a specific version of Drupal in a specific language. Not all languages are available for every version of Drupal.', array('@translations' => 'http://drupal.org/project/Translations')) .'</li>';
$output .= '<li>'. st('If an alternative language pack of your choice is available, download and extract its contents to your Drupal root directory.') .'</li>';
$output .= '<li>'. st('Return to choose language using the second link below and select your desired language from the displayed list. Reloading the page allows the list to automatically adjust to the presence of new language packs.') .'</li>';
- $output .= '</ul><p>' . st('Alternatively, to install and use Drupal in English, or to defer the selection of an alternative language until after installation, select the first link below.') .'</p>';
- $output .= '<p>' . st('How should the installation continue?') .'</p>';
- $output .= '<ul><li><a href="install.php?profile='. $profilename . '&amp;locale=en">'. st('Continue installation in English') .'</a></li><li><a href="install.php?profile='. $profilename . '">'. st('Return to choose a language') .'</a></li></ul>';
+ $output .= '</ul><p>'. st('Alternatively, to install and use Drupal in English, or to defer the selection of an alternative language until after installation, select the first link below.') .'</p>';
+ $output .= '<p>'. st('How should the installation continue?') .'</p>';
+ $output .= '<ul><li><a href="install.php?profile='. $profilename .'&amp;locale=en">'. st('Continue installation in English') .'</a></li><li><a href="install.php?profile='. $profilename .'">'. st('Return to choose a language') .'</a></li></ul>';
}
else {
- $output = '<ul><li><a href="install.php?profile='. $profilename . '&amp;locale=en">'. st('Install Drupal in English') .'</a></li><li><a href="install.php?profile='. $profilename . '&localize=true">'. st('Learn how to install Drupal in other languages') .'</a></li></ul>';
+ $output = '<ul><li><a href="install.php?profile='. $profilename .'&amp;locale=en">'. st('Install Drupal in English') .'</a></li><li><a href="install.php?profile='. $profilename .'&localize=true">'. st('Learn how to install Drupal in other languages') .'</a></li></ul>';
}
print theme('install_page', $output);
exit;
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 14fb48e4b..59693b29d 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -324,28 +324,28 @@ function comment_new_page_count($num_comments, $new_replies, $nid) {
$mode = _comment_get_display_setting('mode');
$order = _comment_get_display_setting('sort');
$pagenum = NULL;
- $flat = in_array($mode, array(COMMENT_MODE_FLAT_COLLAPSED, COMMENT_MODE_FLAT_EXPANDED));
+ $flat = in_array($mode, array(COMMENT_MODE_FLAT_COLLAPSED, COMMENT_MODE_FLAT_EXPANDED));
if ($num_comments <= $comments_per_page || ($flat && $order == COMMENT_ORDER_NEWEST_FIRST)) {
// Only one page of comments or flat forum and newest first.
// First new comment will always be on first page.
$pageno = 0;
- }
+ }
else {
- if ($flat) {
+ if ($flat) {
// Flat comments and oldest first.
$count = $num_comments - $new_replies;
- }
+ }
else {
// Threaded comments. See the documentation for comment_render().
- if ($order == COMMENT_ORDER_NEWEST_FIRST) {
+ if ($order == COMMENT_ORDER_NEWEST_FIRST) {
// Newest first: find the last thread with new comment
$result = db_query('(SELECT thread FROM {comments} WHERE nid = %d AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY thread DESC LIMIT 1', $nid, $new_replies);
$thread = db_result($result);
$result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND thread > '" . $thread . "'", $nid);
- }
- else {
+ }
+ else {
// Oldest first: find the first thread with new comment
- $result = db_query('(SELECT thread FROM {comments} WHERE nid = %d AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY SUBSTRING(thread, 1, (LENGTH(thread) - 1)) LIMIT 1', $nid, $new_replies);
+ $result = db_query('(SELECT thread FROM {comments} WHERE nid = %d AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY SUBSTRING(thread, 1, (LENGTH(thread) - 1)) LIMIT 1', $nid, $new_replies);
$thread = substr(db_result($result), 0, -1);
$result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND SUBSTRING(thread, 1, (LENGTH(thread) - 1)) < '" . $thread . "'", $nid);
}