Fixes for inactive extension 'user'
authorRoland Häder <roland@mxchange.org>
Sun, 18 May 2008 17:32:22 +0000 (17:32 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 18 May 2008 17:32:22 +0000 (17:32 +0000)
inc/config.php
inc/functions.php
inc/language/de.php
inc/modules/admin/what-list_user.php

index 0d02f7041c7426417c2042982e076b3d6d50b906..35bf5268b11aba4fd68621920ea666ecf6fbcb30 100644 (file)
@@ -105,7 +105,7 @@ define('mxchange_installed', true);
 define('admin_registered', true);
 
 // CFG: DEBUG-MODE (if enabled all mails will be *displayed* and *not* send!)
-define('DEBUG_MODE', false);
+define('DEBUG_MODE', true);
 
 // When we are not installing
 if (!defined('mxchange_installing')) define('mxchange_installing', false);
index bfa97b999a9e7d533114e74becb3e1bbf73ceb4d..d1dffd29b99c1eb04bfb7dfe199127fa17756e00 100644 (file)
@@ -1790,7 +1790,7 @@ function CREATE_EMAIL_LINK($email, $table="admins") {
        if ((EXT_IS_ACTIVE("admins")) && ($table == "admins")) {
                // Create email link for contacting admin in guest area
                $EMAIL = ADMINS_CREATE_EMAIL_LINK($email);
-       } elseif ((GET_EXT_VERSION("user") >= "0.3.3") && ($table == "user_data")) {
+       } elseif ((EXT_IS_ACTIVE("user", true)) && (GET_EXT_VERSION("user") >= "0.3.3") && ($table == "user_data")) {
                // Create email link for contacting a member within admin area (or later in other areas, too?)
                $EMAIL = USER_CREATE_EMAIL_LINK($email);
        } elseif ((EXT_IS_ACTIVE("sponsor")) && ($table == "sponsor_data")) {
index eb4144f820785e762e3c3c03d1f95380d04ec7b6..077fcb6edd3aec12c3523c8c87fd2627eae50732 100644 (file)
@@ -1108,6 +1108,7 @@ define('ADMIN_LOGOUT_SQL_PATCHES_DONE', "Sie wurden automatisch ausgeloggt, da S
 define('ADMIN_POINTS_REPAYED', "Es wurden dem Mitglied <u>%s</u> {!POINTS!} zur&uuml;ckgeschrieben.");
 define('ADMIN_NO_POINTS_REPAYED', "Die Mailbuchung hatte keine {!POINTS!} zum zur&uuml;ckbuchen!");
 define('EXTENSION_WARNING_EXT_INACTIVE', "Die Erweiterung <u>%s</u> ist nicht aktiv. Dies kann zu St&ouml;rungen f&uuml;hren.<br />\nBitte aktivieren Sie diese unter <em>Verschiedenes-&gt;Erweiterungen</em>.");
+define('EXTENSION_WARNING_USER_LIMIT', "Die Erweiterung <u>user</u> ist nicht aktiv. Die Anzahl User pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter <em>Verschiedenes-&gt;Erweiterungen</em>.");
 
 //
 ?>
index 95dd6303344f861ca4ab97ca87be4b7519e4279b..0199638d136c39047917a5c705bbfdc684290b5e 100644 (file)
@@ -152,6 +152,12 @@ WHERE userid=%d LIMIT 1",
        $result_master = SQL_QUERY($SQL, __FILE__, __LINE__);
 
        // Calculate page count (0.5 fixes a bug with page count)
+       if ($_CONFIG['user_limit'] == 0) {
+               $_CONFIG['user_limit'] = 100;
+               LOAD_TEMPLATE("admin_settings_saved", false, EXTENSION_WARNING_USER_LIMIT);
+       }
+
+       // Activate the extension please!
        $PAGES = round(SQL_NUMROWS($result_master) / $_CONFIG['user_limit'] + 0.5);
 
        if (empty($_GET['page']))   $_GET['page']   = "1";
@@ -174,17 +180,22 @@ WHERE userid=%d LIMIT 1",
                define('__COLSPAN1'  , $colspan);
                define('__COLSPAN2'  , ($colspan + 2));
                define('__USER_CNT'  , $user_count);
-               define('__ALPHA_SORT', alpha($_GET['sortby'], $colspan, true));
-               define('__SORT_LINKS', SortLinks($_GET['letter'], $_GET['sortby'], $colspan, true));
-               if ($PAGES > 1)
-               {
-                       define('__PAGE_NAV', ADD_PAGENAV($PAGES, $_CONFIG['user_limit'], true, $colspan, true));
+
+               if ((function_exists('alpha')) && (function_exists('SortLinks'))) {
+                       define('__ALPHA_SORT', alpha($_GET['sortby'], $colspan, true));
+                       define('__SORT_LINKS', SortLinks($_GET['letter'], $_GET['sortby'], $colspan, true));
+               } else {
+                       define('__ALPHA_SORT', "");
+                       define('__SORT_LINKS', "");
                }
-                else
-               {
+
+               if ($PAGES > 1) {
+                       define('__PAGE_NAV', ADD_PAGENAV($PAGES, $_CONFIG['user_limit'], true, $colspan, true));
+               } else {
                        // No page navigation is required
                        define('__PAGE_NAV', "");
                }
+
                // Column with nickname when nickname extension is present
                if (EXT_IS_ACTIVE("nickname"))
                {