summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-09-04 21:10:45 +0000
committerDries Buytaert <dries@buytaert.net>2007-09-04 21:10:45 +0000
commit2db2c039fb5caabf511c95f15034ec18b39533d4 (patch)
treecb0c2885a87d46c204f14df42993c40a17f0c454 /includes
parent957997516d2b7c0391fe71a84d8e9aa4bb984495 (diff)
downloadbrdo-2db2c039fb5caabf511c95f15034ec18b39533d4.tar.gz
brdo-2db2c039fb5caabf511c95f15034ec18b39533d4.tar.bz2
- Patch #172950 by webernet: code style fixes.
Diffstat (limited to 'includes')
-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
13 files changed, 31 insertions, 31 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
+}