Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.572
diff -u -Ffunction -r1.572 common.inc
--- includes/common.inc 1 Sep 2006 08:44:25 -0000 1.572
+++ includes/common.inc 6 Sep 2006 12:27:16 -0000
@@ -632,33 +632,27 @@ if (function_exists('locale') && $loca
return $string;
}
else {
- // Transform arguments before inserting them
- array_walk($args, '_t');
+ // Transform arguments before inserting them
+ foreach($args as $key => $value) {
+ switch ($key[0]) {
+ // Escaped only
+ case '@':
+ $args[$key] = check_plain($value);
+ break;
+ // Escaped and placeholder
+ case '%':
+ default:
+ $args[$key] = theme('placeholder', $value);
+ break;
+ // Pass-through
+ case '!':
+ }
+ }
return strtr($string, $args);
}
}
/**
- * Helper function: apply the appropriate transformation to st() and t()
- * placeholders.
- */
-function _t(&$value, $key) {
- switch ($key[0]) {
- // Escaped only
- case '@':
- $value = check_plain($value);
- return;
- // Escaped and placeholder
- case '%':
- default:
- $value = theme('placeholder', $value);
- return;
- // Pass-through
- case '!':
- }
-}
-
-/**
* @defgroup validation Input validation
* @{
* Functions to validate user input.
Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.21
diff -u -Ffunction -r1.21 install.inc
--- includes/install.inc 5 Sep 2006 02:28:11 -0000 1.21
+++ includes/install.inc 6 Sep 2006 12:26:44 -0000
@@ -579,31 +579,25 @@ function st($string, $args = array()) {
require_once './includes/theme.inc';
$GLOBALS['theme'] = 'theme';
// Transform arguments before inserting them
- array_walk($args, '_st');
+ foreach($args as $key => $value) {
+ switch ($key[0]) {
+ // Escaped only
+ case '@':
+ $args[$key] = check_plain($value);
+ break;
+ // Escaped and placeholder
+ case '%':
+ default:
+ $args[$key] = ''. check_plain($value) .'';
+ break;
+ // Pass-through
+ case '!':
+ }
+ }
return strtr((!empty($locale_strings[$string]) ? $locale_strings[$string] : $string), $args);
}
/**
- * Helper function: apply the appropriate transformation to st() and t() placeholders.
- */
-function _st(&$value, $key) {
- switch ($key[0]) {
- // Escaped only
- case '@':
- $value = check_plain($value);
- return;
- // Escaped and placeholder
- case '%':
- default:
- $value = ''. check_plain($value) .'';
- return;
- // Pass-through
- case '!':
- }
-}
-
-
-/**
* Check a profile's requirements.
*
* @param profile