diff options
| author | cassiopc <cassiopc@gmail.com> | 2012-10-22 16:50:03 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2012-10-22 16:50:03 +0000 |
| commit | df477b322c071d81ea06ad972a36ea9f30cdc34f (patch) | |
| tree | 77dad3b53ed879e65b22f24f880592a12e5dbad0 /boca-1.5.1/src/scoretable.php | |
| parent | 9e75d473525446d0961a7567bcb8a1e672949df8 (diff) | |
| download | boca-df477b322c071d81ea06ad972a36ea9f30cdc34f.tar.gz boca-df477b322c071d81ea06ad972a36ea9f30cdc34f.zip | |
update sendscore.sh to cope with new version. Fix password update and hexsub
Diffstat (limited to 'boca-1.5.1/src/scoretable.php')
| -rw-r--r-- | boca-1.5.1/src/scoretable.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/boca-1.5.1/src/scoretable.php b/boca-1.5.1/src/scoretable.php index 574b700..dcfc7a6 100644 --- a/boca-1.5.1/src/scoretable.php +++ b/boca-1.5.1/src/scoretable.php @@ -95,7 +95,7 @@ if(file_exists($scoretmp)) { } } -if($_SESSION["usertable"]["usertype"]=='score' || (isset($_GET["remote"]) && is_numeric($_GET["remote"]))) { +if($_SESSION["usertable"]["usertype"]=='score' || $_SESSION["usertable"]["usertype"]=='admin' || (isset($_GET["remote"]) && is_numeric($_GET["remote"]))) { $remotedir = $_SESSION['locr'] . $ds . "private" . $ds . "remotescores"; $destination = $remotedir . $ds ."scores.zip"; if(is_writable($remotedir)) { @@ -115,10 +115,12 @@ if($_SESSION["usertable"]["usertype"]=='score' || (isset($_GET["remote"]) && is_ @file_put_contents($fname . ".tmp",base64_encode(serialize($data0))); @rename($fname . ".tmp",$fname . ".dat"); - if(@create_zip($remotedir,glob($remotedir . '/*.dat'),$destination)!==true) { + if(@create_zip($remotedir,glob($remotedir . '/*.dat'),$fname . ".tmp") != 1) { LOGError("Cannot create score zip file"); + if(@create_zip($remotedir,array(),$fname . ".tmp") == 1) + @rename($fname . ".tmp",$destination); } else { - @create_zip($remotedir,array(),$destination); + @rename($fname . ".tmp",$destination); } } } |