From d753a1aaf9cb31d3e9d48bfe97ea3900e55b5b03 Mon Sep 17 00:00:00 2001 From: cassiopc Date: Mon, 28 Oct 2013 11:48:47 +0100 Subject: allow config of main url to accept user/password --- src/fextdata.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/fextdata.php') 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 . //////////////////////////////////////////////////////////////////////////////// -// 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; -- cgit v1.2.3