From 35c33e3cf5b61fbf226116cb881f5e38c3a5103b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 9 Sep 2006 08:25:24 +0000 Subject: [PATCH] - Patch #83222 by edkwh: more theme('placeholder') clean-up. Good catch. --- includes/form.inc | 2 +- includes/locale.inc | 2 +- modules/filter/filter.module | 2 +- modules/node/content_types.inc | 8 ++++---- modules/profile/profile.module | 2 +- modules/system/system.install | 8 ++++---- modules/upload/upload.module | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/includes/form.inc b/includes/form.inc index 1a7863e5599..71e244204a1 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -497,7 +497,7 @@ function _form_validate($elements, $form_id = NULL) { } elseif (!isset($options[$elements['#value']])) { form_error($elements, t('An illegal choice has been detected. Please contact the site administrator.')); - watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme_placeholder(check_plain($elements['#value'])), '%name' => theme('placeholder', empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']))), WATCHDOG_ERROR); + watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => $elements['#value'], '%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'])), WATCHDOG_ERROR); } } } diff --git a/includes/locale.inc b/includes/locale.inc index eb3f19be1cb..1a82bb755b5 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -867,7 +867,7 @@ function _locale_import_parse_plural_forms($pluralforms, $filename) { return array($nplurals, $plural); } else { - drupal_set_message(t('The translation file %filename contains an error: the plural formula could not be parsed.', array('%filename' => theme('placeholder', $filename))), 'error'); + drupal_set_message(t('The translation file %filename contains an error: the plural formula could not be parsed.', array('%filename' => $filename)), 'error'); return FALSE; } } diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 86f85b2b06b..7d644f3e3ae 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -856,7 +856,7 @@ function filter_form_validate($form) { } } form_error($form, t('An illegal choice has been detected. Please contact the site administrator.')); - watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => theme('placeholder', check_plain($form[$key]['#value'])), '%name' => theme('placeholder', empty($form['#title']) ? $form['#parents'][0] : $form['#title']))), WATCHDOG_ERROR); + watchdog('form', t('Illegal choice %choice in %name element.', array('%choice' => $form[$key]['#value'], '%name' => empty($form['#title']) ? $form['#parents'][0] : $form['#title'])), WATCHDOG_ERROR); } /** diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index e30871fd1e7..fb414600794 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -228,17 +228,17 @@ function node_type_form_validate($form_id, $form_values) { if (!$form_values['locked']) { if (isset($types[$type->type]) && $type->type != $old_type) { - form_set_error('type', t('The machine-readable name %type is already taken.', array('%type' => theme('placeholder', $type->type)))); + form_set_error('type', t('The machine-readable name %type is already taken.', array('%type' => $type->type))); } if (strpos($type->type, '-') !== FALSE) { - form_set_error('type', t('The machine-readable name cannot contain dashes.', array('%type' => theme('placeholder', $type->type)))); + form_set_error('type', t('The machine-readable name cannot contain dashes.', array('%type' => $type->type))); } } $names = array_flip($types); if (isset($names[$type->name]) && $names[$type->name] != $old_type) { - form_set_error('name', t('The human-readable name %name is already taken.', array('%name' => theme('placeholder', $names[$type->name])))); + form_set_error('name', t('The human-readable name %name is already taken.', array('%name' => $names[$type->name]))); break; } } @@ -370,7 +370,7 @@ function node_type_delete_confirm($type) { $num_nodes = db_num_rows(db_query("SELECT * FROM {node} WHERE type = '%s'", $type->type)); if ($num_nodes) { - $caption .= '

'. t('Warning: there %are currently %num_nodes %type %nodes on your site. %they may not be able to be displayed or edited correctly, once you have removed this content type.', array('%are' => format_plural($num_nodes, 'is', 'are'), '%num_nodes' => $num_nodes, '%type' => theme('placeholder', $type->name), '%nodes' => format_plural($num_nodes, 'node', 'nodes'), '%they' => format_plural($num_nodes, 'It', 'They'))) .'

'; + $caption .= '

