aboutsummaryrefslogtreecommitdiff
path: root/src/scoretable.php
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2013-09-02 13:03:33 +0000
committercassiopc <cassiopc@gmail.com>2013-09-02 13:03:33 +0000
commit1b94293e92915ff3c5b6944a16fb0851d6fd19cc (patch)
tree7992edbafbe7760900736ba27be58358fa0cf503 /src/scoretable.php
parentbc3df342f06c6f61e0daf9ae29d435f9299b8733 (diff)
downloadboca-1b94293e92915ff3c5b6944a16fb0851d6fd19cc.tar.gz
boca-1b94293e92915ff3c5b6944a16fb0851d6fd19cc.zip
inclusion of score's downloads from the first server in the file otherservers
Diffstat (limited to 'src/scoretable.php')
-rw-r--r--src/scoretable.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/scoretable.php b/src/scoretable.php
index ef11ee6..ed24cf1 100644
--- a/src/scoretable.php
+++ b/src/scoretable.php
@@ -1,7 +1,7 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//BOCA Online Contest Administrator
-// Copyright (C) 2003-2012 by BOCA System (bocasystem@gmail.com)
+// Copyright (C) 2003-2013 by BOCA System (bocasystem@gmail.com)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////
-//Last updated 02/nov/2012 by cassio@ime.usp.br
+//Last updated 02/sep/2013 by cassio@ime.usp.br
require_once("db.php");
if(isset($_SESSION["locr"]))
@@ -104,6 +104,8 @@ if($_SESSION["usertable"]["usertype"]=='score' || $_SESSION["usertable"]["userty
$destination = $remotedir . $ds ."scores.zip";
if(is_writable($remotedir)) {
if($redo || !is_readable($destination)) {
+ scoretransfer();
+
if (($s = DBSiteInfo($_SESSION["usertable"]["contestnumber"],$_SESSION["usertable"]["usersitenumber"])) == null)
ForceLoad("index.php");
@@ -115,7 +117,7 @@ if($_SESSION["usertable"]["usertype"]=='score' || $_SESSION["usertable"]["userty
}
$ct=DBGetActiveContest();
$localsite=$ct['contestlocalsite'];
- $fname = $privatedir . $ds . "score_localsite_" . $localsite . "_" . md5($_SERVER['HTTP_HOST']);
+ $fname = $privatedir . $ds . "score_localsite_" . $localsite . "_"; // . md5($_SERVER['HTTP_HOST']);
@file_put_contents($fname . ".tmp",base64_encode(serialize($data0)));
@rename($fname . ".tmp",$fname . ".dat");
@@ -126,7 +128,7 @@ if($_SESSION["usertable"]["usertype"]=='score' || $_SESSION["usertable"]["userty
}
$ct=DBGetActiveContest();
$localsite=$ct['contestlocalsite'];
- $fname = $remotedir . $ds . "score_site" . $localsite . "_" . $localsite . "_" . md5($_SERVER['HTTP_HOST']);
+ $fname = $remotedir . $ds . "score_site" . $localsite . "_" . $localsite . "_"; // . md5($_SERVER['HTTP_HOST']);
@file_put_contents($fname . ".tmp",base64_encode(serialize($data0)));
@rename($fname . ".tmp",$fname . ".dat");