From c416fd4f6f06bd8c2a35288821e280dd45034375 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Thu, 19 Oct 2017 14:32:15 +0100 Subject: bf --- src/fcontest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fcontest.php') diff --git a/src/fcontest.php b/src/fcontest.php index 045f28e..e4a6f5d 100644 --- a/src/fcontest.php +++ b/src/fcontest.php @@ -1121,7 +1121,7 @@ function DBNewSite ($contest, $c=null, $param=array()) { } else { $a = DBGetRow ("select * from sitetable where contestnumber=$contest and sitenumber=$number", 0, $c); if($a != null) { - if($cw) DBExec($c, "commit work"); + if($cw) DBExec($c, "commit work"); return 1; } } -- cgit v1.2.3 From 380285bd9dadbd9e8fc7f9217044560e1efa6981 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Thu, 19 Oct 2017 14:36:44 +0100 Subject: bf --- src/fcontest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fcontest.php') diff --git a/src/fcontest.php b/src/fcontest.php index e4a6f5d..f8f2cff 100644 --- a/src/fcontest.php +++ b/src/fcontest.php @@ -1121,8 +1121,8 @@ function DBNewSite ($contest, $c=null, $param=array()) { } else { $a = DBGetRow ("select * from sitetable where contestnumber=$contest and sitenumber=$number", 0, $c); if($a != null) { - if($cw) DBExec($c, "commit work"); - return 1; + if($cw) DBExec($c, "commit work"); + return false; } } if($duration=='') $duration = $ct["contestduration"]; @@ -1140,7 +1140,7 @@ function DBNewSite ($contest, $c=null, $param=array()) { $ct["contestlastmileanswer"].",".$ct["contestlastmilescore"]. ", $duration, 't', '$number', '$number', '$number', $sitescorelevel, 0, 0, 0, 0, 10, $updatetime)")) { if($cw) DBExec($c, "commit work"); - return 1; + return false; } $cf=globalconf(); @@ -1160,7 +1160,7 @@ function DBNewSite ($contest, $c=null, $param=array()) { if($cw) DBExec($c, "commit work"); LOGLevel("User " . $_SESSION["usertable"]["username"]."/". $_SESSION["usertable"]["usersitenumber"] . " created site $number on contest $contest.",2); - return 2; + return $number; } function DBUserUpdate($contest, $site, $user, $username, $userfull, $userdesc, $passo, $passn) { -- cgit v1.2.3