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..fb6a420 100644 --- a/includes/archiver.inc +++ b/includes/archiver.inc @@ -14,8 +14,8 @@ interface ArchiverInterface { * Constructor for a new archiver instance. * * @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 + * 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 * 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 fe1741d..345e7b6 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -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/common.inc b/includes/common.inc index 0a3ed73..8805cec 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3586,12 +3586,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); } /** @@ -4125,7 +4125,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..282ec26 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -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. diff --git a/includes/database/select.inc b/includes/database/select.inc index 6e4b0dc..f7c26da 100644 --- a/includes/database/select.inc +++ b/includes/database/select.inc @@ -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 33c768c..21dd30b 100644 --- a/includes/entity.inc +++ b/includes/entity.inc @@ -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..27bd941 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. 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..a85831d 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); } @@ -122,7 +122,7 @@ class FileTransferFTPExtension extends FileTransferFTP implements FileTransferCh function chmodJailed($path, $mode, $recursive) { if (!ftp_chmod($this->connection, $mode, $path)) { - throw new FileTransferException("Unable to set permissions on %file", NULL, array ('%file' => $path)); + throw new FileTransferException("Unable to set permissions on %file", NULL, array('%file' => $path)); } if ($this->isDirectory($path) && $recursive) { $filelist = @ftp_nlist($this->connection, $path); diff --git a/includes/filetransfer/ssh.inc b/includes/filetransfer/ssh.inc index 43ec324..dd7243e 100644 --- a/includes/filetransfer/ssh.inc +++ b/includes/filetransfer/ssh.inc @@ -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..2a74001 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'], 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/menu.inc b/includes/menu.inc index f424122..66315e4 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). @@ -3427,7 +3427,7 @@ function _menu_router_build($callbacks) { $parts[$k] = '%'; } else { - $fit |= 1 << ($slashes - $k); + $fit |= 1 << ($slashes - $k); } } if ($fit) { diff --git a/includes/password.inc b/includes/password.inc index 93d34f8..9e1be9e 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 1eb7a1d..6c221a1 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -478,7 +478,7 @@ function update_fix_d7_requirements() { db_add_index('system', 'bootstrap', array( 'status', 'bootstrap', array('type', 12), 'weight', 'name')); - db_drop_index('system' ,'modules'); + db_drop_index('system', 'modules'); db_add_index('system', 'modules', array(array( 'type', 12), 'status', 'weight', 'name')); @@ -1397,7 +1397,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/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/comment/comment.module b/modules/comment/comment.module index 9ab70c5..4fad817 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/field/modules/options/options.module b/modules/field/modules/options/options.module index 385f3f4..8f50903 100644 --- a/modules/field/modules/options/options.module +++ b/modules/field/modules/options/options.module @@ -200,7 +200,7 @@ function _options_properties($type, $multiple, $required, $has_value) { if (!$required) { $properties['empty_option'] = 'option_none'; } - else if (!$has_value) { + elseif (!$has_value) { $properties['empty_option'] = 'option_select'; } } 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.test b/modules/field_ui/field_ui.test index 2429a19..efcdd93 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,7 +140,7 @@ 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_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); diff --git a/modules/filter/filter.install b/modules/filter/filter.install index 84512cd..9bcfcb6 100644 --- a/modules/filter/filter.install +++ b/modules/filter/filter.install @@ -223,7 +223,7 @@ function filter_update_7003() { // contributed module filters. db_rename_table('filters', 'd6_upgrade_filter'); // Creates the Drupal 7 filter table. - $filter_table = array( + $filter_table = array( 'description' => 'Table that maps filters (HTML corrector) to text formats (Filtered HTML).', 'fields' => array( 'format' => array( 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 fe30995..e88ebb4 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', @@ -283,7 +283,7 @@ function forum_update_7001() { '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/forum/forum.test b/modules/forum/forum.test index 1dc45c6..f13289a 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -155,7 +155,7 @@ class ForumTestCase extends DrupalWebTestCase { // Create an orphan forum item. $this->drupalLogin($this->admin_user); - $this->drupalPost('node/add/forum', array('title' => $this->randomName(10), 'body[' . LANGUAGE_NONE .'][0][value]' => $this->randomName(120)), t('Save')); + $this->drupalPost('node/add/forum', array('title' => $this->randomName(10), 'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomName(120)), t('Save')); $nid_count = db_query('SELECT COUNT(nid) FROM {node}')->fetchField(); $this->assertEqual(0, $nid_count, t('A forum node was not created when missing a forum vocabulary.')); diff --git a/modules/image/image.module b/modules/image/image.module index d2d081c..0f44665 100644 --- a/modules/image/image.module +++ b/modules/image/image.module @@ -45,10 +45,10 @@ 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.') . '
'; + $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.') . '
'; $output .= '
' . t('Attaching images to content as fields') . '
'; $output .= '
' . t("Image module also allows you to attach images to content as fields. To add an image field to a content type, go to the content type's manage fields page, and add a new field of type Image. Attaching images to content this way allows image styles to be applied and maintained, and also allows you more flexibility when theming.", array('@content-type' => url('admin/structure/types'))) . '
'; $output .= '
'; diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 765bfb6..6c7cb68 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. @@ -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..153b33f 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'); 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 c052f4b..b4717ae 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/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.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/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: 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/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..5a12e25 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.')); @@ -128,7 +128,7 @@ class ThemeTableUnitTest extends DrupalWebTestCase { */ function testThemeTableNoStickyHeaders() { $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)); $attributes = array(); $caption = NULL; $colgroups = array(); diff --git a/modules/simpletest/tests/upgrade/upgrade.node.test b/modules/simpletest/tests/upgrade/upgrade.node.test index 163dbef..d14a40a 100644 --- a/modules/simpletest/tests/upgrade/upgrade.node.test +++ b/modules/simpletest/tests/upgrade/upgrade.node.test @@ -99,7 +99,7 @@ class PollUpgradePathTestCase extends UpgradePathTestCase { $this->assertText("Choice $c for poll $i", t('Choice text is displayed correctly on result view')); } - $nbvotes = floor (($i % 4) + 5); + $nbvotes = floor(($i % 4) + 5); $elements = $this->xpath("//div[@class='percent']"); for ($c = 0; $c < $nbchoices; $c++) { $votes = floor($nbvotes / $nbchoices); diff --git a/modules/simpletest/tests/upgrade/upgrade.poll.test b/modules/simpletest/tests/upgrade/upgrade.poll.test index 9bbbf90..cb23a19 100644 --- a/modules/simpletest/tests/upgrade/upgrade.poll.test +++ b/modules/simpletest/tests/upgrade/upgrade.poll.test @@ -54,7 +54,7 @@ class PollUpgradePathTestCase extends UpgradePathTestCase { $this->assertText("Choice $c for poll $i", t('Choice text is displayed correctly on result view')); } - $nbvotes = floor (($i % 4) + 5); + $nbvotes = floor(($i % 4) + 5); $elements = $this->xpath("//div[@class='percent']"); for ($c = 0; $c < $nbchoices; $c++) { $votes = floor($nbvotes / $nbchoices); diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 0fe88ea..536dfc3 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -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.install b/modules/system/system.install index af02edc..c7885b1 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 { @@ -2037,7 +2037,7 @@ function system_update_7016() { $result = db_query("SELECT c.relname AS table, a.attname AS field, pg_catalog.format_type(a.atttypid, a.atttypmod) AS type FROM pg_catalog.pg_attribute a - LEFT JOIN pg_class c ON (c.oid = a.attrelid) + LEFT JOIN pg_class c ON (c.oid = a.attrelid) WHERE pg_catalog.pg_table_is_visible(c.oid) AND c.relkind = 'r' AND pg_catalog.format_type(a.atttypid, a.atttypmod) LIKE '%unsigned%'"); foreach ($result as $row) { @@ -2759,7 +2759,7 @@ function system_update_7061(&$sandbox) { db_create_table('system_update_7061', $table); $query = db_select('upload', 'u'); $query->distinct(); - $query->addField('u','vid'); + $query->addField('u', 'vid'); db_insert('system_update_7061') ->from($query) ->execute(); diff --git a/modules/system/system.module b/modules/system/system.module index 6537671..693543e 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -89,7 +89,7 @@ function system_help($path, $arg) { case 'admin/index': return '

' . t('This page shows you all available administration tasks for each module.') . '

'; case 'admin/appearance': - $output = '

' . t('Set and configure the default theme for your website. Alternative themes are available.', array('@themes' => 'http://drupal.org/project/themes')) . '

'; + $output = '

' . t('Set and configure the default theme for your website. Alternative themes are available.', array('@themes' => 'http://drupal.org/project/themes')) . '

'; return $output; case 'admin/appearance/settings/' . $arg[3]: $theme_list = list_themes(); diff --git a/modules/system/system.test b/modules/system/system.test index fb6a6e8..9d25622 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -917,7 +917,7 @@ class SiteMaintenanceTestCase extends DrupalWebTestCase { ); $this->drupalPost('user/password', $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 8498681..cdc297f 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 f28ffed..137af89 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( @@ -368,7 +368,7 @@ function taxonomy_update_7004() { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default'=> 0, + 'default' => 0, ), ), 'indexes' => array( @@ -594,7 +594,7 @@ function taxonomy_update_7005(&$sandbox) { // If no node types are associated with a vocabulary, the LEFT JOIN will // return a NULL value for type. if (isset($record->type)) { - $vocabularies[$record->vid][$record->type] = 'taxonomy_'. $record->machine_name; + $vocabularies[$record->vid][$record->type] = 'taxonomy_' . $record->machine_name; } } @@ -815,7 +815,7 @@ function taxonomy_update_7010() { 'type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, - 'default'=> 0, + 'default' => 0, )); } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index f170430..f286369 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..baee4ff 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.module b/modules/toolbar/toolbar.module index 397639e..067dadb 100644 --- a/modules/toolbar/toolbar.module +++ b/modules/toolbar/toolbar.module @@ -95,7 +95,7 @@ function theme_toolbar_toggle($variables) { $toggle_text = t('Hide shortcuts'); $variables['attributes']['class'][] = 'toggle-active'; } - return '' . $toggle_text . ''; + return '' . $toggle_text . ''; } /** @@ -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..80f4416 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')); } } diff --git a/modules/tracker/tracker.test b/modules/tracker/tracker.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/update/update.test b/modules/update/update.test index 6f9ef08..890cf75 100644 --- a/modules/update/update.test +++ b/modules/update/update.test @@ -604,7 +604,7 @@ class UpdateTestUploadCase extends UpdateTestHelper { ); // This also checks that the correct archive extensions are allowed. $this->drupalPost('admin/modules/install', $edit, t('Install')); - $this->assertText(t('Only files with the following extensions are allowed: @archive_extensions.', array('@archive_extensions' => archiver_get_extensions())),'Only valid archives can be uploaded.'); + $this->assertText(t('Only files with the following extensions are allowed: @archive_extensions.', array('@archive_extensions' => archiver_get_extensions())), 'Only valid archives can be uploaded.'); // Check to ensure an existing module can't be reinstalled. Also checks that // the archive was extracted since we can't know if the module is already 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 7f22f7c..468353e 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..45767ae 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.'));