Commit d071f991 authored by Dries's avatar Dries
Browse files

- Removing trailing whitespace.

parent 0484fcd1
......@@ -41,9 +41,9 @@ INSTALLATION AND CONFIGURATION
Again, you will be asked for the 'dba_user' database password.
At the MySQL prompt, enter following command:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX,
ALTER, CREATE TEMPORARY TABLES, LOCK TABLES
ON databasename.*
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX,
ALTER, CREATE TEMPORARY TABLES, LOCK TABLES
ON databasename.*
TO 'username'@'localhost' IDENTIFIED BY 'password';
where
......@@ -82,4 +82,4 @@ INSTALLATION AND CONFIGURATION
for MySQL 4.1 or higher:
mysql -u username -p databasename < database/database.4.1.mysql
......@@ -16,7 +16,7 @@ REQUIREMENTS
Drupal requires a web server, PHP4 (4.3.3 or greater) or PHP5
(http://www.php.net/) and either MySQL (http://www.mysql.com/)
or PostgreSQL (http://www.postgresql.org/). Your database user
will also need sufficient privileges to run Drupal. Please
will also need sufficient privileges to run Drupal. Please
check the INSTALL.mysql.txt and INSTALL.pgsql.txt for more
detailed information.
......
......@@ -390,7 +390,7 @@ CREATE INDEX locales_target_plural_idx ON locales_target(plural);
--
CREATE SEQUENCE menu_mid_seq START 2;
CREATE SEQUENCE menu_mid_seq START 2;
CREATE TABLE menu (
mid integer NOT NULL DEFAULT nextval('menu_mid_seq'),
pid integer NOT NULL default '0',
......
......@@ -1593,7 +1593,7 @@ function system_update_173() {
// PostgreSQL needs CREATE TABLE foobar _AS_ SELECT ...
$AS = ($GLOBALS['db_type'] == 'pgsql') ? 'AS' : '';
// Backup the files table.
$ret[] = update_sql("CREATE TABLE {files_backup} $AS SELECT * FROM {files}");
......@@ -1852,7 +1852,7 @@ function system_update_178() {
$args[] = $node->vid;
db_query('UPDATE {node_revisions} SET '. implode(', ', $set) .' WHERE vid = %d', $args);
}
}
if ($_SESSION['system_update_178_comment'] == $_SESSION['system_update_178_comment_max'] &&
......@@ -1946,7 +1946,7 @@ function system_update_179() {
if ($field->value !== FALSE) {
db_query("UPDATE {profile_values} SET value = '%s' WHERE uid = %d AND fid = %d", $field->value, $field->uid, $field->fid);
}
}
// Done?
......
......@@ -27,7 +27,7 @@
* @return A string containing a URL that can be used to download the file.
*/
function file_create_url($path) {
// Strip file_directory_path from $path. We only include relative paths in urls.
// Strip file_directory_path from $path. We only include relative paths in urls.
if (strpos($path, file_directory_path()) !== false) {
$path = trim(substr($path, strlen(file_directory_path())), '\\/');
}
......
......@@ -434,12 +434,12 @@ function form_builder($form_id, $form) {
}
/**
* Use this function to make changes to form values in the form validate
* Use this function to make changes to form values in the form validate
* phase, so they will be available in the submit phase in $form_values.
*
* Specifically, if $form['#parents'] is array('foo', 'bar')
* and $value is 'baz' then this function will make
* $form_values['foo']['bar'] to be 'baz'.
* $form_values['foo']['bar'] to be 'baz'.
*
* @param $form
* The form item. Keys used: #parents, #value
......
......@@ -92,7 +92,7 @@ function theme_locale_admin_manage_screen($form) {
$header = array(array('data' => t('Code')), array('data' => t('English name')), array('data' => t('Enabled')), array('data' => t('Default')), array('data' => t('Translated')), array('data' => t('Operations')));
$output = theme('table', $header, $rows);
$output .= form_render($form);
return $output;
}
......@@ -116,7 +116,7 @@ function _locale_admin_manage_screen_submit($form_id, $form_values) {
}
}
drupal_set_message(t('Configuration saved.'));
// Changing the locale settings impacts the interface:
cache_clear_all();
......@@ -141,7 +141,7 @@ function _locale_admin_manage_add_screen() {
'#description' => t('Select your language here, or add it below, if you are unable to find it.'),
);
$form['language list']['submit'] = array('#type' => 'submit', '#value' => t('Add language'));
$output = drupal_get_form('locale_add_language_form', $form);
$form = array();
......@@ -198,7 +198,7 @@ function locale_add_language_form_submit($form_id, $form_values) {
$isocodes = _locale_get_iso639_list();
_locale_add_language($form_values['langcode'], $isocodes[$form_values['langcode']][0]);
}
return 'admin/locale';
}
......@@ -363,7 +363,7 @@ function _locale_string_edit($lid) {
// Approximate the number of rows in a textfield with a maximum of 10.
$rows = min(ceil(str_word_count($orig) / 12), 10);
$form[$translation->locale] = array('#type' => 'textarea',
'#title' => $languages['name'][$translation->locale],
'#default_value' => $translation->translation,
......@@ -432,8 +432,8 @@ function _locale_string_delete($lid) {
db_query('DELETE FROM {locales_target} WHERE lid = %d', $lid);
locale_refresh_cache();
drupal_set_message(t('The string has been removed.'));
drupal_goto('admin/locale/string/search');
drupal_goto('admin/locale/string/search');
}
/**
......
......@@ -570,7 +570,7 @@ function theme_help() {
*/
function theme_node($node, $teaser = FALSE, $page = FALSE) {
if (!$node->status) {
$output = '<div class="node-unpublished">';
$output = '<div class="node-unpublished">';
}
if (module_exist('taxonomy')) {
......
......@@ -259,7 +259,7 @@ ACDB.prototype.receive = function(string, xmlhttp, acdb) {
var matches = parseJson(string);
if (typeof matches['status'] == 'undefined' || matches['status'] != 0) {
acdb.cache[acdb.searchString] = matches;
acdb.owner.found(matches);
acdb.owner.found(matches);
}
}
......
......@@ -202,7 +202,7 @@ function block_admin_display() {
}
init_theme();
// Fetch and sort blocks
// Fetch and sort blocks
$blocks = _block_rehash();
usort($blocks, '_block_compare');
......@@ -304,12 +304,12 @@ function theme_block_admin_display($form) {
if ($status && $region != $last_region) {
$region_title = t('%region', array('%region' => drupal_ucfirst($block_regions[$region])));
$rows[] = array(array('data' => $region_title, 'class' => 'region', 'colspan' => ($throttle ? 7 : 6)));
$last_region = $region;
$last_region = $region;
}
// Output disabled header
elseif ($status != $last_status) {
$rows[] = array(array('data' => t('Disabled'), 'class' => 'region', 'colspan' => ($throttle ? 7 : 6)));
$last_status = $status;
$last_status = $status;
}
// Generate block row
......
......@@ -202,7 +202,7 @@ function block_admin_display() {
}
init_theme();
// Fetch and sort blocks
// Fetch and sort blocks
$blocks = _block_rehash();
usort($blocks, '_block_compare');
......@@ -304,12 +304,12 @@ function theme_block_admin_display($form) {
if ($status && $region != $last_region) {
$region_title = t('%region', array('%region' => drupal_ucfirst($block_regions[$region])));
$rows[] = array(array('data' => $region_title, 'class' => 'region', 'colspan' => ($throttle ? 7 : 6)));
$last_region = $region;
$last_region = $region;
}
// Output disabled header
elseif ($status != $last_status) {
$rows[] = array(array('data' => t('Disabled'), 'class' => 'region', 'colspan' => ($throttle ? 7 : 6)));
$last_status = $status;
$last_status = $status;
}
// Generate block row
......
......@@ -357,10 +357,10 @@ function book_outline_submit($form_id, $form_values) {
}
/**
* Given a node, this function returns an array of 'book node' objects
* representing the path in the book tree from the root to the
* Given a node, this function returns an array of 'book node' objects
* representing the path in the book tree from the root to the
* parent of the given node.
*
*
* @param node - a book node object for which to compute the path
*
* @return - an array of book node objects representing the path of
......
......@@ -357,10 +357,10 @@ function book_outline_submit($form_id, $form_values) {
}
/**
* Given a node, this function returns an array of 'book node' objects
* representing the path in the book tree from the root to the
* Given a node, this function returns an array of 'book node' objects
* representing the path in the book tree from the root to the
* parent of the given node.
*
*
* @param node - a book node object for which to compute the path
*
* @return - an array of book node objects representing the path of
......
......@@ -502,7 +502,7 @@ function contact_mail_page_validate($form_id, $form_values) {
*/
function contact_mail_page_submit($form_id, $edit) {
// E-mail address of the sender: as the form field is a text field,
// E-mail address of the sender: as the form field is a text field,
// all instances of \r and \n have been automatically stripped from it.
$from = $edit['mail'];
......
......@@ -502,7 +502,7 @@ function contact_mail_page_validate($form_id, $form_values) {
*/
function contact_mail_page_submit($form_id, $edit) {
// E-mail address of the sender: as the form field is a text field,
// E-mail address of the sender: as the form field is a text field,
// all instances of \r and \n have been automatically stripped from it.
$from = $edit['mail'];
......
......@@ -1049,7 +1049,7 @@ function _filter_html($text, $format) {
function _filter_autop($text) {
// All block level tags
$block = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|p|h[1-6])';
// Split at <pre>, <script>, <style> and </pre>, </script>, </style> tags.
// We don't apply any processing to the contents of these tags to avoid messing
// up code. We look for matched pairs and allow basic nesting. For example:
......@@ -1103,12 +1103,12 @@ function _filter_autop($text) {
/**
* Very permissive XSS/HTML filter for admin-only use.
*
* Use only for fields where it is impractical to use the
* Use only for fields where it is impractical to use the
* whole filter system, but where some (mainly inline) mark-up
* is desired (so check_plain() is not acceptable).
*
* Allows all tags that can be used inside an HTML body, save
* for scripts and styles.
* for scripts and styles.
*/
function filter_xss_admin($string) {
return filter_xss($string, array('a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'object', 'ol', 'p', 'param', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'));
......
......@@ -1049,7 +1049,7 @@ function _filter_html($text, $format) {
function _filter_autop($text) {
// All block level tags
$block = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|p|h[1-6])';
// Split at <pre>, <script>, <style> and </pre>, </script>, </style> tags.
// We don't apply any processing to the contents of these tags to avoid messing
// up code. We look for matched pairs and allow basic nesting. For example:
......@@ -1103,12 +1103,12 @@ function _filter_autop($text) {
/**
* Very permissive XSS/HTML filter for admin-only use.
*
* Use only for fields where it is impractical to use the
* Use only for fields where it is impractical to use the
* whole filter system, but where some (mainly inline) mark-up
* is desired (so check_plain() is not acceptable).
*
* Allows all tags that can be used inside an HTML body, save
* for scripts and styles.
* for scripts and styles.
*/
function filter_xss_admin($string) {
return filter_xss($string, array('a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'object', 'ol', 'p', 'param', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'));
......
......@@ -1627,7 +1627,7 @@ function node_form_array($node) {
$form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 20);
$form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#default_value' => $node->name ? $node->name : '', '#weight' => -1, '#description' => t('Leave blank for %anonymous.', array('%anonymous' => theme('placeholder', variable_get('anonymous', 'Anonymous')))));
$form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => $node->date)));
if (isset($node->nid)) {
$form['author']['date']['#default_value'] = $node->date;
}
......
......@@ -1627,7 +1627,7 @@ function node_form_array($node) {
$form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 20);
$form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#default_value' => $node->name ? $node->name : '', '#weight' => -1, '#description' => t('Leave blank for %anonymous.', array('%anonymous' => theme('placeholder', variable_get('anonymous', 'Anonymous')))));
$form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#description' => t('Format: %time. Leave blank to use the time of form submission.', array('%time' => $node->date)));
if (isset($node->nid)) {
$form['author']['date']['#default_value'] = $node->date;
}
......
......@@ -301,7 +301,7 @@ function profile_field_form_validate($form_id, $form_values) {
$args1 = array($form_values['title'], $form_values['category']);
$args2 = array($form_values['name']);
$query_suffix = '';
if (isset($form_values['fid'])) {
$args1[] = $args2[] = $form_values['fid'];
$query_suffix = ' AND fid != %d';
......@@ -321,7 +321,7 @@ function profile_field_form_validate($form_id, $form_values) {
function profile_field_form_submit($form_id, $form_values) {
if (!isset($form_values['fid'])) {
db_query("INSERT INTO {profile_fields} (title, name, explanation, category, type, weight, required, register, visibility, options, page) VALUES ('%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, '%s', '%s')", $form_values['title'], $form_values['name'], $form_values['explanation'], $form_values['category'], $form_values['type'], $form_values['weight'], $form_values['required'], $form_values['register'], $form_values['visibility'], $form_values['options'], $form_values['page']);
drupal_set_message(t('The field has been created.'));
watchdog('profile', t('Profile field %field added under category %category.', array('%field' => theme('placeholder', $form_values['title']), '%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/profile'));
}
......@@ -331,7 +331,7 @@ function profile_field_form_submit($form_id, $form_values) {
drupal_set_message(t('The field has been updated.'));
}
cache_clear_all();
return 'admin/settings/profile';
}
......@@ -346,7 +346,7 @@ function profile_field_delete($fid) {
}
$form['fid'] = array('#type' => 'value', '#value' => $fid);
$form['title'] = array('#type' => 'value', '#value' => $field->title);
return confirm_form('profile_field_delete', $form, t('Are you sure you want to delete the field %field?', array('%field' => theme('placeholder', $field->title))), 'admin/settings/profile', t('This action cannot be undone. If users have entered values into this field in their profile, these entries will also be deleted. If you want to keep the user-entered data, instead of deleting the field you may wish to <a href="%edit-field">edit this field</a> and change it to a %hidden-field so that it may only be accessed by administrators.', array('%edit-field' => url('admin/settings/profile/edit/' . $fid), '%hidden-field' => theme('placeholder', t('hidden profile field'))), t('Delete'), t('Cancel')));
}
......@@ -356,12 +356,12 @@ function profile_field_delete($fid) {
function profile_field_delete_submit($form_id, $form_values) {
db_query('DELETE FROM {profile_fields} WHERE fid = %d', $form_values['fid']);
db_query('DELETE FROM {profile_values} WHERE fid = %d', $form_values['fid']);
cache_clear_all();
drupal_set_message(t('The field %field has been deleted.', array('%field' => theme('placeholder', $form_values['title']))));
watchdog('profile', t('Profile field %field deleted.', array('%field' => theme('placeholder', $form_values['title']))), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/profile'));
return 'admin/settings/profile';
}
......
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