summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc2
-rw-r--r--includes/install.inc6
-rw-r--r--includes/locale.inc4
-rw-r--r--includes/menu.inc2
-rw-r--r--includes/theme.inc2
-rw-r--r--modules/contact/contact.module4
-rw-r--r--modules/system/system.install2
-rw-r--r--modules/system/system.module2
-rw-r--r--modules/upload/upload.module8
-rw-r--r--modules/user/user.module2
10 files changed, 17 insertions, 17 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 4a29f12e5..7e6751725 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -731,7 +731,7 @@ function t($string, $args = 0) {
}
else {
// Transform arguments before inserting them
- foreach($args as $key => $value) {
+ foreach ($args as $key => $value) {
switch ($key[0]) {
// Escaped only
case '@':
diff --git a/includes/install.inc b/includes/install.inc
index 06b25a77c..82dc0336a 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -276,14 +276,14 @@ function drupal_verify_profile($profile, $locale) {
// Get a list of modules that exist in Drupal's assorted subdirectories.
$present_modules = array();
- foreach(drupal_system_listing('\.module$', 'modules', 'name', 0) as $present_module) {
+ foreach (drupal_system_listing('\.module$', 'modules', 'name', 0) as $present_module) {
$present_modules[] = $present_module->name;
}
// Verify that all of the profile's required modules are present.
$missing_modules = array_diff($module_list, $present_modules);
if (count($missing_modules)) {
- foreach($missing_modules as $module) {
+ foreach ($missing_modules as $module) {
drupal_set_message(st('The %module module is required but was not found. Please move it into the <em>modules</em> subdirectory.', array('%module' => $module)), 'error');
}
}
@@ -596,7 +596,7 @@ function st($string, $args = array()) {
require_once './includes/theme.inc';
$GLOBALS['theme'] = 'theme';
// Transform arguments before inserting them
- foreach($args as $key => $value) {
+ foreach ($args as $key => $value) {
switch ($key[0]) {
// Escaped only
case '@':
diff --git a/includes/locale.inc b/includes/locale.inc
index 6f1226d01..ac51ce0ae 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -103,7 +103,7 @@ function theme_locale_admin_manage_screen($form) {
function _locale_admin_manage_screen_submit($form_id, $form_values) {
// Save changes to existing languages.
$languages = locale_supported_languages(FALSE, TRUE);
- foreach($languages['name'] as $key => $value) {
+ foreach ($languages['name'] as $key => $value) {
if ($form_values['site_default'] == $key) {
$form_values['enabled'][$key] = 1; // autoenable the default language
}
@@ -978,7 +978,7 @@ function _locale_import_tokenize_formula($formula) {
if (is_numeric($formula[$i])) {
$num = $formula[$i];
$j = $i + 1;
- while($j < strlen($formula) && is_numeric($formula[$j])) {
+ while ($j < strlen($formula) && is_numeric($formula[$j])) {
$num .= $formula[$j];
$j++;
}
diff --git a/includes/menu.inc b/includes/menu.inc
index 0cb8ae902..806ca22a0 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -609,7 +609,7 @@ function menu_rebuild() {
// Save the new items updating the pids in each iteration
while (($c = count($new_items)) && ($c != $old_count)) {
$old_count = count($new_items);
- foreach($new_items as $mid => $item) {
+ foreach ($new_items as $mid => $item) {
// If the item has a valid parent, save it
if ($item['pid'] >= 0) {
// The new menu ID gets passed back by reference as $item['mid']
diff --git a/includes/theme.inc b/includes/theme.inc
index a0a1e1654..4a3acecb9 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -504,7 +504,7 @@ function theme_status_messages($display = NULL) {
$output .= "<div class=\"messages $type\">\n";
if (count($messages) > 1) {
$output .= " <ul>\n";
- foreach($messages as $message) {
+ foreach ($messages as $message) {
$output .= ' <li>'. $message ."</li>\n";
}
$output .= " </ul>\n";
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>';