From 5d4eca5257a60c5f1de043fdf3f67e0a9df011f4 Mon Sep 17 00:00:00 2001 From: cassiopc Date: Wed, 8 Aug 2012 19:52:19 +0200 Subject: many small bug fixes --- boca-1.5.0/src/team/header.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'boca-1.5.0/src/team/header.php') diff --git a/boca-1.5.0/src/team/header.php b/boca-1.5.0/src/team/header.php index 23c6d98..2690766 100644 --- a/boca-1.5.0/src/team/header.php +++ b/boca-1.5.0/src/team/header.php @@ -93,10 +93,10 @@ if(!isset($_SESSION["popuptime"]) || $_SESSION["popuptime"] < time()-120) { $_SESSION["usertable"]["usersitenumber"], $_SESSION["usertable"]["usernumber"]); for ($i=0; $i$_SESSION["usertable"]["userlastlogin"]-$st["sitestartdate"] && - $clar[$i]["timestamp"] < $st['siteduration'] && - trim($clar[$i]["answer"])!='' && !isset($_SESSION["popups"]['clar' . $i . '-' . $clar[$i]["timestamp"]])) { - $_SESSION["popups"]['clar' . $i . '-' . $clar[$i]["timestamp"]] = "Clarification for problem ".$clar[$i]["problem"]." answered\n"; + if ($clar[$i]["anstime"]>$_SESSION["usertable"]["userlastlogin"]-$st["sitestartdate"] && + $clar[$i]["anstime"] < $st['siteduration'] && + trim($clar[$i]["answer"])!='' && !isset($_SESSION["popups"]['clar' . $i . '-' . $clar[$i]["anstime"]])) { + $_SESSION["popups"]['clar' . $i . '-' . $clar[$i]["anstime"]] = "Clarification for problem ".$clar[$i]["problem"]." answered\n"; } } $run = DBUserRuns($_SESSION["usertable"]["contestnumber"], @@ -112,14 +112,16 @@ if(!isset($_SESSION["popuptime"]) || $_SESSION["popuptime"] < time()-120) { } $str = ''; - foreach($_SESSION["popups"] as $key => $value) { - if($value != '') { - $str .= $value; - $_SESSION["popups"][$key] = ''; - } - } - if($str != '') { - MSGError('YOU GOT NEWS:\n' . $str . '\n'); + if(isset($_SESSION["popups"])) { + foreach($_SESSION["popups"] as $key => $value) { + if($value != '') { + $str .= $value; + $_SESSION["popups"][$key] = ''; + } + } + if($str != '') { + MSGError('YOU GOT NEWS:\n' . $str . '\n'); + } } } -- cgit v1.2.3