diff --git a/cronjobs/run-crons.sh b/cronjobs/run-crons.sh old mode 100644 new mode 100755 diff --git a/public/include/pages/statistics/blockfinder.inc.php b/public/include/pages/statistics/blockfinder.inc.php index 2bfbe138..dcf75226 100644 --- a/public/include/pages/statistics/blockfinder.inc.php +++ b/public/include/pages/statistics/blockfinder.inc.php @@ -8,11 +8,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $debug->append('No cached version available, fetching from backend', 3); $getBlocksSolvedbyAccount = $statistics->getBlocksSolvedbyAccount(); - $getBlocksSolvedbyWorker = $statistics->getBlocksSolvedbyWorker($_SESSION['USERDATA']['id']); - - // Propagate content our template $smarty->assign("BLOCKSSOLVEDBYACCOUNT", $getBlocksSolvedbyAccount); - $smarty->assign("BLOCKSSOLVEDBYWORKER", $getBlocksSolvedbyWorker); } else { $debug->append('Using cached page', 3); } @@ -20,6 +16,8 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { 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');