diff --git a/authorize.php b/authorize.php index cd3df50..f56a9c5 100644 --- a/authorize.php +++ b/authorize.php @@ -145,7 +145,7 @@ if (authorize_access_allowed()) { l(t('Front page'), ''), )); } - + $output .= theme('item_list', array('items' => $links, 'title' => t('Next steps'))); } // If a batch is running, let it run. diff --git a/includes/ajax.inc b/includes/ajax.inc index 41c6983..5212c8c 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -101,7 +101,7 @@ * In the above example, the 'changethis' element is Ajax-enabled. The default * #ajax['event'] is 'change', so when the 'changethis' element changes, * an Ajax call is made. The form is submitted and reprocessed, and then the - * callback is called. In this case, the form has been automatically + * callback is called. In this case, the form has been automatically * built changing $form['replace_textfield']['#description'], so the callback * just returns that part of the form. * diff --git a/includes/archiver.inc b/includes/archiver.inc index fec053b..b35757f 100644 --- a/includes/archiver.inc +++ b/includes/archiver.inc @@ -15,7 +15,7 @@ interface ArchiverInterface { * * @param $file_path * The full system path of the archive to manipulate. Only local files - * are supported. If the file does not yet exist, it will be created if + * are supported. If the file does not yet exist, it will be created if * appropriate. */ public function __construct($file_path); diff --git a/includes/authorize.inc b/includes/authorize.inc index 979a980..fcffd65 100644 --- a/includes/authorize.inc +++ b/includes/authorize.inc @@ -210,7 +210,7 @@ function authorize_filetransfer_form_validate($form, &$form_state) { // The format of this error message is similar to that used on the // database connection form in the installer. form_set_error('connection_settings', t('Failed to connect to the server. The server reports the following message: !message For more help installing or updating code on your server, see the handbook.', array( - '!message' => '

' . $e->getMessage() . '

', + '!message' => '

' . $e->getMessage() . '

', '@handbook_url' => 'http://drupal.org/documentation/install/modules-themes', ))); } diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 4875f4b..2cbee88 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1678,7 +1678,7 @@ function drupal_block_denied($ip) { * @param $count * The number of characters (bytes) to return in the string. */ -function drupal_random_bytes($count) { +function drupal_random_bytes($count) { // $random_state does not use drupal_static as it stores random bytes. static $random_state, $bytes; // Initialize on the first call. The contents of $_SERVER includes a mix of @@ -2178,7 +2178,7 @@ function drupal_valid_test_ua() { if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^(simpletest\d+);(.+);(.+);(.+)$/", $_SERVER['HTTP_USER_AGENT'], $matches)) { list(, $prefix, $time, $salt, $hmac) = $matches; - $check_string = $prefix . ';' . $time . ';' . $salt; + $check_string = $prefix . ';' . $time . ';' . $salt; // We use the salt from settings.php to make the HMAC key, since // the database is not yet initialized and we can't access any Drupal variables. // The file properties add more entropy not easily accessible to others. diff --git a/includes/cache.inc b/includes/cache.inc index 8666874..34e616c 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -153,7 +153,7 @@ function cache_set($cid, $data, $bin = 'cache', $expire = CACHE_PERMANENT) { * * @param $wildcard * If $wildcard is TRUE, cache IDs starting with $cid are deleted in - * addition to the exact cache ID specified by $cid. If $wildcard is + * addition to the exact cache ID specified by $cid. If $wildcard is * TRUE and $cid is '*' then the entire bin $bin is emptied. */ function cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE) { diff --git a/includes/common.inc b/includes/common.inc index eb68850..970de07 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3587,12 +3587,12 @@ function _drupal_load_stylesheet($matches) { $directory = dirname($filename); // If the file is in the current directory, make sure '.' doesn't appear in // the url() path. - $directory = $directory == '.' ? '' : $directory .'/'; + $directory = $directory == '.' ? '' : $directory . '/'; // Alter all internal url() paths. Leave external paths alone. We don't need // to normalize absolute paths here (i.e. remove folder/... segments) because // that will be done later. - return preg_replace('/url\(\s*([\'"]?)(?![a-z]+:|\/+)/i', 'url(\1'. $directory, $file); + return preg_replace('/url\(\s*([\'"]?)(?![a-z]+:|\/+)/i', 'url(\1' . $directory, $file); } /** @@ -4126,7 +4126,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS ), ); foreach ($items as $item) { - $query_string = empty($item['version']) ? $default_query_string : $js_version_string . $item['version']; + $query_string = empty($item['version']) ? $default_query_string : $js_version_string . $item['version']; switch ($item['type']) { case 'setting': diff --git a/includes/database/database.inc b/includes/database/database.inc index 4a3cbb4..4c046af 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -121,7 +121,7 @@ * databases that do not support transactions. To start a new transaction, * simply call $txn = db_transaction(); in your own code. The transaction will * remain open for as long as the variable $txn remains in scope. When $txn is - * destroyed, the transaction will be committed. If your transaction is nested + * destroyed, the transaction will be committed. If your transaction is nested * inside of another then Drupal will track each transaction and only commit * the outer-most transaction when the last transaction object goes out out of * scope, that is, all relevant queries completed successfully. @@ -213,7 +213,7 @@ abstract class DatabaseConnection extends PDO { /** * Tracks the number of "layers" of transactions currently active. * - * On many databases transactions cannot nest. Instead, we track + * On many databases transactions cannot nest. Instead, we track * nested calls to transactions and collapse them into a single * transaction. * @@ -1019,7 +1019,7 @@ abstract class DatabaseConnection extends PDO { } // Commit everything since SAVEPOINT $name. - while($savepoint = array_pop($this->transactionLayers)) { + while ($savepoint = array_pop($this->transactionLayers)) { if ($savepoint != $name) continue; // If there are no more layers left then we should commit. @@ -2096,7 +2096,7 @@ class DatabaseStatementBase extends PDOStatement implements DatabaseStatementInt * Empty implementation of a database statement. * * This class satisfies the requirements of being a database statement/result - * object, but does not actually contain data. It is useful when developers + * object, but does not actually contain data. It is useful when developers * need to safely return an "empty" result set without connecting to an actual * database. Calling code can then treat it the same as if it were an actual * result set that happens to contain no records. diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc index 4e88fa1..5b54188 100644 --- a/includes/database/mysql/schema.inc +++ b/includes/database/mysql/schema.inc @@ -492,7 +492,7 @@ class DatabaseSchema_mysql extends DatabaseSchema { public function tableExists($table) { // The information_schema table is very slow to query under MySQL 5.0. - // Instead, we try to select from the table in question. If it fails, + // Instead, we try to select from the table in question. If it fails, // the most likely reason is that it does not exist. That is dramatically // faster than using information_schema. // @link http://bugs.mysql.com/bug.php?id=19588 diff --git a/includes/database/select.inc b/includes/database/select.inc index 6e4b0dc..16b192b 100644 --- a/includes/database/select.inc +++ b/includes/database/select.inc @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/query.inc'; * Interface for extendable query objects. * * "Extenders" follow the "Decorator" OOP design pattern. That is, they wrap - * and "decorate" another object. In our case, they implement the same interface + * and "decorate" another object. In our case, they implement the same interface * as select queries and wrap a select query, to which they delegate almost all * operations. Subclasses of this class may implement additional methods or * override existing methods as appropriate. Extenders may also wrap other @@ -835,16 +835,16 @@ class SelectQueryExtender implements SelectQueryInterface { * If one extender extends another extender, then methods in the inner extender * will not be exposed on the outer extender. That's because we cannot know * in advance what those methods will be, so we cannot provide wrapping - * implementations as we do above. Instead, we use this slower catch-all method + * implementations as we do above. Instead, we use this slower catch-all method * to handle any additional methods. */ public function __call($method, $args) { $return = call_user_func_array(array($this->query, $method), $args); // Some methods will return the called object as part of a fluent interface. - // Others will return some useful value. If it's a value, then the caller - // probably wants that value. If it's the called object, then we instead - // return this object. That way we don't "lose" an extender layer when + // Others will return some useful value. If it's a value, then the caller + // probably wants that value. If it's the called object, then we instead + // return this object. That way we don't "lose" an extender layer when // chaining methods together. if ($return instanceof SelectQueryInterface) { return $this; @@ -1488,7 +1488,7 @@ class SelectQuery extends Query implements SelectQueryInterface { // Don't use the AS keyword for table aliases, as some // databases don't support it (e.g., Oracle). - $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); + $query .= $table_string . ' ' . $this->connection->escapeTable($table['alias']); if (!empty($table['condition'])) { $query .= ' ON ' . $table['condition']; diff --git a/includes/database/sqlite/database.inc b/includes/database/sqlite/database.inc index cf3b955..deae73e 100644 --- a/includes/database/sqlite/database.inc +++ b/includes/database/sqlite/database.inc @@ -350,7 +350,7 @@ class DatabaseConnection_sqlite extends DatabaseConnection { } // Commit everything since SAVEPOINT $name. - while($savepoint = array_pop($this->transactionLayers)) { + while ($savepoint = array_pop($this->transactionLayers)) { if ($savepoint != $name) continue; // If there are no more layers left then we should commit or rollback. diff --git a/includes/entity.inc b/includes/entity.inc index a3cdf74..9e3965d 100644 --- a/includes/entity.inc +++ b/includes/entity.inc @@ -831,7 +831,7 @@ class EntityFieldQuery { * Enable a pager for the query. * * @param $limit - * An integer specifying the number of elements per page. If passed a false + * An integer specifying the number of elements per page. If passed a false * value (FALSE, 0, NULL), the pager is disabled. * @param $element * An optional integer to distinguish between multiple pagers on one page. @@ -866,7 +866,7 @@ class EntityFieldQuery { */ public function tableSort(&$headers) { // If 'field' is not initialized, the header columns aren't clickable - foreach ($headers as $key =>$header) { + foreach ($headers as $key => $header) { if (is_array($header) && isset($header['specifier'])) { $headers[$key]['field'] = ''; } diff --git a/includes/errors.inc b/includes/errors.inc index 3a97b6d..18c231c 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -218,7 +218,7 @@ function _drupal_log_error($error, $fatal = FALSE) { if (drupal_is_cli()) { if ($fatal) { // When called from CLI, simply output a plain text message. - print html_entity_decode(strip_tags(t('%type: !message in %function (line %line of %file).', $error))). "\n"; + print html_entity_decode(strip_tags(t('%type: !message in %function (line %line of %file).', $error))) . "\n"; exit; } } diff --git a/includes/file.inc b/includes/file.inc index 26a6c41..7bd6250 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -485,7 +485,7 @@ function file_create_htaccess($directory, $private = TRUE) { else { $directory = rtrim($directory, '/\\'); } - $htaccess_path = $directory . '/.htaccess'; + $htaccess_path = $directory . '/.htaccess'; if (file_exists($htaccess_path)) { // Short circuit if the .htaccess file already exists. @@ -1655,7 +1655,7 @@ function file_validate_size(stdClass $file, $file_limit = 0, $user_limit = 0) { $errors = array(); - // Bypass validation for uid = 1. + // Bypass validation for uid = 1. if ($user->uid != 1) { if ($file_limit && $file->filesize > $file_limit) { $errors[] = t('The file is %filesize exceeding the maximum file size of %maxsize.', array('%filesize' => format_size($file->filesize), '%maxsize' => format_size($file_limit))); @@ -1824,7 +1824,7 @@ function file_save_data($data, $destination = NULL, $replace = FILE_EXISTS_RENAM * A string containing the contents of the file. * @param $destination * A string containing the destination location. - * This must be a stream wrapper URI. If no value is provided, a + * This must be a stream wrapper URI. If no value is provided, a * randomized name will be generated and the file is saved using Drupal's * default files scheme, usually "public://". * @param $replace diff --git a/includes/filetransfer/filetransfer.inc b/includes/filetransfer/filetransfer.inc index 2083da9..b224d35 100644 --- a/includes/filetransfer/filetransfer.inc +++ b/includes/filetransfer/filetransfer.inc @@ -304,7 +304,7 @@ abstract class FileTransfer { $check = implode($parts, '/'); if ($this->isFile($check . '/' . basename(__FILE__))) { // Remove the trailing slash. - return substr($chroot,0,-1); + return substr($chroot, 0, -1); } $chroot .= array_shift($parts) . '/'; } diff --git a/includes/filetransfer/ftp.inc b/includes/filetransfer/ftp.inc index 838dc7c..dac8b18 100644 --- a/includes/filetransfer/ftp.inc +++ b/includes/filetransfer/ftp.inc @@ -82,11 +82,11 @@ class FileTransferFTPExtension extends FileTransferFTP implements FileTransferCh if (!$list) { $list = array(); } - foreach ($list as $item){ + foreach ($list as $item) { if ($item == '.' || $item == '..') { continue; } - if (@ftp_chdir($this->connection, $item)){ + if (@ftp_chdir($this->connection, $item)) { ftp_cdup($this->connection); $this->removeDirectory(ftp_pwd($this->connection) . '/' . $item); } diff --git a/includes/filetransfer/ssh.inc b/includes/filetransfer/ssh.inc index 43ec324..fdd1d0a 100644 --- a/includes/filetransfer/ssh.inc +++ b/includes/filetransfer/ssh.inc @@ -62,7 +62,7 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface } /** - * WARNING: This is untested. It is not currently used, but should do the trick. + * WARNING: This is untested. It is not currently used, but should do the trick. */ public function isDirectory($path) { $directory = escapeshellarg($path); @@ -72,7 +72,8 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface return TRUE; } return FALSE; - } else { + } + else { throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path)); } } @@ -85,7 +86,8 @@ class FileTransferSSH extends FileTransfer implements FileTransferChmodInterface return TRUE; } return FALSE; - } else { + } + else { throw new FileTransferException('Cannot check @path.', NULL, array('@path' => $path)); } } diff --git a/includes/form.inc b/includes/form.inc index c0163ca..b156ae5 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -377,7 +377,7 @@ function form_state_defaults() { 'submitted' => FALSE, 'executed' => FALSE, 'programmed' => FALSE, - 'cache'=> FALSE, + 'cache' => FALSE, 'method' => 'post', 'groups' => array(), 'buttons' => array(), @@ -2709,14 +2709,14 @@ function theme_radios($variables) { * Expand a password_confirm field into two text boxes. */ function form_process_password_confirm($element) { - $element['pass1'] = array( + $element['pass1'] = array( '#type' => 'password', '#title' => t('Password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass1'], '#required' => $element['#required'], '#attributes' => array('class' => array('password-field')), ); - $element['pass2'] = array( + $element['pass2'] = array( '#type' => 'password', '#title' => t('Confirm password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass2'], @@ -3113,11 +3113,11 @@ function theme_container($variables) { * @code * $options = array(); * $options[0]['title'] = "A red row" - * $options[0]['#attributes'] = array ('class' => array('red-row')); + * $options[0]['#attributes'] = array('class' => array('red-row')); * $options[1]['title'] = "A blue row" - * $options[1]['#attributes'] = array ('class' => array('blue-row')); + * $options[1]['#attributes'] = array('class' => array('blue-row')); * - * $form['myselector'] = array ( + * $form['myselector'] = array( * '#type' => 'tableselect', * '#title' => 'My Selector' * '#options' => $options, diff --git a/includes/install.core.inc b/includes/install.core.inc index a74dfdf..56dae46 100644 --- a/includes/install.core.inc +++ b/includes/install.core.inc @@ -1106,7 +1106,7 @@ function install_select_profile_form($form, &$form_state, $profile_files) { ); } $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array( + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); @@ -1255,7 +1255,7 @@ function install_select_locale_form($form, &$form_state, $locales, $profilename) ); } $form['actions'] = array('#type' => 'actions'); - $form['actions']['submit'] = array( + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); diff --git a/includes/install.inc b/includes/install.inc index 14b5d7e..b51d504 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -410,7 +410,7 @@ abstract class DatabaseTasks { $message = ''; foreach ($this->results as $result => $success) { if (!$success) { - $message .= '

