Commit 35c33e3c authored by Dries's avatar Dries

- Patch #83222 by edkwh: more theme('placeholder') clean-up. Good catch.

parent afd01f2a
......@@ -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);
}
}
}
......
......@@ -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;
}
}
......
......@@ -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);
}
/**
......
......@@ -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 .= '<p>'. t('<strong>Warning:</strong> 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'))) .'</p>';
$caption .= '<p>'. t('<strong>Warning:</strong> 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'))) .'</p>';
}
$caption .= '<p>'. t('This action cannot be undone.') .'</p>';
......
......@@ -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']);
......
......@@ -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(
......
......@@ -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)));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment