diff options
| author | cassiopc <cassiopc@gmail.com> | 2012-08-06 17:59:23 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2012-08-06 17:59:23 +0000 |
| commit | f8c7c32e3ea6417ccf04309ec521b39a0c20414d (patch) | |
| tree | 86befe96e554f00d25e1f3717d456ef6da470405 /boca-1.5.0/src/fscore.php | |
| parent | d75956684f9599b8daf705b11d67c75186ea7e3f (diff) | |
| download | boca-f8c7c32e3ea6417ccf04309ec521b39a0c20414d.tar.gz boca-f8c7c32e3ea6417ccf04309ec521b39a0c20414d.zip | |
fix some concurrency issues when judging a run; update scripts to look for /etc/boca.conf if it exists
Diffstat (limited to 'boca-1.5.0/src/fscore.php')
| -rw-r--r-- | boca-1.5.0/src/fscore.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/boca-1.5.0/src/fscore.php b/boca-1.5.0/src/fscore.php index abbe22f..7b59561 100644 --- a/boca-1.5.0/src/fscore.php +++ b/boca-1.5.0/src/fscore.php @@ -157,25 +157,25 @@ function DBScore($contest, $verifylastmile, $hor=-1, $globalsite='0') { return $result; } -function DBBalloon($contest, $site, $user, $problem, $localsite=true) { - if (($b = DBSiteInfo($contest, $site)) == null) +function DBBalloon($contest, $site, $user, $problem, $localsite=true, $c=null) { + if($c==null) + $c = DBConnect(); + if (($b = DBSiteInfo($contest, $site, $c)) == null) exit; if ($localsite) { - if (($blocal = DBSiteInfo($contest, $_SESSION["usertable"]["usersitenumber"])) == null) + if (($blocal = DBSiteInfo($contest, $_SESSION["usertable"]["usersitenumber"], $c)) == null) exit; } else $blocal = $b; - if (($ct = DBContestInfo($contest)) == null) + if (($ct = DBContestInfo($contest,$c)) == null) exit; $t = time(); $ta = $blocal["currenttime"]; - if ($verifylastmile) - $tf = $b["sitelastmilescore"]; - else { - $tf = $b["siteduration"]; - } - - $c = DBConnect(); +// if ($verifylastmile) + $tf = $b["sitelastmilescore"]; +// else { +// $tf = $b["siteduration"]; +// } $r = DBExec($c, "select r.rundatediff as time, a.yes as yes from " . "runtable as r, answertable as a where r.runanswer=a.answernumber and " . "a.contestnumber=$contest and r.usernumber=$user and r.runproblem=$problem and " . |