From 3925d2168d4740ced8ea4e510a525ed4743c8f4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 31 Oct 2009 15:15:26 +0000 Subject: [PATCH] Rewrites and cache may be rebuilded in framesets --- inc/mysql-manager.php | 2 +- mailid.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 922188fff2..836d1d850d 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -253,7 +253,7 @@ function checkModulePermissions ($mod = '') { // Destroy cache here // @TODO Rewrite this to a filter - if (getOutputMode() == 0) rebuildCacheFile('modules', 'modules'); + if ((getOutputMode() == 0) || (getOutputMode() == -1)) rebuildCacheFile('modules', 'modules'); // And reload data unset($GLOBALS['module_status'][$mod]); diff --git a/mailid.php b/mailid.php index ffad347555..dcd0208ad0 100644 --- a/mailid.php +++ b/mailid.php @@ -68,15 +68,18 @@ if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement // 01 1 12 2 2 21 1 22 10 if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) { + // Init result + $result_link = false; + // Maybe he wants to confirm an email? if ($url_mid > 0) { // Normal-Mails - $result = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1", + $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1", array($url_mid, $url_userid), __FILE__, __LINE__); $type = 'mailid'; $urlId = $url_mid; } elseif ($url_bid > 0) { // Bonus-Mail - $result = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1", + $result_link = SQL_QUERY_ESC("SELECT `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1", array($url_bid, $url_userid), __FILE__, __LINE__); $type = 'bonusid'; $urlId = $url_bid; } else { @@ -84,7 +87,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr redirectToUrl('index.php'); } - if (SQL_NUMROWS($result) == 1) { + if (SQL_NUMROWS($result_link) == 1) { // Load the entry list($ltype) = SQL_FETCHROW($result); @@ -92,8 +95,7 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr SQL_FREERESULT($result); // @TODO Rewrite this to a filter - switch ($ltype) - { + switch ($ltype) { case 'NORMAL': // Is the stats ID valid? $result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", -- 2.39.2