From e40fe9b587b688cf0fe64f12f50725a27479b929 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 4 Nov 2009 07:40:19 +0000 Subject: [PATCH] More fixes for fetchUserData(), missing template added --- .gitattributes | 1 + inc/functions.php | 2 +- inc/mysql-manager.php | 5 ++++- templates/de/html/menu/menu_member_advert_logout.tpl | 6 ++++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 templates/de/html/menu/menu_member_advert_logout.tpl diff --git a/.gitattributes b/.gitattributes index ca82c559f5..fdbcdc6c97 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1549,6 +1549,7 @@ templates/de/html/menu/menu_member_advert_account.tpl -text templates/de/html/menu/menu_member_advert_bank.tpl -text templates/de/html/menu/menu_member_advert_end.tpl -text templates/de/html/menu/menu_member_advert_extras.tpl -text +templates/de/html/menu/menu_member_advert_logout.tpl -text templates/de/html/menu/menu_member_advert_main.tpl -text templates/de/html/menu/menu_member_advert_order.tpl -text templates/de/html/menu/menu_member_advert_rals.tpl -text diff --git a/inc/functions.php b/inc/functions.php index 90e2bc5058..7908206a7c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3672,7 +3672,7 @@ function isTemplateCached ($template) { // Flushes non-flushed template cache to disk function flushTemplateCache ($template, $eval) { // Is this cache flushed? - if (!isTemplateCached($template)) { + if ((!isTemplateCached($template)) && ($eval != '404')) { // Generate FQFN $FQFN = sprintf("%s_compiled/templates/%s.tpl.cache", getConfig('CACHE_PATH'), $template); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 343477e891..e1f912c95f 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -583,6 +583,9 @@ function isMember () { } elseif (getUserId() == 0) { // No member return false; + } else { + // Transfer userid=>current + setCurrentUserid(getUserId()); } // Init global user data array @@ -635,7 +638,7 @@ function fetchUserData ($userid, $column='userid') { if ($userid < 1) { // Invalid, so abort here debug_report_bug('User id ' . $userid . ' is invalid.'); - } elseif (isset($GLOBALS['user_data'][$userid])) { + } elseif (isUserDataValid()) { // Use cache, so it is fine return true; } diff --git a/templates/de/html/menu/menu_member_advert_logout.tpl b/templates/de/html/menu/menu_member_advert_logout.tpl new file mode 100644 index 0000000000..7014e93faa --- /dev/null +++ b/templates/de/html/menu/menu_member_advert_logout.tpl @@ -0,0 +1,6 @@ + + + Hier könnte Ihre Werbung stehen! + + + -- 2.30.2