More language strings rewritten
[mailer.git] / inc / modules / admin / what-list_user.php
index 9e5e57b1923df9cd260a5857576b2ffbadf4c0c1..7560ac483dee650f7c8484405cdb85a74c17c8ee 100644 (file)
@@ -37,7 +37,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("user")) || (GET_EXT_VERSION("user") == "")) {
        // Missing extension!
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
        return;
 }
 
@@ -45,13 +45,13 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Init title with "all accounts"
-$listHeader = ADMIN_ALL_ACCOUNTS;
+$listHeader = getMessage('ADMIN_ALL_ACCOUNTS');
 if (!empty($_GET['status'])) {
        // Set title according to the "status"
-       $listHeader = constant(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['status']))));
+       $listHeader = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['status']))));
 } elseif (!empty($_GET['mode'])) {
        // Set title according to the "mode"
-       $listHeader = constant(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode']))));
+       $listHeader = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode']))));
 }
 
 // Remember it
@@ -152,12 +152,13 @@ LIMIT 1",
                if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = "---";
 
                // Nickname inclusion?
+               // @TODO Rewrite these to filters
                if (EXT_IS_ACTIVE("nickname")) {
                        // Nickname not set or invalid? Then 
                        if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = "---";
                } else {
                        // Extension not found
-                       $DATA['nickname'] = EXT_NICKNAME_404;
+                       $DATA['nickname'] = getMessage('EXT_NICKNAME_404');
                }
 
                // Is the user extension newer?
@@ -238,7 +239,7 @@ LIMIT 1",
        // Calculate page count (0.5 fixes a bug with page count)
        if (getConfig('user_limit') == 0) {
                setConfigEntry('user_limit', 100);
-               LOAD_TEMPLATE("admin_settings_saved", false, EXTENSION_WARNING_USER_LIMIT);
+               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('EXTENSION_WARNING_USER_LIMIT'));
        } // END - if
 
        // Activate the extension please!
@@ -276,13 +277,11 @@ LIMIT 1",
                }
 
                // Column with nickname when nickname extension is present
-               if (EXT_IS_ACTIVE("nickname"))
-               {
+               // @TODO Rewrite this into a  filter
+               if (EXT_IS_ACTIVE("nickname")) {
                        // Nickname extension found
-                       define('__NICKNAME_TH', "  <td class=\"admin_title bottom2\" align=\"center\">".NICKNAME."</td>");
-               }
-                else
-               {
+                       define('__NICKNAME_TH', "  <td class=\"admin_title bottom2\" align=\"center\">{--NICKNAME--}</td>");
+               } else {
                        // Not found
                        define('__NICKNAME_TH', "");
                }
@@ -330,6 +329,7 @@ LIMIT 1",
                        if (!isset($content['lock_reason'])) $content['lock_reason'] = "---";
 
                        // Is the extension "country" installed?
+                       // @TODO Rewrite this into a filter
                        if (EXT_IS_ACTIVE("country")) {
                                // Then overwrite country information
                                $content['country'] = COUNTRY_GENERATE_INFO($content['country_code']);