aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-07-30 16:22:32 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-07-30 16:22:32 +0000
commitf78dbc4493f67167f6f4367c6be8792475f6fcc3 (patch)
treeb18b58ce56162520103a08ad21b7aea617efa4f9
parente8b566439af4bf24aaf4ebfc72d510a4222b5a9b (diff)
downloadboca-f78dbc4493f67167f6f4367c6be8792475f6fcc3.tar.gz
boca-f78dbc4493f67167f6f4367c6be8792475f6fcc3.zip
bug fixes
-rw-r--r--src/fextdata.php8
-rw-r--r--src/scoretable.php7
2 files changed, 9 insertions, 6 deletions
diff --git a/src/fextdata.php b/src/fextdata.php
index e43d0af..e531a77 100644
--- a/src/fextdata.php
+++ b/src/fextdata.php
@@ -453,15 +453,15 @@ function genSQLs($contest, $site, $updatetime) {
$sql['langtable']="select * from langtable where contestnumber=$contest and updatetime >= $updatetime";
$sql['problemtable']="select * from problemtable where contestnumber=$contest and fake='f' and updatetime >= $updatetime";
// $sql['sitetimetable']="select * from sitetimetable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime";
- $sql['usertable']="select * from usertable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime";
- $sql['clartable']="select * from clartable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime";
- $sql['runtable']="select * from runtable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime";
+ $sql['usertable']="select * from usertable where contestnumber=$contest and usersitenumber=$site and updatetime >= $updatetime";
+ $sql['clartable']="select * from clartable where contestnumber=$contest and clarsitenumber=$site and updatetime >= $updatetime";
+ $sql['runtable']="select * from runtable where contestnumber=$contest and runsitenumber=$site and updatetime >= $updatetime";
$sql['tasktable']="select * from tasktable where contestnumber=$contest and sitenumber=$site and updatetime >= $updatetime";
return $sql;
}
function generateSiteXML($contest,$site,$updatetime) {
- $sql = genSQL($contest, $site, $updatetime);
+ $sql = genSQLs($contest, $site, $updatetime);
$c = DBConnect();
if ($c==null) return null;
DBExec($c, "begin work");
diff --git a/src/scoretable.php b/src/scoretable.php
index 0348d51..b8025a3 100644
--- a/src/scoretable.php
+++ b/src/scoretable.php
@@ -141,10 +141,13 @@ if($_SESSION["usertable"]["usertype"]=='score' || $_SESSION["usertable"]["userty
} else {
@rename($fname . ".tmp",$destination);
}
- @fclose($fp);
+ @fclose($fp);
+
+ getMainXML();
+
@unlink($destination . ".lck");
} else {
- if(file_exists($destination . ".lck",'x') && filemtime($destination . ".lck",'x') < time() - 180)
+ if(file_exists($destination . ".lck") && filemtime($destination . ".lck") < time() - 180)
@unlink($destination . ".lck");
}
}