' . $result . '

'; + $message .= '

' . $result . '

'; } } if (!empty($message)) { @@ -561,7 +561,7 @@ abstract class DatabaseTasks { // Verify the database port. if (!empty($database['port']) && !is_numeric($database['port'])) { - $errors[$database['driver'] . '][advanced_options][port'] = st('Database port must be a number.'); + $errors[$database['driver'] . '][advanced_options][port'] = st('Database port must be a number.'); } return $errors; @@ -1072,7 +1072,7 @@ function st($string, array $args = array(), array $options = array()) { // with its name ending in {$install_state['parameters']['locale']}.po // This might or might not be the entire filename. It is also possible // that multiple files end with the same extension, even if unlikely. - $po_files = file_scan_directory('./profiles/' . $install_state['parameters']['profile'] . '/translations', '/'. $install_state['parameters']['locale'] .'\.po$/', array('recurse' => FALSE)); + $po_files = file_scan_directory('./profiles/' . $install_state['parameters']['profile'] . '/translations', '/' . $install_state['parameters']['locale'] . '\.po$/', array('recurse' => FALSE)); if (count($po_files)) { require_once DRUPAL_ROOT . '/includes/locale.inc'; foreach ($po_files as $po_file) { diff --git a/includes/mail.inc b/includes/mail.inc index d2febed..dd87f72 100644 --- a/includes/mail.inc +++ b/includes/mail.inc @@ -55,7 +55,7 @@ define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || strpos($_SERVER['SERVER * $data['user'] = $params['account']; * $options['language'] = $message['language']; * user_mail_tokens($variables, $data, $options); - * switch($key) { + * switch ($key) { * case 'notice': * $langcode = $message['language']->language; * $message['subject'] = t('Notification from !site', $variables, array('langcode' => $langcode)); diff --git a/includes/menu.inc b/includes/menu.inc index e7abda7..394a9ac 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -305,7 +305,7 @@ define('MENU_MAX_DEPTH', 9); function menu_get_ancestors($parts) { $number_parts = count($parts); $ancestors = array(); - $length = $number_parts - 1; + $length = $number_parts - 1; $end = (1 << $number_parts) - 1; $masks = variable_get('menu_masks', array()); // Only examine patterns that actually exist as router items (the masks). @@ -3420,7 +3420,7 @@ function _menu_router_build($callbacks) { $parts[$k] = '%'; } else { - $fit |= 1 << ($slashes - $k); + $fit |= 1 << ($slashes - $k); } } if ($fit) { diff --git a/includes/pager.inc b/includes/pager.inc index 146033f..eb8dd67 100644 --- a/includes/pager.inc +++ b/includes/pager.inc @@ -9,7 +9,7 @@ /** * Query extender for pager queries. * - * This is the "default" pager mechanism. It creates a paged query with a fixed + * This is the "default" pager mechanism. It creates a paged query with a fixed * number of entries per page. */ class PagerDefault extends SelectQueryExtender { @@ -96,11 +96,11 @@ class PagerDefault extends SelectQueryExtender { /** * Specify the count query object to use for this pager. * - * You will rarely need to specify a count query directly. If not specified, + * You will rarely need to specify a count query directly. If not specified, * one is generated off of the pager query itself. * * @param SelectQueryInterface $query - * The count query object. It must return a single row with a single column, + * The count query object. It must return a single row with a single column, * which is the total number of records. */ public function setCountQuery(SelectQueryInterface $query) { @@ -131,7 +131,7 @@ class PagerDefault extends SelectQueryExtender { * The default if not specified is 10 items per page. * * @param $limit - * An integer specifying the number of elements per page. If passed a false + * An integer specifying the number of elements per page. If passed a false * value (FALSE, 0, NULL), the pager is disabled. */ public function limit($limit = 10) { @@ -143,8 +143,8 @@ class PagerDefault extends SelectQueryExtender { * Specify the element ID for this pager query. * * The element is used to differentiate different pager queries on the same - * page so that they may be operated independently. If you do not specify an - * element, every pager query on the page will get a unique element. If for + * page so that they may be operated independently. If you do not specify an + * element, every pager query on the page will get a unique element. If for * whatever reason you want to explicitly define an element for a given query, * you may do so here. * diff --git a/includes/password.inc b/includes/password.inc index 13659f8..d32e517 100644 --- a/includes/password.inc +++ b/includes/password.inc @@ -177,7 +177,7 @@ function _password_crypt($algo, $password, $setting) { } while (--$count); $len = strlen($hash); - $output = $setting . _password_base64_encode($hash, $len); + $output = $setting . _password_base64_encode($hash, $len); // _password_base64_encode() of a 16 byte MD5 will always be 22 characters. // _password_base64_encode() of a 64 byte sha512 will always be 86 characters. $expected = 12 + ceil((8 * $len) / 6); diff --git a/includes/update.inc b/includes/update.inc index f7a8fd6..cbee34e 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -636,7 +636,7 @@ function update_retrieve_dependencies() { $return = array(); // Get a list of installed modules, arranged so that we invoke their hooks in // the same order that module_invoke_all() does. - $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version != :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol(); + $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version <> :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol(); foreach ($modules as $module) { $function = $module . '_update_dependencies'; if (function_exists($function)) { diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test index 1ab12dc..2158711 100644 --- a/modules/aggregator/aggregator.test +++ b/modules/aggregator/aggregator.test @@ -371,7 +371,7 @@ class UpdateFeedTestCase extends AggregatorTestCase { // Get new feed data array and modify newly created feed. $edit = $this->getFeedEditArray(); - $edit['refresh'] = 1800; // Change refresh value. + $edit['refresh'] = 1800; // Change refresh value. if (isset($feed->{$same_field})) { $edit[$same_field] = $feed->{$same_field}; } diff --git a/modules/block/block.api.php b/modules/block/block.api.php index 90e23bd..fcc2aad 100644 --- a/modules/block/block.api.php +++ b/modules/block/block.api.php @@ -222,7 +222,8 @@ function hook_block_view($delta = '') { $block['content'] = theme('node_recent_block', array( 'nodes' => $nodes, )); - } else { + } + else { $block['content'] = t('No content available.'); } } diff --git a/modules/block/block.test b/modules/block/block.test index af118a9..4ce46ab 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -420,7 +420,7 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase { } /** - * Check for the accessibility of the admin theme on the block admin page. + * Check for the accessibility of the admin theme on the block admin page. */ function testAdminTheme() { // Create administrative user. diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 98ebe51..9aee27e 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -23,7 +23,7 @@ function blog_node_info() { */ function blog_user_view($account) { if (user_access('create blog content', $account)) { - $account->content['summary']['blog'] = array( + $account->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), '#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => format_username($account)))))), diff --git a/modules/book/book.module b/modules/book/book.module index 82d38f7..14c8520 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -1046,7 +1046,7 @@ function template_preprocess_book_navigation(&$variables) { * string incremented by depth. * * @param $tree - * The data structure of the book's menu tree. Includes hidden links. + * The data structure of the book's menu tree. Includes hidden links. * @param $indent * A string appended to each menu item title. Increments by '--' per depth * level. diff --git a/modules/comment/comment.module b/modules/comment/comment.module index f8c3a01..1476728 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -92,7 +92,7 @@ function comment_help($path, $arg) { * Implements hook_entity_info(). */ function comment_entity_info() { - $return = array( + $return = array( 'comment' => array( 'label' => t('Comment'), 'base table' => 'comment', @@ -541,7 +541,7 @@ function comment_new_page_count($num_comments, $new_replies, $node) { elseif ($flat) { // Flat comments. $count = $num_comments - $new_replies; - $pageno = $count / $comments_per_page; + $pageno = $count / $comments_per_page; } else { // Threaded comments: we build a query with a subquery to find the first @@ -574,7 +574,7 @@ function comment_new_page_count($num_comments, $new_replies, $node) { ':thread' => $first_thread, ))->fetchField(); - $pageno = $count / $comments_per_page; + $pageno = $count / $comments_per_page; } if ($pageno >= 1) { @@ -1438,7 +1438,7 @@ function comment_save($comment) { $transaction = db_transaction(); try { - $defaults = array( + $defaults = array( 'mail' => '', 'homepage' => '', 'name' => '', diff --git a/modules/comment/comment.tokens.inc b/modules/comment/comment.tokens.inc index d62b7e2..bdf3ca6 100644 --- a/modules/comment/comment.tokens.inc +++ b/modules/comment/comment.tokens.inc @@ -225,7 +225,7 @@ function comment_tokens($type, $tokens, array $data = array(), array $options = $node = $data['node']; foreach ($tokens as $name => $original) { - switch($name) { + switch ($name) { case 'comment-count': $replacements[$original] = $node->comment_count; break; diff --git a/modules/contact/contact.test b/modules/contact/contact.test index bc44f5a..8fc543b 100644 --- a/modules/contact/contact.test +++ b/modules/contact/contact.test @@ -389,7 +389,7 @@ class ContactPersonalTestCase extends DrupalWebTestCase { } // Submit contact form one over limit. - $this->drupalGet('user/' . $this->contact_user->uid. '/contact'); + $this->drupalGet('user/' . $this->contact_user->uid . '/contact'); $this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.', array('%number' => $flood_limit, '@interval' => format_interval(variable_get('contact_threshold_window', 3600)))), 'Normal user denied access to flooded contact form.'); // Test that the admin user can still access the contact form even though diff --git a/modules/dashboard/dashboard.js b/modules/dashboard/dashboard.js index ebecbf6..9d706f3 100644 --- a/modules/dashboard/dashboard.js +++ b/modules/dashboard/dashboard.js @@ -23,7 +23,8 @@ Drupal.behaviors.dashboard = { // Check if we are in customize mode and grab the correct empty text if ($('#dashboard').hasClass('customize-mode')) { empty_text = Drupal.settings.dashboard.emptyRegionTextActive; - } else { + } + else { empty_text = Drupal.settings.dashboard.emptyRegionTextInactive; } // We need a placeholder. diff --git a/modules/field/tests/field_test.storage.inc b/modules/field/tests/field_test.storage.inc index 3ca322d..f7426f5 100644 --- a/modules/field/tests/field_test.storage.inc +++ b/modules/field/tests/field_test.storage.inc @@ -287,7 +287,7 @@ function field_test_field_storage_query($field_id, $conditions, $count, &$cursor case '<=': case '>': case '>=': - eval('$match = $match && ' . $row->{$column} . ' ' . $operator . ' '. $value); + eval('$match = $match && ' . $row->{$column} . ' ' . $operator . ' ' . $value); break; case 'IN': $match = $match && in_array($row->{$column}, $value); diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc index 96beb13..0779bdf 100644 --- a/modules/field_ui/field_ui.admin.inc +++ b/modules/field_ui/field_ui.admin.inc @@ -447,7 +447,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle '#title_display' => 'invisible', '#size' => 15, '#description' => t('Label'), - '#prefix' => '
' . t('Add new field') .'
', + '#prefix' => '
' . t('Add new field') . '
', '#suffix' => '
', ), 'weight' => array( @@ -483,7 +483,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle // This field should stay LTR even for RTL languages. '#field_prefix' => 'field_', '#field_suffix' => '‎', - '#attributes' => array('dir'=>'ltr'), + '#attributes' => array('dir' => 'ltr'), '#size' => 10, '#description' => t('Field name (a-z, 0-9, _)'), '#prefix' => '
 
', @@ -527,7 +527,7 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle '#size' => 15, '#description' => t('Label'), '#attributes' => array('class' => array('label-textfield')), - '#prefix' => '
' . t('Add existing field') .'
', + '#prefix' => '
' . t('Add existing field') . '
', '#suffix' => '
', ), 'weight' => array( diff --git a/modules/field_ui/field_ui.module b/modules/field_ui/field_ui.module index 28ac0e1..1a80e71 100644 --- a/modules/field_ui/field_ui.module +++ b/modules/field_ui/field_ui.module @@ -353,7 +353,7 @@ function field_ui_form_node_type_form_alter(&$form, $form_state) { */ function field_ui_form_node_type_form_submit($form, &$form_state) { if ($form_state['clicked_button']['#parents'][0] === 'save_continue') { - $form_state['redirect'] = _field_ui_bundle_admin_path('node', $form_state['values']['type']) .'/fields'; + $form_state['redirect'] = _field_ui_bundle_admin_path('node', $form_state['values']['type']) . '/fields'; } } diff --git a/modules/field_ui/field_ui.test b/modules/field_ui/field_ui.test index 2429a19..c321803 100644 --- a/modules/field_ui/field_ui.test +++ b/modules/field_ui/field_ui.test @@ -19,7 +19,7 @@ class FieldUITestCase extends DrupalWebTestCase { $this->drupalLogin($admin_user); // Create content type, with underscores. - $type_name = strtolower($this->randomName(8)) . '_' .'test'; + $type_name = strtolower($this->randomName(8)) . '_' .'test'; $type = $this->drupalCreateContentType(array('name' => $type_name, 'type' => $type_name)); $this->type = $type->type; // Store a valid URL name, with hyphens instead of underscores. @@ -140,8 +140,8 @@ class FieldUIManageFieldsTestCase extends FieldUITestCase { // Create random field name. $this->field_label = $this->randomName(8); - $this->field_name_input = strtolower($this->randomName(8)); - $this->field_name = 'field_'. $this->field_name_input; + $this->field_name_input = strtolower($this->randomName(8)); + $this->field_name = 'field_' . $this->field_name_input; } /** @@ -336,7 +336,7 @@ class FieldUIManageFieldsTestCase extends FieldUITestCase { $this->fieldUIAddNewField($bundle_path1, $edit1); // Create an additional node type. - $type_name2 = strtolower($this->randomName(8)) . '_' .'test'; + $type_name2 = strtolower($this->randomName(8)) . '_' .'test'; $type2 = $this->drupalCreateContentType(array('name' => $type_name2, 'type' => $type_name2)); $type_name2 = $type2->type; $hyphen_type2 = str_replace('_', '-', $type_name2); @@ -607,7 +607,7 @@ class FieldUIManageDisplayTestCase extends FieldUITestCase { // Render a cloned node, so that we do not alter the original. $clone = clone $node; $output = drupal_render(node_view($clone, $view_mode)); - $this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '
'. $output); + $this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '
' . $output); // Assign content so that DrupalWebTestCase functions can be used. $this->drupalSetContent($output); diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 66fadcb..1634e6c 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -1528,7 +1528,7 @@ function _filter_url_escape_comments($match, $escape = NULL) { if (isset($escape)) { $mode = $escape; - if ($escape){ + if ($escape) { $comments = array(); } return; diff --git a/modules/forum/forum.install b/modules/forum/forum.install index 8e41be7..cdab146 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -198,7 +198,7 @@ function forum_schema() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default'=> 0, + 'default' => 0, ), 'last_comment_timestamp' => array( 'type' => 'int', diff --git a/modules/forum/forum.module b/modules/forum/forum.module index b5e4226..6193db3 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -307,7 +307,7 @@ function forum_node_validate($node, $form) { form_set_error('taxonomy_forums', t('Select a forum.')); continue; } - $used = db_query_range('SELECT 1 FROM {taxonomy_term_data} WHERE tid = :tid AND vid = :vid',0 , 1, array( + $used = db_query_range('SELECT 1 FROM {taxonomy_term_data} WHERE tid = :tid AND vid = :vid', 0 , 1, array( ':tid' => $term->tid, ':vid' => $term->vid, ))->fetchField(); diff --git a/modules/help/help.api.php b/modules/help/help.api.php index ff2f97c..0167271 100644 --- a/modules/help/help.api.php +++ b/modules/help/help.api.php @@ -22,7 +22,7 @@ * * @param $path * The router menu path, as defined in hook_menu(), for the help that is - * being requested; e.g., 'admin/people' or 'user/register'. If the router + * being requested; e.g., 'admin/people' or 'user/register'. If the router * path includes a wildcard, then this will appear in $path as %, even if it * is a named %autoloader wildcard in the hook_menu() implementation; for * example, node pages would have $path equal to 'node/%' or 'node/%/view'. diff --git a/modules/image/image.module b/modules/image/image.module index d2d081c..2453300 100644 --- a/modules/image/image.module +++ b/modules/image/image.module @@ -45,7 +45,7 @@ function image_help($path, $arg) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Manipulating images') . '
'; - $output .= '
' . t('With the Image module you can scale, crop, resize, rotate and desaturate images without affecting the original image using image styles. When you change an image style, the module automatically refreshes all created images. Every image style must have a name, which will be used in the URL of the generated images. There are two common approaches to naming image styles (which you use will depend on how the image style is being applied):',array('@image' => url('admin/config/media/image-styles'))); + $output .= '
' . t('With the Image module you can scale, crop, resize, rotate and desaturate images without affecting the original image using image styles. When you change an image style, the module automatically refreshes all created images. Every image style must have a name, which will be used in the URL of the generated images. There are two common approaches to naming image styles (which you use will depend on how the image style is being applied):', array('@image' => url('admin/config/media/image-styles'))); $output .= '
  • ' . t('Based on where it will be used: eg. profile-picture') . '
  • '; $output .= '
  • ' . t('Describing its appearance: eg. square-85x85') . '
'; $output .= t('After you create an image style, you can add effects: crop, scale, resize, rotate, and desaturate (other contributed modules provide additional effects). For example, by combining effects as crop, scale, and desaturate, you can create square, grayscale thumbnails.') . '
'; diff --git a/modules/image/image.test b/modules/image/image.test index 00f79d8..5040ede 100644 --- a/modules/image/image.test +++ b/modules/image/image.test @@ -192,7 +192,7 @@ class ImageStylesPathAndUrlUnitTest extends DrupalWebTestCase { $this->assertNotIdentical(FALSE, $original_uri, t('Created the generated image file.')); // Get the URL of a file that has not been generated and try to create it. - $generated_uri = $scheme . '://styles/' . $this->style_name . '/' . $scheme . '/'. basename($original_uri); + $generated_uri = $scheme . '://styles/' . $this->style_name . '/' . $scheme . '/' . basename($original_uri); $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.')); $generate_url = image_style_url($this->style_name, $original_uri); diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 765bfb6..9c8849e 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -335,7 +335,7 @@ class LocaleTranslationFunctionalTest extends DrupalWebTestCase { ->condition('l.textgroup', 'default') ->execute(); $url = 'admin/config/regional/translate/edit/' . $result->fetchObject()->lid; - $edit = array('translations['. $langcode .']' => $this->randomName()); + $edit = array('translations[' . $langcode . ']' => $this->randomName()); $this->drupalPost($url, $edit, t('Save translations')); // Trigger JavaScript translation parsing and building. @@ -1014,7 +1014,7 @@ class LocaleExportFunctionalTest extends DrupalWebTestCase { */ function testExportTranslationTemplateFile() { // Get the translation template file. - // There are two 'Export' buttons on this page, but it somehow works. It'd + // There are two 'Export' buttons on this page, but it somehow works. It'd // be better if we could use the submit button id like documented but that // doesn't work. $this->drupalPost('admin/config/regional/translate/export', array(), t('Export')); @@ -1729,7 +1729,7 @@ class LocaleContentFunctionalTest extends DrupalWebTestCase { // Create "Basic page" content. $node_title = $this->randomName(); - $node_body = $this->randomName(); + $node_body = $this->randomName(); $edit = array( 'type' => 'page', 'title' => $node_title, @@ -1740,7 +1740,7 @@ class LocaleContentFunctionalTest extends DrupalWebTestCase { // Edit the content and ensure correct language is selected. $path = 'node/' . $node->nid . '/edit'; $this->drupalGet($path); - $this->assertRaw('', t('Correct language selected.')); + $this->assertRaw('', t('Correct language selected.')); // Ensure we can change the node language. $edit = array( 'language' => 'en', diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc index 1f3c4f7..d569c34 100644 --- a/modules/menu/menu.admin.inc +++ b/modules/menu/menu.admin.inc @@ -68,7 +68,7 @@ function menu_overview_form($form, &$form_state, $menu) { $menu_admin = FALSE; $form = array_merge($form, _menu_overview_tree_form($tree)); - $form['#menu'] = $menu; + $form['#menu'] = $menu; if (element_children($form)) { $form['actions'] = array('#type' => 'actions'); @@ -78,7 +78,7 @@ function menu_overview_form($form, &$form_state, $menu) { ); } else { - $form['#empty_text'] = t('There are no menu links yet. Add link.', array('@link' => url('admin/structure/menu/manage/'. $form['#menu']['menu_name'] .'/add'))); + $form['#empty_text'] = t('There are no menu links yet. Add link.', array('@link' => url('admin/structure/menu/manage/' . $form['#menu']['menu_name'] . '/add'))); } return $form; } diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index a6ea1b5..6c0d041 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -423,7 +423,7 @@ function node_admin_nodes() { } } $nids = $query - ->fields('n',array('nid')) + ->fields('n', array('nid')) ->limit(50) ->orderByHeader($header) ->execute() diff --git a/modules/node/node.module b/modules/node/node.module index a59a5b1..dc08304 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2128,7 +2128,8 @@ function node_block_view($delta = '') { $block['content'] = theme('node_recent_block', array( 'nodes' => $nodes, )); - } else { + } + else { $block['content'] = t('No content available.'); } } @@ -2899,7 +2900,7 @@ function node_access($op, $node, $account = NULL) { if (count($grants) > 0) { $query->condition($grants); } - $result = (bool) $query + $result = (bool) $query ->execute() ->fetchField(); $rights[$account->uid][$cid][$op] = $result; @@ -3810,7 +3811,8 @@ function node_requirements($phase) { $grant_count = db_query('SELECT COUNT(*) FROM {node_access}')->fetchField(); if ($grant_count != 1 || count(module_implements('node_grants')) > 0) { $value = format_plural($grant_count, 'One permission in use', '@count permissions in use', array('@count' => $grant_count)); - } else { + } + else { $value = $t('Disabled'); } $description = $t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed, content will automatically use the new permissions.'); diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index dfa71a9..43139a8 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -692,7 +692,7 @@ function _openid_get_math_library() { if (empty($library)) { if (function_exists('gmp_add')) { - $library = 'gmp'; + $library = 'gmp'; } elseif (function_exists('bcadd')) { $library = 'bcmath'; diff --git a/modules/openid/openid.module b/modules/openid/openid.module index 7673de8..8db22da 100644 --- a/modules/openid/openid.module +++ b/modules/openid/openid.module @@ -673,7 +673,7 @@ function openid_authentication_request($claimed_id, $identity, $return_to = '', module_load_include('inc', 'openid'); - $request = array( + $request = array( 'openid.mode' => 'checkid_setup', 'openid.identity' => $identity, 'openid.assoc_handle' => $assoc_handle, @@ -683,10 +683,10 @@ function openid_authentication_request($claimed_id, $identity, $return_to = '', if ($service['version'] == 2) { $request['openid.ns'] = OPENID_NS_2_0; $request['openid.claimed_id'] = $claimed_id; - $request['openid.realm'] = $base_url .'/'; + $request['openid.realm'] = $base_url . '/'; } else { - $request['openid.trust_root'] = $base_url .'/'; + $request['openid.trust_root'] = $base_url . '/'; } // Always request Simple Registration. The specification doesn't mandate @@ -921,7 +921,7 @@ function openid_verify_assertion_return_url($service, $response) { $return_to_parts = parse_url($response['openid.return_to']); $base_url_parts = parse_url($base_url); - $current_parts = parse_url($base_url_parts['scheme'] .'://'. $base_url_parts['host'] . request_uri()); + $current_parts = parse_url($base_url_parts['scheme'] . '://' . $base_url_parts['host'] . request_uri()); if ($return_to_parts['scheme'] != $current_parts['scheme'] || $return_to_parts['host'] != $current_parts['host'] || $return_to_parts['path'] != $current_parts['path']) { return FALSE; diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test index 9f786ab..ff49f89 100644 --- a/modules/rdf/rdf.test +++ b/modules/rdf/rdf.test @@ -629,35 +629,35 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { // success of the following tests, but making it explicit will make // debugging easier in case of failure. $tracker_about = $this->xpath('//tr[@about=:url]', array(':url' => $url)); - $this->assertTrue(!empty($tracker_about), t('About attribute found on table row for @user content.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_about), t('About attribute found on table row for @user content.', array('@user' => $user))); // Tests whether the title has the correct property attribute. $tracker_title = $this->xpath('//tr[@about=:url]/td[@property="dc:title" and @datatype=""]', array(':url' => $url)); - $this->assertTrue(!empty($tracker_title), t('Title property attribute found on @user content.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_title), t('Title property attribute found on @user content.', array('@user' => $user))); // Tests whether the relationship between the content and user has been set. $tracker_user = $this->xpath('//tr[@about=:url]//td[contains(@rel, "sioc:has_creator")]//*[contains(@typeof, "sioc:UserAccount") and contains(@property, "foaf:name")]', array(':url' => $url)); - $this->assertTrue(!empty($tracker_user), t('Typeof and name property attributes found on @user.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_user), t('Typeof and name property attributes found on @user.', array('@user' => $user))); // There should be an about attribute on logged in users and no about // attribute for anonymous users. $tracker_user = $this->xpath('//tr[@about=:url]//td[@rel="sioc:has_creator"]/*[@about]', array(':url' => $url)); if ($node->uid == 0) { - $this->assertTrue(empty($tracker_user), t('No about attribute is present on @user.', array('@user'=> $user))); + $this->assertTrue(empty($tracker_user), t('No about attribute is present on @user.', array('@user' => $user))); } elseif ($node->uid > 0) { - $this->assertTrue(!empty($tracker_user), t('About attribute is present on @user.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_user), t('About attribute is present on @user.', array('@user' => $user))); } // Tests whether the property has been set for number of comments. $tracker_replies = $this->xpath('//tr[@about=:url]//td[contains(@property, "sioc:num_replies") and contains(@content, "0") and @datatype="xsd:integer"]', array(':url' => $url)); - $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user'=> $user))); + $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user' => $user))); // Tests that the appropriate RDFa markup to annotate the latest activity // date has been added to the tracker output before comments have been // posted, meaning the latest activity reflects changes to the node itself. $isoDate = date('c', $node->changed); $tracker_activity = $this->xpath('//tr[@about=:url]//td[contains(@property, "dc:modified") and contains(@property, "sioc:last_activity_date") and contains(@datatype, "xsd:dateTime") and @content=:date]', array(':url' => $url, ':date' => $isoDate)); - $this->assertTrue(!empty($tracker_activity), t('Latest activity date and changed properties found when there are no comments on @user content. Latest activity date content is correct.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_activity), t('Latest activity date and changed properties found when there are no comments on @user content. Latest activity date content is correct.', array('@user' => $user))); // Tests that the appropriate RDFa markup to annotate the latest activity // date has been added to the tracker output after a comment is posted. @@ -670,7 +670,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { // Tests whether the property has been set for number of comments. $tracker_replies = $this->xpath('//tr[@about=:url]//td[contains(@property, "sioc:num_replies") and contains(@content, "1") and @datatype="xsd:integer"]', array(':url' => $url)); - $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user'=> $user))); + $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user' => $user))); // Need to query database directly to obtain last_activity_date because // it cannot be accessed via node_load(). @@ -680,7 +680,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { } $isoDate = date('c', $expected_last_activity_date); $tracker_activity = $this->xpath('//tr[@about=:url]//td[@property="sioc:last_activity_date" and @datatype="xsd:dateTime" and @content=:date]', array(':url' => $url, ':date' => $isoDate)); - $this->assertTrue(!empty($tracker_activity), t('Latest activity date found when there are comments on @user content. Latest activity date content is correct.', array('@user'=> $user))); + $this->assertTrue(!empty($tracker_activity), t('Latest activity date found when there are comments on @user content. Latest activity date content is correct.', array('@user' => $user))); } } diff --git a/modules/search/search-result.tpl.php b/modules/search/search-result.tpl.php index 30b321f..d6281f8 100644 --- a/modules/search/search-result.tpl.php +++ b/modules/search/search-result.tpl.php @@ -56,7 +56,7 @@ * * To check for all available data within $info_split, use the code below. * @code - * '. check_plain(print_r($info_split, 1)) .''; ?> + * ' . check_plain(print_r($info_split, 1)) . ''; ?> * @endcode * * @see template_preprocess() diff --git a/modules/search/search.extender.inc b/modules/search/search.extender.inc index b7af4d0..fea7595 100644 --- a/modules/search/search.extender.inc +++ b/modules/search/search.extender.inc @@ -174,9 +174,9 @@ class SearchQuery extends SelectQueryExtender { protected function parseSearchExpression() { // Matchs words optionally prefixed by a dash. A word in this case is // something between two spaces, optionally quoted. - preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression , $keywords, PREG_SET_ORDER); + preg_match_all('/ (-?)("[^"]+"|[^" ]+)/i', ' ' . $this->searchExpression , $keywords, PREG_SET_ORDER); - if (count($keywords) == 0) { + if (count($keywords) == 0) { return; } diff --git a/modules/search/search.module b/modules/search/search.module index 518272a..36dedb4 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -1037,7 +1037,7 @@ function search_box_form_submit($form, &$form_state) { // Check to see if the form was submitted empty. // If it is empty, display an error message. // (This method is used instead of setting #required to TRUE for this field - // because that results in a confusing error message. It would say a plain + // because that results in a confusing error message. It would say a plain // "field is required" because the search keywords field has no title. // The error message would also complain about a missing #title field.) if ($form_state['values']['search_block_form'] == '') { diff --git a/modules/search/search.pages.inc b/modules/search/search.pages.inc index 833ea8b..1dc7b8f 100644 --- a/modules/search/search.pages.inc +++ b/modules/search/search.pages.inc @@ -51,7 +51,7 @@ function search_view($module = NULL, $keys = '') { // form submits with POST but redirects to GET. This way we can keep // the search query URL clean as a whistle. if (empty($_POST['form_id']) || $_POST['form_id'] != 'search_form') { - $conditions = NULL; + $conditions = NULL; if (isset($info['conditions_callback']) && function_exists($info['conditions_callback'])) { // Build an optional array of more search conditions. $conditions = call_user_func($info['conditions_callback'], $keys); diff --git a/modules/search/search.test b/modules/search/search.test index 4d37133..c9b6e8c 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -495,7 +495,8 @@ class SearchRankingTestCase extends DrupalWebTestCase { // Assert the results. if ($tag == 'notag') { $this->assertEqual($set[$tag_rank]['node']->nid, $nodes[$tag]->nid, 'Search tag ranking for plain text order.'); - } else { + } + else { $this->assertEqual($set[$tag_rank]['node']->nid, $nodes[$tag]->nid, 'Search tag ranking for "<' . $sorted_tags[$tag_rank] . '>" order.'); } } diff --git a/modules/shortcut/shortcut.test b/modules/shortcut/shortcut.test index e37e1e5..f99ea37 100644 --- a/modules/shortcut/shortcut.test +++ b/modules/shortcut/shortcut.test @@ -141,7 +141,7 @@ class ShortcutLinksTestCase extends ShortcutTestCase { $this->assertResponse(200); $saved_set = shortcut_set_load($set->set_name); $paths = $this->getShortcutInformation($saved_set, 'link_path'); - $this->assertTrue(in_array(drupal_get_normal_path($test['path']), $paths), 'Shortcut created: '. $test['path']); + $this->assertTrue(in_array(drupal_get_normal_path($test['path']), $paths), 'Shortcut created: ' . $test['path']); $this->assertLink($title, 0, 'Shortcut link found on the page.'); } } diff --git a/modules/simpletest/simpletest.test b/modules/simpletest/simpletest.test index f516364..cced54c 100644 --- a/modules/simpletest/simpletest.test +++ b/modules/simpletest/simpletest.test @@ -88,8 +88,8 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase { if (!$this->inCURL()) { global $base_url; $simpletest_path = $base_url . '/' . drupal_get_path('module', 'simpletest'); - $HTTP_path = $simpletest_path .'/tests/http.php?q=node'; - $https_path = $simpletest_path .'/tests/https.php?q=node'; + $HTTP_path = $simpletest_path . '/tests/http.php?q=node'; + $https_path = $simpletest_path . '/tests/https.php?q=node'; // Generate a valid simpletest User-Agent to pass validation. $this->assertTrue(preg_match('/simpletest\d+/', $this->databasePrefix, $matches), t('Database prefix contains simpletest prefix.')); $test_ua = drupal_generate_test_ua($matches[0]); @@ -404,7 +404,7 @@ class SimpleTestMailCaptureTestCase extends DrupalWebTestCase { $body = $this->randomString(128); $message = array( 'id' => 'drupal_mail_test', - 'headers' => array('Content-type'=> 'text/html'), + 'headers' => array('Content-type' => 'text/html'), 'subject' => $subject, 'to' => 'foobar@example.com', 'body' => $body, @@ -431,7 +431,7 @@ class SimpleTestMailCaptureTestCase extends DrupalWebTestCase { for ($index = 0; $index < 5; $index++) { $message = array( 'id' => 'drupal_mail_test_' . $index, - 'headers' => array('Content-type'=> 'text/html'), + 'headers' => array('Content-type' => 'text/html'), 'subject' => $this->randomString(64), 'to' => $this->randomName(32) . '@example.com', 'body' => $this->randomString(512), @@ -466,7 +466,7 @@ class SimpleTestFolderTestCase extends DrupalWebTestCase { public static function getInfo() { return array( 'name' => 'Testing SimpleTest setUp', - 'description' => "This test will check SimpleTest's treatment of hook_install during setUp. Image module is used for test.", + 'description' => "This test will check SimpleTest's treatment of hook_install during setUp. Image module is used for test.", 'group' => 'SimpleTest', ); } diff --git a/modules/simpletest/tests/batch.test b/modules/simpletest/tests/batch.test index d1c0e0b..351ddd7 100644 --- a/modules/simpletest/tests/batch.test +++ b/modules/simpletest/tests/batch.test @@ -161,7 +161,7 @@ class BatchProcessingTestCase extends DrupalWebTestCase { * TRUE on pass, FALSE on fail. */ function assertBatchMessages($texts, $message) { - $pattern = '|' . implode('.*', $texts) .'|s'; + $pattern = '|' . implode('.*', $texts) . '|s'; return $this->assertPattern($pattern, $message); } diff --git a/modules/simpletest/tests/batch_test.callbacks.inc b/modules/simpletest/tests/batch_test.callbacks.inc index 75e6655..ea3fa69 100644 --- a/modules/simpletest/tests/batch_test.callbacks.inc +++ b/modules/simpletest/tests/batch_test.callbacks.inc @@ -82,7 +82,7 @@ function _batch_test_finished_helper($batch_id, $success, $results, $operations) $messages = array("results for batch $batch_id"); if ($results) { foreach ($results as $op => $op_results) { - $messages[] = 'op '. $op . ': processed ' . count($op_results) . ' elements'; + $messages[] = 'op ' . $op . ': processed ' . count($op_results) . ' elements'; } } else { diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 4664f04..5df86b0 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -1701,8 +1701,8 @@ class DrupalRenderTestCase extends DrupalWebTestCase { protected function assertRenderedElement(array $element, $xpath, array $xpath_args = array()) { $original_element = $element; $this->drupalSetContent(drupal_render($element)); - $this->verbose('
' .  check_plain(var_export($original_element, TRUE)) . '
' - . '
' .  check_plain(var_export($element, TRUE)) . '
' + $this->verbose('
' . check_plain(var_export($original_element, TRUE)) . '
' + . '
' . check_plain(var_export($element, TRUE)) . '
' . '
' . $this->drupalGetContent() ); diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test index 2a086ce..ee8ecd1 100644 --- a/modules/simpletest/tests/database_test.test +++ b/modules/simpletest/tests/database_test.test @@ -573,7 +573,7 @@ class DatabaseInsertTestCase extends DatabaseTestCase { // re-ordered. $query->addExpression('tp.age', 'age'); $query - ->fields('tp', array('name','job')) + ->fields('tp', array('name', 'job')) ->condition('tp.name', 'Meredith'); // The resulting query should be equivalent to$edit, t('E-mail new password')); $mails = $this->drupalGetMails(); - $start = strpos($mails[0]['body'], 'user/reset/'. $this->user->uid); + $start = strpos($mails[0]['body'], 'user/reset/' . $this->user->uid); $path = substr($mails[0]['body'], $start, 66 + strlen($this->user->uid)); // Log in with temporary login link. diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc index 13b2ce8..7d1e97a 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -542,7 +542,7 @@ function theme_taxonomy_overview_terms($variables) { $term = &$form[$key]; $row = array(); - $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', array('size' => $term['#term']['depth'])) : ''). drupal_render($term['view']); + $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', array('size' => $term['#term']['depth'])) : '') . drupal_render($term['view']); if ($form['#parent_fields']) { $term['tid']['#attributes']['class'] = array('term-id'); $term['parent']['#attributes']['class'] = array('term-parent'); diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install index 10009d6..4adee9e 100644 --- a/modules/taxonomy/taxonomy.install +++ b/modules/taxonomy/taxonomy.install @@ -196,7 +196,7 @@ function taxonomy_schema() { 'description' => 'The Unix timestamp when the node was created.', 'type' => 'int', 'not null' => TRUE, - 'default'=> 0, + 'default' => 0, ), ), 'indexes' => array( diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index d14a169..a6a3b2e 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -25,7 +25,7 @@ function taxonomy_help($path, $arg) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating vocabularies') . '
'; - $output .= '
' . t('Users with sufficient permissions can create vocabularies and terms through the Taxonomy page. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A controlled vocabulary classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => url('admin/structure/taxonomy'), '@perm' => url('admin/people/permissions', array('fragment'=>'module-taxonomy')))); + $output .= '
' . t('Users with sufficient permissions can create vocabularies and terms through the Taxonomy page. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A controlled vocabulary classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => url('admin/structure/taxonomy'), '@perm' => url('admin/people/permissions', array('fragment' => 'module-taxonomy')))); $output .= '
  • ' . t('vocabulary: Music') . '
  • '; $output .= '
    • ' . t('term: Jazz') . '
    • '; $output .= '
      • ' . t('sub-term: Swing') . '
      • '; @@ -1443,7 +1443,7 @@ function taxonomy_field_formatter_prepare_view($entity_type, $entities, $field, $items[$id][$delta]['taxonomy_term'] = $terms[$item['tid']]; } // Terms to be created are not in $terms, but are still legitimate. - else if ($item['tid'] == 'autocreate') { + elseif ($item['tid'] == 'autocreate') { // Leave the item in place. } // Otherwise, unset the instance value, since the term does not exist. diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index a6ac332..d915b29 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -513,7 +513,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { $langcode = LANGUAGE_NONE; $edit["title"] = $this->randomName(); $edit["body[$langcode][0][value]"] = $this->randomName(); - $edit[$this->instance['field_name'] . '[' . $langcode .'][]'] = $term1->tid; + $edit[$this->instance['field_name'] . '[' . $langcode . '][]'] = $term1->tid; $this->drupalPost('node/add/article', $edit, t('Save')); // Check that the term is displayed when the node is viewed. @@ -723,7 +723,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { $this->assertEqual($terms[0]->tid, $term1->tid, t('Term 1 was moved to back above term 2.')); $this->assertEqual($terms[1]->tid, $term2->tid, t('Term 2 was moved to back below term 1.')); $this->assertEqual($terms[2]->tid, $term3->tid, t('Term 3 is still below term 2.')); - $this->assertEqual($terms[2]->parents, array($term2->tid), t('Term 3 is still a child of term 2.').var_export($terms[1]->tid,1)); + $this->assertEqual($terms[2]->parents, array($term2->tid), t('Term 3 is still a child of term 2.') . var_export($terms[1]->tid,1)); } /** diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css index cbf3c14..f8c7357 100644 --- a/modules/toolbar/toolbar.css +++ b/modules/toolbar/toolbar.css @@ -97,14 +97,14 @@ body.toolbar-drawer { } #toolbar div.toolbar-menu a.toggle:focus, #toolbar div.toolbar-menu a.toggle:hover { - background-position: -50px -20px; + background-position: -50px -20px; } #toolbar div.toolbar-menu a.toggle-active { - background-position: -25px -20px; + background-position: -25px -20px; } #toolbar div.toolbar-menu a.toggle-active.toggle:focus, #toolbar div.toolbar-menu a.toggle-active.toggle:hover { - background-position: -75px -20px; + background-position: -75px -20px; } #toolbar div.toolbar-menu ul li a { padding: 0 10px; diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module index 61ae648..7063335 100644 --- a/modules/toolbar/toolbar.module +++ b/modules/toolbar/toolbar.module @@ -183,7 +183,7 @@ function toolbar_view() { $module_path = drupal_get_path('module', 'toolbar'); $build = array( '#theme' => 'toolbar', - '#attached'=> array( + '#attached' => array( 'js' => array( $module_path . '/toolbar.js', array( @@ -263,7 +263,7 @@ function toolbar_view() { 'toolbar-drawer', 'clearfix', ); - if(_toolbar_is_collapsed()) { + if (_toolbar_is_collapsed()) { $toolbar_drawer_classes[] = 'collapsed'; } $build['toolbar_drawer_classes'] = implode(' ', $toolbar_drawer_classes); diff --git a/modules/tracker/tracker.pages.inc b/modules/tracker/tracker.pages.inc index 7b1e946..89123dc 100644 --- a/modules/tracker/tracker.pages.inc +++ b/modules/tracker/tracker.pages.inc @@ -54,7 +54,7 @@ function tracker_page($account = NULL, $set_title = FALSE) { if ($new = comment_num_new($node->nid)) { $comments .= '
        '; - $comments .= l(format_plural($new, '1 new', '@count new'), 'node/'. $node->nid, array('fragment' => 'new')); + $comments .= l(format_plural($new, '1 new', '@count new'), 'node/' . $node->nid, array('fragment' => 'new')); } } @@ -86,7 +86,7 @@ function tracker_page($account = NULL, $set_title = FALSE) { $row['replies'] += rdf_rdfa_attributes($mapping['comment_count']); $row['replies'] += array('content' => $node->comment_count); // If the node has no comments, we assume the node itself was modified - // and apply 'changed' in addition to 'last_activity'. If there are + // and apply 'changed' in addition to 'last_activity'. If there are // comments present, we cannot infer whether the node itself was // modified or a comment was posted, so we use only 'last_activity'. $mapping_last_activity = rdf_rdfa_attributes($mapping['last_activity'], $node->last_activity); diff --git a/modules/tracker/tracker.test b/modules/tracker/tracke: diff --git a/modules/simpletest/tests/entity_query.test b/modules/simpletest/tests/entity_query.test index d28d5a3..1dc782a 100644 --- a/modules/simpletest/tests/entity_query.test +++ b/modules/simpletest/tests/entity_query.test @@ -1365,7 +1365,7 @@ class EntityFieldQueryTestCase extends DrupalWebTestCase { $this->assertEqual($results, $intended_results, $message); } catch (Exception $e) { - $this->fail('Exception thrown: '. $e->getMessage()); + $this->fail('Exception thrown: ' . $e->getMessage()); } } } diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test index dc12b1b..4a5bf31 100644 --- a/modules/simpletest/tests/file.test +++ b/modules/simpletest/tests/file.test @@ -2337,7 +2337,7 @@ class FileURLRewritingTest extends FileTestCase { /** * Test the generating of rewritten shipped file URLs. */ - function testShippedFileURL() { + function testShippedFileURL() { // Test generating an URL to a shipped file (i.e. a file that is part of // Drupal core, a module or a theme, for example a JavaScript file). diff --git a/modules/simpletest/tests/filetransfer.test b/modules/simpletest/tests/filetransfer.test index 905d23c..39f91b3 100644 --- a/modules/simpletest/tests/filetransfer.test +++ b/modules/simpletest/tests/filetransfer.test @@ -79,7 +79,7 @@ class FileTranferTest extends DrupalWebTestCase { $gotit = TRUE; try { - $this->testConnection->copyDirectory($source, DRUPAL_ROOT . '/'. variable_get('file_public_path', conf_path() . '/files')); + $this->testConnection->copyDirectory($source, DRUPAL_ROOT . '/' . variable_get('file_public_path', conf_path() . '/files')); } catch (FileTransferException $e) { $gotit = FALSE; diff --git a/modules/simpletest/tests/schema.test b/modules/simpletest/tests/schema.test index 8945117..20724c5 100644 --- a/modules/simpletest/tests/schema.test +++ b/modules/simpletest/tests/schema.test @@ -182,7 +182,7 @@ class SchemaTestCase extends DrupalWebTestCase { // Now set up columns for the other types. $types = array('int', 'float', 'numeric'); foreach ($types as $type) { - $column_spec = array('type' => $type, 'unsigned'=> TRUE); + $column_spec = array('type' => $type, 'unsigned' => TRUE); if ($type == 'numeric') { $column_spec += array('precision' => 10, 'scale' => 0); } diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index d0ad77d..46da96a 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -115,7 +115,7 @@ class ThemeTableUnitTest extends DrupalWebTestCase { */ function testThemeTableStickyHeaders() { $header = array('one', 'two', 'three'); - $rows = array(array(1,2,3), array(4,5,6), array(7,8,9)); + $rows = array(array(1, 2, 3), array(4, 5, 6), array(7, 8, 9)); $this->content = theme('table', array('header' => $header, 'rows' => $rows)); $js = drupal_add_js(); $this->assertTrue(isset($js['misc/tableheader.js']), t('tableheader.js was included when $sticky = TRUE.')); diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 92c534e..7cfb037 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1123,7 +1123,7 @@ function system_modules_submit($form, &$form_state) { return; } - // Invokes hook_requirements('install'). If failures are detected, makes sure + // Invokes hook_requirements('install'). If failures are detected, makes sure // the dependent modules aren't installed either. foreach ($modules as $name => $module) { // Only invoke hook_requirements() on modules that are going to be installed. @@ -1478,7 +1478,7 @@ function system_site_information_settings() { '#title' => t('Default front page'), '#default_value' => (variable_get('site_frontpage')!='node'?drupal_get_path_alias(variable_get('site_frontpage', 'node')):''), '#size' => 40, - '#description' => t('Optionally, specify a relative URL to display as the front page. Leave blank to display the default content feed.'), + '#description' => t('Optionally, specify a relative URL to display as the front page. Leave blank to display the default content feed.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='), ); $form['error_page'] = array( @@ -1553,7 +1553,7 @@ function system_site_information_settings_validate($form, &$form_state) { */ function system_cron_settings() { $form['description'] = array( - '#markup' => '

        '.t('Cron takes care of running periodical tasks like checking for updates and indexing content for search.').'

        ', + '#markup' => '

        ' . t('Cron takes care of running periodical tasks like checking for updates and indexing content for search.') . '

        ', ); $form['run'] = array( '#type' => 'submit', @@ -1904,7 +1904,7 @@ function system_regional_settings() { '#default_value' => $configurable_timezones, ); - $form['timezone']['configurable_timezones_wrapper'] = array( + $form['timezone']['configurable_timezones_wrapper'] = array( '#type' => 'container', '#states' => array( // Hide the user configured timezone settings when users are forced to use @@ -2634,7 +2634,7 @@ function theme_system_themes_page($variables) { continue; } // Start new theme group. - $output .= '

        '. $title .'

        '; + $output .= '

        ' . $title . '

        '; foreach ($theme_groups[$state] as $theme) { @@ -2648,7 +2648,7 @@ function theme_system_themes_page($variables) { $notes = count($theme->notes) ? ' (' . join(', ', $theme->notes) . ')' : ''; $theme->classes[] = 'theme-selector'; $theme->classes[] = 'clearfix'; - $output .= '
        ' . $screenshot . '

        ' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '

        ' . $description . '
        '; + $output .= '
        ' . $screenshot . '

        ' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '

        ' . $description . '
        '; // Make sure to provide feedback on compatibility. if (!empty($theme->incompatible_core)) { diff --git a/modules/system/system.api.php b/modules/system/system.api.php index d5beb19..64a8ab7 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -2701,7 +2701,7 @@ function hook_file_download($uri) { /** * Alter the URL to a file. * - * This hook is called from file_create_url(), and is called fairly + * This hook is called from file_create_url(), and is called fairly * frequently (10+ times per page), depending on how many files there are in a * given page. * If CSS and JS aggregation are disabled, this can become very frequently diff --git a/modules/system/system.install b/modules/system/system.install index 11967e4..ecad8de 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -58,7 +58,7 @@ function system_requirements($phase) { if (function_exists('phpinfo')) { $requirements['php'] = array( 'title' => $t('PHP'), - 'value' => ($phase == 'runtime') ? $phpversion .' ('. l($t('more information'), 'admin/reports/status/php') .')' : $phpversion, + 'value' => ($phase == 'runtime') ? $phpversion . ' (' . l($t('more information'), 'admin/reports/status/php') . ')' : $phpversion, ); } else { diff --git a/modules/system/system.test b/modules/system/system.test index ae69d1f..afccb48 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -917,7 +917,7 @@ class SiteMaintenanceTestCase extends DrupalWebTestCase { ); $this->drupalPost('user/password', r.test index 3cc227e..506de03 100644 --- a/modules/tracker/tracker.test +++ b/modules/tracker/tracker.test @@ -36,7 +36,7 @@ class TrackerTest extends DrupalWebTestCase { $this->drupalLogin($this->user); $unpublished = $this->drupalCreateNode(array( - 'title' =>$this->randomName(8), + 'title' => $this->randomName(8), 'status' => 0, )); $published = $this->drupalCreateNode(array( diff --git a/modules/translation/translation.test b/modules/translation/translation.test index f578750..ce470c5 100644 --- a/modules/translation/translation.test +++ b/modules/translation/translation.test @@ -64,7 +64,7 @@ class TranslationTestCase extends DrupalWebTestCase { function testContentTranslation() { // Create Basic page in English. $node_title = $this->randomName(); - $node_body = $this->randomName(); + $node_body = $this->randomName(); $node = $this->createPage($node_title, $node_body, 'en'); // Check that the "add translation" link uses a localized path. diff --git a/modules/update/update.manager.inc b/modules/update/update.manager.inc index b0def17..6472086 100644 --- a/modules/update/update.manager.inc +++ b/modules/update/update.manager.inc @@ -120,7 +120,7 @@ function update_manager_update_form($form, $form_state = array(), $context) { $recommended_release = $project['releases'][$project['recommended']]; $recommended_version = $recommended_release['version'] . ' ' . l(t('(Release notes)'), $recommended_release['release_link'], array('attributes' => array('title' => t('Release notes for @project_title', array('@project_title' => $project['title']))))); if ($recommended_release['version_major'] != $project['existing_major']) { - $recommended_version .= '
        ' . t('This update is a major version update which means that it may not be backwards compatible with your currently running version. It is recommended that you read the release notes and proceed at your own risk.') . '
        '; + $recommended_version .= '
        ' . t('This update is a major version update which means that it may not be backwards compatible with your currently running version. It is recommended that you read the release notes and proceed at your own risk.') . '
        '; } // Create an entry for this project. @@ -766,7 +766,7 @@ function _update_manager_extract_directory() { function update_manager_archive_extract($file, $directory) { $archiver = archiver_get_archiver($file); if (!$archiver) { - throw new Exception(t('Cannot extract %file, not a valid archive.', array ('%file' => $file))); + throw new Exception(t('Cannot extract %file, not a valid archive.', array('%file' => $file))); } // Remove the directory if it exists, otherwise it might contain a mixture of diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index 0596bde..96bf2fd 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -349,7 +349,7 @@ function user_admin_settings() { ); // If picture support is enabled, check whether the picture directory exists. if (variable_get('user_pictures', 0)) { - $picture_path = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); + $picture_path = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); if (!file_prepare_directory($picture_path, FILE_CREATE_DIRECTORY)) { form_set_error('user_picture_path', t('The directory %directory does not exist or is not writable.', array('%directory' => $picture_path))); watchdog('file system', 'The directory %directory does not exist or is not writable.', array('%directory' => $picture_path), WATCHDOG_ERROR); diff --git a/modules/user/user.api.php b/modules/user/user.api.php index 272731a..4b50601 100644 --- a/modules/user/user.api.php +++ b/modules/user/user.api.php @@ -328,7 +328,7 @@ function hook_user_logout($account) { */ function hook_user_view($account, $view_mode, $langcode) { if (user_access('create blog content', $account)) { - $account->content['summary']['blog'] = array( + $account->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), '#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => format_username($account)))))), diff --git a/modules/user/user.module b/modules/user/user.module index 358b4ce..abdf9a3 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -464,7 +464,7 @@ function user_save($account, $edit = array(), $category = 'account') { // make it permanent. if (!$picture->status) { $info = image_get_info($picture->uri); - $picture_directory = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); + $picture_directory = file_default_scheme() . '://' . variable_get('user_picture_path', 'pictures'); // Prepare the pictures directory. file_prepare_directory($picture_directory, FILE_CREATE_DIRECTORY); diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index 697a82d..6961c66 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -103,7 +103,8 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a if (!empty($reset_link_account)) { drupal_set_message(t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. Please logout and try using the link again.', array('%other_user' => $user->name, '%resetting_user' => $reset_link_account->name, '!logout' => url('user/logout')))); - } else { + } + else { // Invalid one-time link specifies an unknown user. drupal_set_message(t('The one-time login link you clicked is invalid.')); } @@ -317,7 +318,7 @@ function user_profile_form_submit($form, &$form_state) { if ($category == 'account' && !empty($edit['pass'])) { // Remove the password reset tag since a new password was saved. - unset($_SESSION['pass_reset_'. $account->uid]); + unset($_SESSION['pass_reset_' . $account->uid]); } // Clear the page cache because pages can contain usernames and/or profile information: cache_clear_all(); diff --git a/modules/user/user.test b/modules/user/user.test index 3c453a8..50afb1c 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -1843,7 +1843,7 @@ class UserRoleAdminTestCase extends DrupalWebTestCase { $old_weight = $role->weight; // Change the role weight and submit the form. - $edit = array('roles['. $rid .'][weight]' => $old_weight + 1); + $edit = array('roles[' . $rid . '][weight]' => $old_weight + 1); $this->drupalPost('admin/people/permissions/roles', $edit, t('Save order')); $this->assertText(t('The role settings have been updated.'), t('The role settings form submitted successfully.')); @@ -1975,7 +1975,7 @@ class UserRolesAssignmentTestCase extends DrupalWebTestCase { * Tests that a user can be assigned a role and that the role can be removed * again. */ - function testAssignAndRemoveRole() { + function testAssignAndRemoveRole() { $rid = $this->drupalCreateRole(array('administer content types')); $account = $this->drupalCreateUser(); @@ -2056,7 +2056,7 @@ class UserAuthmapAssignmentTestCase extends DrupalWebTestCase { /** * Test authmap assignment and retrieval. */ - function testAuthmapAssignment() { + function testAuthmapAssignment() { $account = $this->drupalCreateUser(); // Assign authmaps to the user. diff --git a/scripts/drupal.sh b/scripts/drupal.sh index 5d064f5..7010a9b 100755 --- a/scripts/drupal.sh +++ b/scripts/drupal.sh @@ -72,7 +72,7 @@ if (in_array('--verbose', $_SERVER['argv'])) { $_verbose_mode = true; } else { - $_verbose_mode = false; + $_verbose_mode = FALSE; } // parse invocation arguments diff --git a/scripts/dump-database-d6.sh b/scripts/dump-database-d6.sh index 23e3fca..6184549 100644 --- a/scripts/dump-database-d6.sh +++ b/scripts/dump-database-d6.sh @@ -72,7 +72,7 @@ foreach ($schema as $table => $data) { } // Prepare the export of values. - $result = db_query('SELECT * FROM {'. $table .'}'); + $result = db_query('SELECT * FROM {' . $table . '}'); $insert = ''; while ($record = db_fetch_array($result)) { // users.uid is a serial and inserting 0 into a serial can break MySQL. diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 2cfbcac..a517727 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -289,10 +289,10 @@ function simpletest_script_init($server_software) { $_SERVER['SERVER_ADDR'] = '127.0.0.1'; $_SERVER['SERVER_SOFTWARE'] = $server_software; $_SERVER['SERVER_NAME'] = 'localhost'; - $_SERVER['REQUEST_URI'] = $path .'/'; + $_SERVER['REQUEST_URI'] = $path . '/'; $_SERVER['REQUEST_METHOD'] = 'GET'; - $_SERVER['SCRIPT_NAME'] = $path .'/index.php'; - $_SERVER['PHP_SELF'] = $path .'/index.php'; + $_SERVER['SCRIPT_NAME'] = $path . '/index.php'; + $_SERVER['PHP_SELF'] = $path . '/index.php'; $_SERVER['HTTP_USER_AGENT'] = 'Drupal command line'; if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 0472f02..f053e0b 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -73,9 +73,9 @@ * webserver. For most other drivers, you must specify a * username, password, host, and database name. * - * Some database engines support transactions. In order to enable + * Some database engines support transactions. In order to enable * transaction support for a given database, set the 'transactions' key - * to TRUE. To disable it, set it to FALSE. Note that the default value + * to TRUE. To disable it, set it to FALSE. Note that the default value * varies by driver. For MySQL, the default is FALSE since MyISAM tables * do not support transactions. * @@ -196,8 +196,8 @@ $update_free_access = FALSE; * Salt for one-time login links and cancel links, form tokens, etc. * * This variable will be set to a random value by the installer. All one-time - * login links will be invalidated if the value is changed. Note that this - * variable must have the same value on every web server. If this variable is + * login links will be invalidated if the value is changed. Note that this + * variable must have the same value on every web server. If this variable is * empty, a hash of the serialized database credentials will be used as a * fallback salt. * @@ -271,9 +271,9 @@ ini_set('session.cookie_lifetime', 2000000); /** * If you encounter a situation where users post a large amount of text, and * the result is stripped out upon viewing but can still be edited, Drupal's - * output filter may not have sufficient memory to process it. If you + * output filter may not have sufficient memory to process it. If you * experience this issue, you may wish to uncomment the following two lines - * and increase the limits of these variables. For more information, see + * and increase the limits of these variables. For more information, see * http://php.net/manual/en/pcre.configuration.php. */ # ini_set('pcre.backtrack_limit', 200000); diff --git a/themes/bartik/css/layout.css b/themes/bartik/css/layout.css index b561f4c..a72cf41 100644 --- a/themes/bartik/css/layout.css +++ b/themes/bartik/css/layout.css @@ -3,7 +3,7 @@ html, body, -#page { +#page { height: 100%; } #page-wrapper { diff --git a/themes/bartik/css/maintenance-page.css b/themes/bartik/css/maintenance-page.css index c13c77b..2fdec33 100644 --- a/themes/bartik/css/maintenance-page.css +++ b/themes/bartik/css/maintenance-page.css @@ -50,7 +50,7 @@ body.maintenance-page { .maintenance-page #name-and-slogan a:hover { color: #777; } -.maintenance-page h1#page-title { +.maintenance-page h1#page-title { line-height: 1em; margin-top: 0; }