Commit d2d93b4b authored by Dries's avatar Dries

- Patch #173486 by scor: fixed code style issues.

parent 4bb5080e
......@@ -1601,7 +1601,7 @@ function drupal_get_css($css = NULL) {
$no_theme_preprocess .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file .'" />'."\n";
}
else {
$output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . '" />'."\n";
$output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file .'" />'."\n";
}
}
}
......@@ -1648,7 +1648,7 @@ function drupal_build_css_cache($types, $filename) {
// Wraps all @import arguments in url().
$contents = preg_replace('/@import\s+(?!url)[\'"]?(\S*)\b[\'"]?/i', '@import url("\1")', $contents);
// Fix all paths within this CSS file, ignoring absolute paths.
$data .= preg_replace('/url\(([\'"]?)(?![a-z]+:)/i', 'url(\1'. $path . '\2', $contents);
$data .= preg_replace('/url\(([\'"]?)(?![a-z]+:)/i', 'url(\1'. $path .'\2', $contents);
}
}
}
......@@ -1879,7 +1879,7 @@ function drupal_build_js_cache($files, $filename) {
foreach ($files as $path => $info) {
if ($info['preprocess']) {
// Append a ';' after each JS file to prevent them from running together.
$contents .= _drupal_compress_js(file_get_contents($path). ';');
$contents .= _drupal_compress_js(file_get_contents($path) .';');
}
}
......@@ -1982,9 +1982,9 @@ function _packer_apply($script, $regexps, $escape = FALSE) {
$regexp = '/';
foreach ($_regexps as $_regexp) {
list($expression) = $_regexp;
$regexp .= '(' . substr($expression, 1, -1) . ')|';
$regexp .= '('. substr($expression, 1, -1) .')|';
}
$regexp = substr($regexp, 0, -1) . '/';
$regexp = substr($regexp, 0, -1) .'/';
// In order to simplify the regexps that look e.g. for quoted strings, we
// remove all escaped characters (such as \' or \") from the data. Then, we
......
......@@ -33,7 +33,7 @@ function openid_redirect_http($url, $message) {
}
$sep = (strpos($url, '?') === FALSE) ? '?' : '&';
header('Location: ' . $url . $sep . implode('&', $query), TRUE, 302);
header('Location: '. $url . $sep . implode('&', $query), TRUE, 302);
exit;
}
......@@ -109,7 +109,7 @@ function _openid_normalize_url($url) {
$normalized_url = $url;
if (stristr($url, '://') === FALSE) {
$normalized_url = 'http://' . $url;
$normalized_url = 'http://'. $url;
}
if (substr_count($normalized_url, '/') < 3) {
......@@ -148,7 +148,7 @@ function _openid_encode_message($message) {
if ($encoded_message != '') {
$encoded_message .= '&';
}
$encoded_message .= rawurlencode(trim($parts[0])) . '=' . rawurlencode(trim($parts[1]));
$encoded_message .= rawurlencode(trim($parts[0])) .'='. rawurlencode(trim($parts[1]));
}
}
......@@ -203,7 +203,7 @@ function _openid_link_href($rel, $html) {
* Pull the http-equiv attribute out of an html meta element
*/
function _openid_meta_httpequiv($equiv, $html) {
preg_match('|<meta\s+http-equiv=["\']' . $equiv . '["\'](.*)/?>|iU', $html, $matches);
preg_match('|<meta\s+http-equiv=["\']'. $equiv .'["\'](.*)/?>|iU', $html, $matches);
if (isset($matches[1])) {
preg_match('|content=["\']([^"]+)["\']|iU', $matches[1], $content);
return $content[1];
......@@ -224,8 +224,8 @@ function _openid_signature($association, $message_array, $keys_to_sign) {
$sign_data = array();
foreach ($keys_to_sign as $key) {
if (isset($message_array['openid.' . $key])) {
$sign_data[$key] = $message_array['openid.' . $key];
if (isset($message_array['openid.'. $key])) {
$sign_data[$key] = $message_array['openid.'. $key];
}
}
......
......@@ -1299,7 +1299,7 @@ function system_update_151() {
else {
variable_set($menus[$loop]['menu_var'], $menus[$loop]['pid']);
}
variable_del('phptemplate_' .$menus[$loop]['links_var']);
variable_del('phptemplate_'. $menus[$loop]['links_var']);
variable_del('phptemplate_'. $menus[$loop]['links_var'] .'_more');
variable_del($menus[$loop]['toggle_var']);
variable_del($menus[$loop]['more_var']);
......@@ -1334,7 +1334,7 @@ function system_update_152() {
return $ret;
}
function system_update_153(){
function system_update_153() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'pgsql':
......@@ -1801,7 +1801,7 @@ function system_update_170() {
function system_update_171() {
$ret = array();
$ret[] = update_sql('DELETE FROM {users_roles} WHERE rid IN ('. DRUPAL_ANONYMOUS_RID. ', '. DRUPAL_AUTHENTICATED_RID. ')');
$ret[] = update_sql('DELETE FROM {users_roles} WHERE rid IN ('. DRUPAL_ANONYMOUS_RID .', '. DRUPAL_AUTHENTICATED_RID .')');
return $ret;
}
......@@ -1995,7 +1995,7 @@ function _update_178_url_fix($text) {
if (preg_match_all($pattern, $text, $matches)) {
foreach ($matches[1] as $url) {
if ($url != '' && !strstr($url, 'mailto:') && !strstr($url, '://') && !strstr($url, '../') && !strstr($url, './') && $url[0] != '/' && $url[0] != '#') {
$text = preg_replace('|'. $type .'\s*=\s*"'. preg_quote($url) .'\s*"|', $type. '="'.base_path(). $url .'"', $text);
$text = preg_replace('|'. $type .'\s*=\s*"'. preg_quote($url) .'\s*"|', $type .'="'. base_path() . $url .'"', $text);
}
}
}
......
......@@ -156,7 +156,7 @@ function theme_update_report($data) {
$row .= "<div class=\"info\">\n";
if (!empty($project['extra'])) {
$row .= '<div class="extra">' ."\n";
$row .= '<div class="extra">'."\n";
foreach ($project['extra'] as $key => $value) {
$row .= '<div class="'. $value['class'] .'">';
$row .= check_plain($value['label']) .': ';
......
......@@ -7,7 +7,7 @@
*/
function phptemplate_init($template) {
$file = dirname($template->filename) . '/template.php';
$file = dirname($template->filename) .'/template.php';
if (file_exists($file)) {
include_once "./$file";
}
......
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