From: Roland Häder Date: Sun, 18 May 2008 17:32:22 +0000 (+0000) Subject: Fixes for inactive extension 'user' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2865a2ba42f7be1851708e33a4f3325ecbff0dd1;p=mailer.git Fixes for inactive extension 'user' --- diff --git a/inc/config.php b/inc/config.php index 0d02f7041c..35bf5268b1 100644 --- a/inc/config.php +++ b/inc/config.php @@ -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); diff --git a/inc/functions.php b/inc/functions.php index bfa97b999a..d1dffd29b9 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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")) { diff --git a/inc/language/de.php b/inc/language/de.php index eb4144f820..077fcb6edd 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1108,6 +1108,7 @@ define('ADMIN_LOGOUT_SQL_PATCHES_DONE', "Sie wurden automatisch ausgeloggt, da S define('ADMIN_POINTS_REPAYED', "Es wurden dem Mitglied %s {!POINTS!} zurückgeschrieben."); define('ADMIN_NO_POINTS_REPAYED', "Die Mailbuchung hatte keine {!POINTS!} zum zurückbuchen!"); define('EXTENSION_WARNING_EXT_INACTIVE', "Die Erweiterung %s ist nicht aktiv. Dies kann zu Störungen führen.
\nBitte aktivieren Sie diese unter Verschiedenes->Erweiterungen."); +define('EXTENSION_WARNING_USER_LIMIT', "Die Erweiterung user ist nicht aktiv. Die Anzahl User pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter Verschiedenes->Erweiterungen."); // ?> diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 95dd630334..0199638d13 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -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")) {