]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_user.php
Fixes for inactive extension 'user'
[mailer.git] / inc / modules / admin / what-list_user.php
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"))
                {