From: Roland Häder Date: Thu, 30 Jun 2011 15:53:13 +0000 (+0000) Subject: Fixes for absent ext-user and misleading data removed X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=b4df691a2d9cabc94a6def5bd1ee3d4945d5efd4 Fixes for absent ext-user and misleading data removed --- diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index a6f7d71807..c8c30db2a2 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Mediendaten * * -------------------------------------------------------------------- * - * mod_media - By Robert Niedziela * - * (c)2003 www.megacomputing.net * - * -------------------------------------------------------------------- * - * Rewritten by Roland Haeder, 2003 - 2009 * - * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * @@ -48,10 +43,14 @@ if (!defined('__SECURITY')) { // Add description as navigation point addYouAreHereLink('guest', __FILE__); +// Both ext-mediadata and ext-user must be there if ((!isExtensionActive('mediadata')) && (!isAdmin())) { displayMessage(generateExtensionInactiveNotInstalledMessage('mediadata')); return; -} // END - if +} elseif ((!isExtensionActive('user')) && (!isAdmin())) { + displayMessage(generateExtensionInactiveNotInstalledMessage('user')); + return; +} // Get total confirmed user ids... $content['user_confirmed'] = getTotalConfirmedUser(); diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index ff9863dd8b..ca20611192 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -43,8 +43,16 @@ if (!defined('__SECURITY')) { // Add description as navigation point addYouAreHereLink('guest', __FILE__); -// Derterminate which stats we want and set mode and title for the link below stats block -if (!isGetRequestParameterSet('mode')) setGetRequestParameter('mode', strtolower(getConfig('guest_stats'))); +// This part only works if ext-user is active +if ((!isExtensionActive('user')) && (!isAdmin())) { + displayMessage(generateExtensionInactiveNotInstalledMessage('user')); + return; +} // END - if + +// Determine which stats we want and set mode and title for the link below stats block +if (!isGetRequestParameterSet('mode')) { + setGetRequestParameter('mode', strtolower(getConfig('guest_stats'))); +} // END - if // Set config temporarily setConfigEntry('guest_stats', strtoupper(getRequestParameter('mode'))); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 2c7ea72a2b..6df25311c6 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -428,6 +428,12 @@ function isMember () { // Fetch user data for given user id function fetchUserData ($value, $column = 'userid') { + // Extension ext-user must be there at any case + if (!isExtensionActive('user')) { + // Absent ext-user is really not good + return false; + } // END - if + // If we should look for userid secure&set it here if (substr($column, -2, 2) == 'id') { // Secure userid @@ -444,9 +450,6 @@ function fetchUserData ($value, $column = 'userid') { // Use cache, so it is fine return true; } - } elseif (!isExtensionActive('user')) { - // Absent ext-user is really not good - return false; } elseif (isUserDataValid()) { // Using cache is fine return true;