From 8d0af73ace3de78c3c2e5a0bba61cd88a07e587e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 23 Jun 2010 12:49:06 +0000 Subject: [PATCH] Some fixes/improvements: - Fixed missing array elements for what=active in guest menu - 'Today Online' below action=online is only shown when ext-active and ext-online are activated - Fixed user's last activity in clicking on paidmails. It is now no longer updated if an administrator is logged in --- inc/extensions/ext-online.php | 4 ++-- inc/libs/active_functions.php | 12 +++++++----- mailid.php | 5 ++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index fd513fe0cc..1e34115ce7 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -124,7 +124,7 @@ KEY `admin_member` (`is_admin`,`is_member`) // Update notes (these will be set as task text!) setExtensionUpdateNotes("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); break; - } + } // END - switch break; case 'modify': // When the extension got modified @@ -139,7 +139,7 @@ KEY `admin_member` (`is_admin`,`is_member`) default: // Unknown extension mode logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch // [EOF] ?> diff --git a/inc/libs/active_functions.php b/inc/libs/active_functions.php index 124ed34461..302480e265 100644 --- a/inc/libs/active_functions.php +++ b/inc/libs/active_functions.php @@ -44,12 +44,14 @@ if (!defined('__SECURITY')) { // Filter for adding link to "active list" function FILTER_ADD_LINK_ACTIVE_LIST () { - // Are the extensions online and active there? - if (isExtensionActive('online')) { - // Init content + // Is ext-active/online there? + if ((isExtensionActive('active')) && (isExtensionActive('online'))) { + // Init fake-content because there is no `what`='active' in database $content = array( - 'menu' => '{%config=menu_blur_spacer%}{--GUEST_ACTIVE_LINK--}', - 'what' => 'active' + 'menu' => '{%config=menu_blur_spacer%}{--GUEST_ACTIVE_LINK--}', + 'what' => 'active', + 'visible' => 'Y', + 'locked' => 'N' ); // Add link to "we were active today" page diff --git a/mailid.php b/mailid.php index eff588330e..b744732582 100644 --- a/mailid.php +++ b/mailid.php @@ -129,7 +129,10 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDe // Status must be CONFIRMED if (getUserData('status') == 'CONFIRMED') { // Update last activity if not admin - updateLastActivity($url_userid); + if (!isAdmin()) { + // Is not admin, so update last activity + updateLastActivity($url_userid); + } // END - if // User has confirmed his account so we can procede... // @TODO Rewrite this to a filter -- 2.39.5