Commit ac4c8f7a authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#203274 by Pasqualle: remove excessive witespace from our code (minor)

parent ed48af4c
......@@ -3244,7 +3244,7 @@ function drupal_write_record($table, &$object, $update = array()) {
}
// For inserts, populate defaults from Schema if not already provided
if (!isset($object->$field) && !count($update) && isset($info['default'])) {
if (!isset($object->$field) && !count($update) && isset($info['default'])) {
$object->$field = $info['default'];
}
......
......@@ -464,7 +464,7 @@ function db_type_map() {
'float:big' => 'double precision',
'float:normal' => 'real',
'numeric:normal' => 'numeric',
'numeric:normal' => 'numeric',
'blob:big' => 'bytea',
'blob:normal' => 'bytea',
......
......@@ -2103,7 +2103,7 @@ function theme_form_element($element, $value) {
// This is also used in the installer, pre-database setup.
$t = get_t();
$output = '<div class="form-item"';
$output = '<div class="form-item"';
if (!empty($element['#id'])) {
$output .= ' id="'. $element['#id'] .'-wrapper"';
}
......
......@@ -1071,7 +1071,7 @@ function _locale_import_read_po($op, $file, $mode = NULL, $lang = NULL, $group =
$line = trim(substr($line, 5));
$quoted = _locale_import_parse_quoted($line);
if ($quoted === FALSE) {
_locale_import_message('The translation file %filename contains a syntax error on line %line.', $file, $lineno);
_locale_import_message('The translation file %filename contains a syntax error on line %line.', $file, $lineno);
return FALSE;
}
$current["msgid"] = $quoted;
......
......@@ -1805,7 +1805,7 @@ function menu_link_save(&$item) {
}
db_query("UPDATE {menu_links} SET menu_name = '%s', plid = %d, link_path = '%s',
router_path = '%s', hidden = %d, external = %d, has_children = %d,
expanded = %d, weight = %d, depth = %d,
expanded = %d, weight = %d, depth = %d,
p1 = %d, p2 = %d, p3 = %d, p4 = %d, p5 = %d, p6 = %d, p7 = %d, p8 = %d, p9 = %d,
module = '%s', link_title = '%s', options = '%s', customized = %d WHERE mlid = %d",
$item['menu_name'], $item['plid'], $item['link_path'],
......@@ -1910,7 +1910,7 @@ function menu_link_maintain($module, $op, $link_path, $link_title) {
return menu_link_save($menu_link);
break;
case 'update':
db_query("UPDATE {menu_links} SET link_title = '%s' WHERE link_path = '%s' AND customized = 0 AND module = '%s'", $link_title, $link_path, $module);
db_query("UPDATE {menu_links} SET link_title = '%s' WHERE link_path = '%s' AND customized = 0 AND module = '%s'", $link_title, $link_path, $module);
menu_cache_clear();
break;
case 'delete':
......
......@@ -45,7 +45,7 @@ function sess_read($key) {
}
}
// We didn't find the client's record (session has expired), or they are an anonymous user.
else {
else {
$session = isset($user->session) ? $user->session : '';
$user = drupal_anonymous_user($session);
}
......
......@@ -217,7 +217,7 @@ function aggregator_admin_settings() {
$form['aggregator_summary_items'] = array(
'#type' => 'select', '#title' => t('Items shown in sources and categories pages') ,
'#default_value' => variable_get('aggregator_summary_items', 3), '#options' => $items,
'#description' => t('Number of feed items displayed in feed and category summary pages.')
'#description' => t('Number of feed items displayed in feed and category summary pages.')
);
$form['aggregator_clear'] = array(
......
......@@ -155,7 +155,7 @@ function block_admin_configure(&$form_state, $module = NULL, $delta = 0) {
'#type' => 'textfield',
'#title' => t('Block title'),
'#maxlength' => 64,
'#description' => $module == 'block' ? t('The title of the block as shown to the user.') : t('Override the default title for the block. Use <em>&lt;none&gt;</em> to display no title, or leave blank to use the default block title.'),
'#description' => $module == 'block' ? t('The title of the block as shown to the user.') : t('Override the default title for the block. Use <em>&lt;none&gt;</em> to display no title, or leave blank to use the default block title.'),
'#default_value' => $edit['title'],
'#weight' => -18,
);
......@@ -188,7 +188,7 @@ function block_admin_configure(&$form_state, $module = NULL, $delta = 0) {
t('Show this block by default, but let individual users hide it.'),
t('Hide this block by default but let individual users show it.')
),
'#description' => t('Allow individual users to customize the visibility of this block in their account settings.'),
'#description' => t('Allow individual users to customize the visibility of this block in their account settings.'),
'#default_value' => $edit['custom'],
);
......@@ -213,7 +213,7 @@ function block_admin_configure(&$form_state, $module = NULL, $delta = 0) {
'#title' => t('Show block for specific roles'),
'#default_value' => $default_role_options,
'#options' => $role_options,
'#description' => t('Show this block only for the selected role(s). If you select no roles, the block will be visible to all users.'),
'#description' => t('Show this block only for the selected role(s). If you select no roles, the block will be visible to all users.'),
);
$form['page_vis_settings'] = array(
......@@ -298,7 +298,7 @@ function block_add_block_form_validate($form, &$form_state) {
* Save the new custom block.
*/
function block_add_block_form_submit($form, &$form_state) {
db_query("INSERT INTO {boxes} (body, info, format) VALUES ('%s', '%s', %d)", $form_state['values']['body'], $form_state['values']['info'], $form_state['values']['format']);
db_query("INSERT INTO {boxes} (body, info, format) VALUES ('%s', '%s', %d)", $form_state['values']['body'], $form_state['values']['info'], $form_state['values']['format']);
$delta = db_last_insert_id('boxes', 'bid');
foreach (list_themes() as $key => $theme) {
......
......@@ -1049,7 +1049,7 @@ function book_menu_subtree_data($item) {
$data = $cache->data;
}
else {
$match = array("menu_name = '%s'");
$match = array("menu_name = '%s'");
$args = array($item['menu_name']);
$i = 1;
while ($i <= MENU_MAX_DEPTH && $item["p$i"]) {
......
......@@ -143,7 +143,7 @@ function book_outline_form(&$form_state, $node) {
*
* @see book_outline_form()
*/
function book_remove_button_submit($form, &$form_state) {
function book_remove_button_submit($form, &$form_state) {
$form_state['redirect'] = 'node/'. $form['#node']->nid .'/outline/remove';
}
......@@ -196,7 +196,7 @@ function book_remove_form(&$form_state, $node) {
$description = t('%title may be added to hierarchy again using the Outline tab.', $title);
}
return confirm_form($form, t('Are you sure you want to remove %title from the book hierarchy?', $title), 'node/'. $node->nid, $description, t('Remove'));
return confirm_form($form, t('Are you sure you want to remove %title from the book hierarchy?', $title), 'node/'. $node->nid, $description, t('Remove'));
}
/**
......
......@@ -160,7 +160,7 @@ function filter_filter_tips($delta, $format, $long = FALSE) {
global $base_url;
switch ($delta) {
case 0:
if (variable_get("filter_html_$format", FILTER_HTML_STRIP) == FILTER_HTML_STRIP) {
if (variable_get("filter_html_$format", FILTER_HTML_STRIP) == FILTER_HTML_STRIP) {
if ($allowed_html = variable_get("allowed_html_$format", '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>')) {
switch ($long) {
case 0:
......@@ -724,7 +724,7 @@ function _filter_url($text, $format) {
// Pass length to regexp callback
_filter_url_trim(NULL, variable_get('filter_url_length_'. $format, 72));
$text = ' '. $text .' ';
$text = ' '. $text .' ';
// Match absolute URLs.
$text = preg_replace_callback("`(<p>|<li>|<br\s*/?>|[ \n\r\t\(])((http://|https://|ftp://|mailto:|smb://|afp://|file://|gopher://|news://|ssl://|sslv2://|sslv3://|tls://|tcp://|udp://)([a-zA-Z0-9@:%_+*~#?&=.,/;-]*[a-zA-Z0-9@:%_+*~#&=/;-]))([.,?!]*?)(?=(</p>|</li>|<br\s*/?>|[ \n\r\t\)]))`i", '_filter_url_parse_full_links', $text);
......
......@@ -236,7 +236,7 @@ function menu_edit_item(&$form_state, $type, $item, $menu) {
);
if ($type == 'add' || empty($item)) {
// This is an add form, initialize the menu link.
$item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => $menu['menu_name'], 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0);
$item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => $menu['menu_name'], 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0);
}
foreach (array('link_path', 'mlid', 'module', 'has_children', 'options') as $key) {
$form['menu'][$key] = array('#type' => 'value', '#value' => $item[$key]);
......
......@@ -141,7 +141,7 @@ function node_type_form(&$form_state, $type = NULL) {
$form['submission']['help'] = array(
'#type' => 'textarea',
'#title' => t('Explanation or submission guidelines'),
'#default_value' => $type->help,
'#default_value' => $type->help,
'#description' => t('This text will be displayed at the top of the submission form for this content type. It is useful for helping or instructing your users.')
);
$form['workflow'] = array(
......
......@@ -23,7 +23,7 @@ function node_configure() {
$form['default_nodes_main'] = array(
'#type' => 'select', '#title' => t('Number of posts on main page'), '#default_value' => variable_get('default_nodes_main', 10),
'#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
'#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30)),
'#description' => t('The default maximum number of posts to display per page on overview pages such as the main page.')
);
$form['teaser_length'] = array(
......@@ -478,7 +478,7 @@ function node_admin_nodes() {
foreach (module_invoke_all('node_operations') as $operation => $array) {
$options[$operation] = $array['label'];
}
$form['options']['operation'] = array('#type' => 'select', '#options' => $options, '#default_value' => 'approve');
$form['options']['operation'] = array('#type' => 'select', '#options' => $options, '#default_value' => 'approve');
$form['options']['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
......@@ -494,7 +494,7 @@ function node_admin_nodes() {
$form['title'][$node->nid] = array('#value' => l($node->title, 'node/'. $node->nid, $options) .' '. theme('mark', node_mark($node->nid, $node->changed)));
$form['name'][$node->nid] = array('#value' => check_plain(node_get_types('name', $node)));
$form['username'][$node->nid] = array('#value' => theme('username', $node));
$form['status'][$node->nid] = array('#value' => ($node->status ? t('published') : t('not published')));
$form['status'][$node->nid] = array('#value' => ($node->status ? t('published') : t('not published')));
if ($multilanguage) {
$form['language'][$node->nid] = array('#value' => empty($node->language) ? t('Language neutral') : t($languages[$node->language]->name));
}
......@@ -540,7 +540,7 @@ function theme_node_admin_nodes($form) {
}
}
else {
else {
$rows[] = array(array('data' => t('No posts available.'), 'colspan' => '6'));
}
......
......@@ -1603,7 +1603,7 @@ function node_feed($nids = FALSE, $channel = array()) {
// Allow modules to add additional item fields and/or modify $item
$extra = node_invoke_nodeapi($item, 'rss item');
$extra = array_merge($extra, array(array('key' => 'pubDate', 'value' => date('r', $item->created)), array('key' => 'dc:creator', 'value' => $item->name), array('key' => 'guid', 'value' => $item->nid .' at '. $base_url, 'attributes' => array('isPermaLink' => 'false'))));
$extra = array_merge($extra, array(array('key' => 'pubDate', 'value' => date('r', $item->created)), array('key' => 'dc:creator', 'value' => $item->name), array('key' => 'guid', 'value' => $item->nid .' at '. $base_url, 'attributes' => array('isPermaLink' => 'false'))));
foreach ($extra as $element) {
if (isset($element['namespace'])) {
$namespaces = array_merge($namespaces, $element['namespace']);
......
......@@ -17,7 +17,7 @@ function node_page_edit($node) {
function node_add_page() {
$item = menu_get_item();
$content = system_admin_menu_block($item);
$content = system_admin_menu_block($item);
return theme('node_add_list', $content);
}
......@@ -153,7 +153,7 @@ function node_form(&$form_state, $node) {
'#weight' => 20,
);
$form['revision_information']['revision'] = array(
'#access' => user_access('administer nodes'),
'#access' => user_access('administer nodes'),
'#type' => 'checkbox',
'#title' => t('Create new revision'),
'#default_value' => $node->revision,
......@@ -555,7 +555,7 @@ function node_revision_overview($node) {
*/
function node_revision_revert_confirm($form_state, $node_revision) {
$form['#node_revision'] = $node_revision;
return confirm_form($form, t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/'. $node_revision->nid .'/revisions', '', t('Revert'), t('Cancel'));
return confirm_form($form, t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/'. $node_revision->nid .'/revisions', '', t('Revert'), t('Cancel'));
}
function node_revision_revert_confirm_submit($form, &$form_state) {
......@@ -575,7 +575,7 @@ function node_revision_revert_confirm_submit($form, &$form_state) {
function node_revision_delete_confirm($form_state, $node_revision) {
$form['#node_revision'] = $node_revision;
return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/'. $node_revision->nid .'/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/'. $node_revision->nid .'/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}
function node_revision_delete_confirm_submit($form, &$form_state) {
......
......@@ -73,7 +73,7 @@ function openid_user_add_validate($form, &$form_state) {
form_set_error('openid_url', t('That OpenID is already in use on this site.'));
}
else {
$return_to = url('user/'. arg(1) .'/openid', array('absolute' => TRUE));
$return_to = url('user/'. arg(1) .'/openid', array('absolute' => TRUE));
openid_begin($form_state['values']['openid_url'], $return_to);
}
}
......
......@@ -189,7 +189,7 @@ function statistics_access_logging_settings() {
$form['access']['statistics_enable_access_log'] = array(
'#type' => 'radios',
'#title' => t('Enable access log'),
'#default_value' => variable_get('statistics_enable_access_log', 0),
'#default_value' => variable_get('statistics_enable_access_log', 0),
'#options' => $options,
'#description' => t('Log each page access. Required for referrer statistics.'));
$period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
......
......@@ -16,7 +16,7 @@ table.system-status-report th, table.system-status-report tr.merge-up td {
padding-right: 30px;
}
table.system-status-report th {
table.system-status-report th {
background-position: 95% 50%;
}
......
......@@ -67,7 +67,7 @@ table.system-status-report th {
table.system-status-report th, table.system-status-report tr.merge-up td {
padding-left: 30px; /* LTR */
}
table.system-status-report th {
table.system-status-report th {
background-repeat: no-repeat;
background-position: 5px 50%; /* LTR */
padding-top: 6px;
......
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