'. t('Warning: there %are currently %num_nodes %type %nodes on your site. %they may not be able to be displayed or edited correctly, once you have removed this content type.', array('%are' => format_plural($num_nodes, 'is', 'are'), '%num_nodes' => $num_nodes, '%type' => $type->name, '%nodes' => format_plural($num_nodes, 'node', 'nodes'), '%they' => format_plural($num_nodes, 'It', 'They'))) .'

'; } $caption .= '

'. t('This action cannot be undone.') .'

'; diff --git a/modules/profile/profile.module b/modules/profile/profile.module index d924a236636..0c40a10c76d 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -344,7 +344,7 @@ function profile_field_form_submit($form_id, $form_values) { db_query("INSERT INTO {profile_fields} (title, name, explanation, category, type, weight, required, register, visibility, autocomplete, options, page) VALUES ('%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, '%s', '%s')", $form_values['title'], $form_values['name'], $form_values['explanation'], $form_values['category'], $form_values['type'], $form_values['weight'], $form_values['required'], $form_values['register'], $form_values['visibility'], $form_values['autocomplete'], $form_values['options'], $form_values['page']); drupal_set_message(t('The field has been created.')); - watchdog('profile', t('Profile field %field added under category %category.', array('%field' => theme('placeholder', $form_values['title']), '%category' => theme('placeholder', $form_values['category']))), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); + watchdog('profile', t('Profile field %field added under category %category.', array('%field' => $form_values['title'], '%category' => $form_values['category'])), WATCHDOG_NOTICE, l(t('view'), 'admin/user/profile')); } else { db_query("UPDATE {profile_fields} SET title = '%s', name = '%s', explanation = '%s', category = '%s', weight = %d, required = %d, register = %d, visibility = %d, autocomplete = %d, options = '%s', page = '%s' WHERE fid = %d", $form_values['title'], $form_values['name'], $form_values['explanation'], $form_values['category'], $form_values['weight'], $form_values['required'], $form_values['register'], $form_values['visibility'], $form_values['autocomplete'], $form_values['options'], $form_values['page'], $form_values['fid']); diff --git a/modules/system/system.install b/modules/system/system.install index c82d7a77f62..82ef6edc4af 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -24,10 +24,10 @@ function system_requirements($phase) { drupal_add_js(" $(document).ready(function() { - $('.system-jquery').ancestors('.warning').addClass('info').removeClass('warning') - var version = $().jquery - $('.system-jquery').html(version.substring(1,version.length-1)) - }); + $('.system-jquery').ancestors('.warning').addClass('info').removeClass('warning') + var version = $().jquery + $('.system-jquery').html(version.substring(1,version.length-1)) + }); ", 'inline'); $requirements['jquery'] = array( diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 68bf09d23de..42ab9e18278 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -146,17 +146,17 @@ function upload_admin_settings_validate($form_id, $form_values) { $usersize = $form_values['upload_usersize_'. $rid]; if (!is_numeric($uploadsize) || ($uploadsize <= 0)) { - form_set_error('upload_uploadsize_'. $rid, t('The %role file size limit must be a number and greater than zero.', array('%role' => theme('placeholder', $role)))); + form_set_error('upload_uploadsize_'. $rid, t('The %role file size limit must be a number and greater than zero.', array('%role' => $role))); } if (!is_numeric($usersize) || ($usersize <= 0)) { - form_set_error('upload_usersize_'. $rid, t('The %role file size limit must be a number and greater than zero.', array('%role' => theme('placeholder', $role)))); + form_set_error('upload_usersize_'. $rid, t('The %role file size limit must be a number and greater than zero.', array('%role' => $role))); } if ($uploadsize > file_upload_max_size()) { form_set_error('upload_uploadsize_'. $rid, $exceed_max_msg . $more_info); $more_info = ''; } if ($uploadsize > $usersize) { - form_set_error('upload_uploadsize_'. $rid, t('The %role maximum file size per upload is greater than the total file size allowed per user', array('%role' => theme('placeholder', $role)))); + form_set_error('upload_uploadsize_'. $rid, t('The %role maximum file size per upload is greater than the total file size allowed per user', array('%role' => $role))); } } }