aboutsummaryrefslogtreecommitdiff
path: root/src/fscore.php
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2013-09-02 17:55:20 +0000
committercassiopc <cassiopc@gmail.com>2013-09-02 17:55:20 +0000
commit36af2dbc07588b90b89ff6701a8a483228fd87dc (patch)
tree199df5612b23d9e76cfd4a31c077a69405eef7fd /src/fscore.php
parente74e7692302f57acccec75bcedc1584e0eadd165 (diff)
downloadboca-36af2dbc07588b90b89ff6701a8a483228fd87dc.tar.gz
boca-36af2dbc07588b90b89ff6701a8a483228fd87dc.zip
adapt site numbers according to remote score file names
Diffstat (limited to 'src/fscore.php')
-rw-r--r--src/fscore.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fscore.php b/src/fscore.php
index ac60661..df8375d 100644
--- a/src/fscore.php
+++ b/src/fscore.php
@@ -1,7 +1,7 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//BOCA Online Contest Administrator
-// Copyright (C) 2003-2012 by BOCA Development Team (bocasystem@gmail.com)
+// Copyright (C) 2003-2013 by BOCA Development Team (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 modified 02/nov/2012 by cassio@ime.usp.br
+// Last modified 03/sep/2013 by cassio@ime.usp.br
////////////////////////////funcoes para placar///////////////////////////////////////////////
function ScoreCMP($a,$b) {
@@ -92,14 +92,15 @@ function DBScore($contest, $verifylastmile, $hor=-1, $globalsite='0') {
foreach ($scoreitems as $fname) {
$namear=explode('_',$fname);
$overloadsite=-1;
- if(isset($namear[3]) && is_numeric($namear[2])) $overloadsite=$namear[2];
+ if(isset($namear[3]) && trim($namear[2]) != '' && is_numeric($namear[2])) $overloadsite=$namear[2];
$fc=file_get_contents($fname);
if(($arr = unserialize(base64_decode($fc)))===false) {
LOGError("File " . sanitizeText($fname) . " is not compatible");
} else {
if(is_array($arr)) {
if(isset($arr['site'])) {
- $site=$arr['site']; //if($overloadsite>0) $site=$overloadsite;
+ $site=$arr['site'];
+ if($overloadsite>0) $site=$overloadsite;
if(!in_array($site, $whichsites) && !in_array(0,$whichsites)) continue;
$fine=1;
reset($resp);