aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_prefs.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp/ucp_prefs.php')
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 17d7d23f02..0c9f20f266 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -2,9 +2,8 @@
/**
*
* @package ucp
-* @version $Id$
* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -112,7 +111,7 @@ class ucp_prefs
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$dateformat_options = '';
@@ -234,7 +233,7 @@ class ucp_prefs
}
// Replace "error" strings with their real, localised form
- $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ $error = array_map(array($user, 'lang'), $error);
}
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
@@ -360,5 +359,3 @@ class ucp_prefs
$this->page_title = 'UCP_PREFS_' . strtoupper($mode);
}
}
-
-?> \ No newline at end of file