Commit b64adf07 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#182645 by scor: clean up concatenations to be in line with core coding standards

parent ccb0c0a7
......@@ -1905,7 +1905,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL) {
if ($is_writable && $preprocess_js && count($files) > 0) {
$filename = md5(serialize($files)) .'.js';
$preprocess_file = drupal_build_js_cache($files, $filename);
$preprocessed .= '<script type="text/javascript" src="'. base_path() . $preprocess_file .'"></script>'. "\n";
$preprocessed .= '<script type="text/javascript" src="'. base_path() . $preprocess_file .'"></script>'."\n";
}
// Keep the order of JS files consistent as some are preprocessed and others are not.
......@@ -2134,7 +2134,7 @@ function _packer_replacement($arguments, $regexps = NULL, $escape = NULL) {
}
else {
$delete = !$escape || strpos($arguments[$i], '\\') === FALSE
? '' : "\x01" . $arguments[$i] . "\x01";
? '' : "\x01". $arguments[$i] ."\x01";
return $delete . $replacement;
}
// skip over references to sub-expressions
......@@ -3160,7 +3160,7 @@ function drupal_write_record($table, &$object, $update = array()) {
// Build the SQL.
$query = '';
if (!count($update)) {
$query = "INSERT INTO {". $table ."} (" . implode(', ', $fields) . ') VALUES (' . implode(', ', $placeholders) . ')';
$query = "INSERT INTO {". $table ."} (". implode(', ', $fields) .') VALUES ('. implode(', ', $placeholders) .')';
$return = SAVED_NEW;
}
else {
......@@ -3169,7 +3169,7 @@ function drupal_write_record($table, &$object, $update = array()) {
if ($query) {
$query .= ', ';
}
$query .= $field . ' = ' . $placeholders[$id];
$query .= $field .' = '. $placeholders[$id];
}
foreach ($update as $key){
......
......@@ -348,7 +348,7 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
$form['errors'] = array();
$form['settings_file'] = array('#type' => 'value', '#value' => $settings_file);
$form['_db_url'] = array('#type' => 'value');
$form['#action'] = "install.php?profile=$profile" . ($install_locale ? "&locale=$install_locale" : '');
$form['#action'] = "install.php?profile=$profile". ($install_locale ? "&locale=$install_locale" : '');
$form['#redirect'] = FALSE;
}
return $form;
......@@ -424,7 +424,7 @@ function install_settings_form_submit($form, &$form_state) {
drupal_rewrite_settings($settings);
// Continue to install profile step
install_goto("install.php?profile=$profile" . ($install_locale ? "&locale=$install_locale" : ''));
install_goto("install.php?profile=$profile". ($install_locale ? "&locale=$install_locale" : ''));
}
/**
......
......@@ -362,7 +362,7 @@ function comment_new_page_count($num_comments, $new_replies, $node) {
$pageno = $count / $comments_per_page;
}
if ($pageno >= 1) {
$pagenum = "page=" . intval($pageno);
$pagenum = "page=". intval($pageno);
}
return $pagenum;
}
......
......@@ -663,10 +663,10 @@ function node_load($param = array(), $revision = NULL, $reset = NULL) {
// No db_rewrite_sql is applied so as to get complete indexing for search.
if ($revision) {
array_unshift($arguments, $revision);
$node = db_fetch_object(db_query('SELECT '. $fields. ' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = %d WHERE '. $cond, $arguments));
$node = db_fetch_object(db_query('SELECT '. $fields .' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = %d WHERE '. $cond, $arguments));
}
else {
$node = db_fetch_object(db_query('SELECT '. $fields. ' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.vid = n.vid WHERE '. $cond, $arguments));
$node = db_fetch_object(db_query('SELECT '. $fields .' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.vid = n.vid WHERE '. $cond, $arguments));
}
if ($node && $node->nid) {
......
......@@ -41,7 +41,7 @@ function openid_redirect_http($url, $message) {
* Creates a js auto-submit redirect for (for the 2.x protocol)
*/
function openid_redirect($url, $message) {
$output = '<html><head><title>'.t('OpenID redirect'). "</title></head>\n<body>";
$output = '<html><head><title>'. t('OpenID redirect') ."</title></head>\n<body>";
$output .= drupal_get_form('openid_redirect_form', $url, $message);
$output .= '<script type="text/javascript">document.getElementById("openid-redirect-form").submit();</script>';
$output .= "</body></html>\n";
......@@ -354,7 +354,7 @@ function _openid_dh_rand($stop) {
}
do {
$bytes = "\x00" . _openid_get_bytes($nbytes);
$bytes = "\x00". _openid_get_bytes($nbytes);
$n = _openid_dh_binary_to_long($bytes);
// Keep looping if this value is in the low duplicated range.
} while (bccomp($n, $duplicate) < 0);
......
......@@ -35,7 +35,7 @@ function poll_votes($node) {
$header[] = array('data' => t('Visitor'), 'field' => 'u.name');
$header[] = array('data' => t('Vote'), 'field' => 'pv.chorder');
$result = pager_query("SELECT pv.chorder, pv.uid, pv.hostname, u.name FROM {poll_votes} pv LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d" . tablesort_sql($header), 20, 0, NULL, $node->nid);
$result = pager_query("SELECT pv.chorder, pv.uid, pv.hostname, u.name FROM {poll_votes} pv LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d". tablesort_sql($header), 20, 0, NULL, $node->nid);
$rows = array();
while ($vote = db_fetch_object($result)) {
$rows[] = array(
......
......@@ -1309,7 +1309,7 @@ function system_update_123() {
$ret[] = update_sql("UPDATE {vocabulary} SET module = 'taxonomy'");
$vid = variable_get('forum_nav_vocabulary', '');
if (!empty($vid)) {
$ret[] = update_sql("UPDATE {vocabulary} SET module = 'forum' WHERE vid = " . $vid);
$ret[] = update_sql("UPDATE {vocabulary} SET module = 'forum' WHERE vid = ". $vid);
}
return $ret;
......@@ -1916,7 +1916,7 @@ function system_update_151() {
for ($loop = 0; $loop <= 1 ; $loop ++) {
// create new Primary and Secondary links menus
$menus[$loop]['pid'] = db_next_id('{menu}_mid');
$ret[] = update_sql("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) " .
$ret[] = update_sql("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) ".
"VALUES ({$menus[$loop]['pid']}, 0, '', '{$menus[$loop]['menu_name']}', '', 0, 115)");
// Gather links from various settings into a single array.
......@@ -1955,10 +1955,10 @@ function system_update_151() {
}
$mid = db_next_id('{menu}_mid');
$ret[] = update_sql("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) " .
"VALUES ($mid, {$menus[$loop]['pid']}, '" . db_escape_string($href) .
"', '" . db_escape_string($links['text'][$i]) .
"', '" . db_escape_string($links['description'][$i]) . "', 0, 118)");
$ret[] = update_sql("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) ".
"VALUES ($mid, {$menus[$loop]['pid']}, '". db_escape_string($href) .
"', '". db_escape_string($links['text'][$i]) .
"', '". db_escape_string($links['description'][$i]) ."', 0, 118)");
}
}
// delete Secondary links if not populated.
......@@ -3910,7 +3910,7 @@ 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);
......
......@@ -41,7 +41,7 @@ function chameleon_page($content, $show_blocks = TRUE, $show_messages = TRUE) {
$output .= " <a href=\"". base_path() ."\" title=\"". t('Home') ."\"><img src=\"$logo\" alt=\"". t('Home') ."\" /></a>";
}
if (theme_get_setting('toggle_name')) {
$output .= " <h1 class=\"site-name title\">". l(variable_get('site_name', 'drupal'), ""). "</h1>";
$output .= " <h1 class=\"site-name title\">". l(variable_get('site_name', 'drupal'), "") ."</h1>";
}
if (theme_get_setting('toggle_slogan')) {
$output .= " <div class=\"site-slogan\">". variable_get('site_slogan', '') ."</div>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment