From 2b33b21350d7ac56288bf15e3c6efbe239b9d4bc Mon Sep 17 00:00:00 2001 From: root Date: Fri, 22 Nov 2013 14:11:18 +0100 Subject: [PATCH 1/2] [FIX Blockfinder Stats] Working with public and private settings --- public/include/pages/statistics/blockfinder.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/include/pages/statistics/blockfinder.inc.php b/public/include/pages/statistics/blockfinder.inc.php index dcf75226..f471afdf 100644 --- a/public/include/pages/statistics/blockfinder.inc.php +++ b/public/include/pages/statistics/blockfinder.inc.php @@ -6,21 +6,24 @@ if (!defined('SECURITY')) die('Hacking attempt'); // Grab Block Finder if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $debug->append('No cached version available, fetching from backend', 3); - $getBlocksSolvedbyAccount = $statistics->getBlocksSolvedbyAccount(); $smarty->assign("BLOCKSSOLVEDBYACCOUNT", $getBlocksSolvedbyAccount); + + if(isset($_SESSION['USERDATA']['id'])){ + $getBlocksSolvedbyWorker = $statistics->getBlocksSolvedbyWorker($_SESSION['USERDATA']['id']); + $smarty->assign("BLOCKSSOLVEDBYWORKER", $getBlocksSolvedbyWorker); + } + } else { $debug->append('Using cached page', 3); } +// Public / private page detection if ($setting->getValue('acl_blockfinder_statistics')) { $smarty->assign("CONTENT", "finder.tpl"); } else if ($user->isAuthenticated()) { - $getBlocksSolvedbyWorker = $statistics->getBlocksSolvedbyWorker($_SESSION['USERDATA']['id']); - $smarty->assign("BLOCKSSOLVEDBYWORKER", $getBlocksSolvedbyWorker); $smarty->assign("CONTENT", "finder.tpl"); } else { - $_SESSION['POPUP'][] = array('CONTENT' => 'Block Finders are currently disabled. Please try again later.', 'TYPE' => 'errormsg'); $smarty->assign("CONTENT", "default.tpl"); } ?> From cc5a82c3f2362e0b977ba6459f803925428d49e6 Mon Sep 17 00:00:00 2001 From: Fred Date: Sat, 23 Nov 2013 09:19:09 -0600 Subject: [PATCH 2/2] Update default.tpl No reason max width should be less then 100. Quick fix. --- public/templates/mpos/contactform/default.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/templates/mpos/contactform/default.tpl b/public/templates/mpos/contactform/default.tpl index 0c29e96f..a3450d58 100644 --- a/public/templates/mpos/contactform/default.tpl +++ b/public/templates/mpos/contactform/default.tpl @@ -6,15 +6,15 @@
- +
- +
- +