diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/contact/contact.module | 4 | ||||
-rw-r--r-- | modules/system/system.install | 2 | ||||
-rw-r--r-- | modules/system/system.module | 2 | ||||
-rw-r--r-- | modules/upload/upload.module | 8 | ||||
-rw-r--r-- | modules/user/user.module | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 2205cd34f..132e69e14 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -210,7 +210,7 @@ function contact_admin_edit_validate($form_id, $form_values) { } else { $recipients = explode(',', $form_values['recipients']); - foreach($recipients as $recipient) { + foreach ($recipients as $recipient) { if (!valid_email_address(trim($recipient))) { form_set_error('recipients', t('%recipient is an invalid e-mail address.', array('%recipient' => $recipient))); } @@ -227,7 +227,7 @@ function contact_admin_edit_submit($form_id, $form_values) { db_query('UPDATE {contact} SET selected = 0'); } $recipients = explode(',', $form_values['recipients']); - foreach($recipients as $key=>$recipient) { + foreach ($recipients as $key=>$recipient) { // E-mail address validation has already been done in _validate. $recipients[$key] = trim($recipient); } diff --git a/modules/system/system.install b/modules/system/system.install index c21aec25c..ce9886ed7 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2357,7 +2357,7 @@ function system_update_159() { function system_update_160() { $types = module_invoke('node', 'get_types'); if (is_array($types)) { - foreach($types as $type) { + foreach ($types as $type) { if (!is_array(variable_get("node_options_$type", array()))) { variable_set("node_options_$type", array()); } diff --git a/modules/system/system.module b/modules/system/system.module index 9f97e553c..1ca3e90ea 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1050,7 +1050,7 @@ function system_initialize_theme_blocks($theme) { $default_theme = variable_get('theme_default', 'garland'); $regions = system_region_list($theme); $result = db_query("SELECT * FROM {blocks} WHERE theme = '%s'", $default_theme); - while($block = db_fetch_array($result)) { + while ($block = db_fetch_array($result)) { // If the region isn't supported by the theme, assign the block to the theme's default region. if (!array_key_exists($block['region'], $regions)) { $block['region'] = system_default_region($theme); diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 30bd9d3c0..6f8af3cde 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -293,7 +293,7 @@ function _upload_prepare(&$node) { // i.e. the user left the edit page, because they didn't want to upload anything. if(count($_POST) == 0) { if (is_array($_SESSION['file_previews']) && count($_SESSION['file_previews'])) { - foreach($_SESSION['file_previews'] as $fid => $file) { + foreach ($_SESSION['file_previews'] as $fid => $file) { file_delete($file->filepath); } unset($_SESSION['file_previews']); @@ -329,7 +329,7 @@ function _upload_prepare(&$node) { // Attach file previews to node object. if (is_array($_SESSION['file_previews']) && count($_SESSION['file_previews'])) { - foreach($_SESSION['file_previews'] as $fid => $file) { + foreach ($_SESSION['file_previews'] as $fid => $file) { if ($user->uid != 1) { // Here something.php.pps becomes something.php_.pps $file->filename = upload_munge_filename($file->filename, NULL, 0); @@ -404,7 +404,7 @@ function _upload_validate(&$node) { // Check if node->files exists, and if it contains something. if (is_array($node->files)) { // Update existing files with form data. - foreach($node->files as $fid => $file) { + foreach ($node->files as $fid => $file) { // Convert file to object for compatibility $file = (object)$file; @@ -653,7 +653,7 @@ function upload_munge_filename($filename, $extensions = NULL, $alerts = 1) { $new_filename = array_shift($filename_parts); // Remove file basename. $final_extension = array_pop($filename_parts); // Remove final extension. - foreach($filename_parts as $filename_part) { + foreach ($filename_parts as $filename_part) { $new_filename .= ".$filename_part"; if (!in_array($filename_part, $whitelist) && preg_match("/^[a-zA-Z]{2,5}\d?$/", $filename_part)) { $new_filename .= '_'; diff --git a/modules/user/user.module b/modules/user/user.module index fec9202bb..d11297f7a 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -2591,7 +2591,7 @@ function theme_user_filters($form) { } $output .= '<li><dl class="multiselect">' . (sizeof($form['current']) ? '<dt><em>'. t('and') .'</em> '. t('where') .'</dt>' : '') . '<dd class="a">'; - foreach(element_children($form['filter']) as $key) { + foreach (element_children($form['filter']) as $key) { $output .= drupal_render($form['filter'][$key]); } $output .= '</dd>'; |