aboutsummaryrefslogtreecommitdiff
path: root/src/fextdata.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/fextdata.php')
-rw-r--r--src/fextdata.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/fextdata.php b/src/fextdata.php
index 37e0c9f..d0a272b 100644
--- a/src/fextdata.php
+++ b/src/fextdata.php
@@ -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/sep/2013 by cassio@ime.usp.br
+// Last modified 28/oct/2013 by cassio@ime.usp.br
function scoretransfer($putname, $localsite) {
$ds = DIRECTORY_SEPARATOR;
@@ -24,6 +24,17 @@ function scoretransfer($putname, $localsite) {
if(!is_readable($privatedir . $ds . 'remotescores' . $ds . "otherservers")) return;
$localfile = "score_site" . $localsite . "_" . $localsite . "_x.dat";
$remotesite = @file($privatedir . $ds . 'remotescores' . $ds . "otherservers");
+
+ $contest=$_SESSION["usertable"]["contestnumber"];
+ if($contest != '' && ($ct = DBContestInfo($contest)) != null) {
+ if(trim($ct['contestmainsiteurl']) != '') {
+ $tmp = explode(' ',$ct['contestmainsiteurl']);
+ if(count($tmp) == 3) {
+ $remotesite[count($remotesite)] = $ct['contestmainsiteurl'];
+ }
+ }
+ }
+
for($i = 0; $i < count($remotesite); $i++) {
$sitedata = explode(' ', $remotesite[$i]);
if(count($sitedata) < 3) continue;