[FIX] undefined index: USERDATA

This commit is contained in:
root 2013-11-18 13:20:23 +01:00
parent 65c7edf503
commit a1493032d2
2 changed files with 2 additions and 4 deletions

0
cronjobs/run-crons.sh Normal file → Executable file
View File

View File

@ -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');