appdb/include testData.php

WineHQ wineowner at wine.codeweavers.com
Mon Jul 30 22:07:39 CDT 2007


ChangeSet ID:	31295
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/07/30 22:07:39

Modified files:
	include        : testData.php 

Log message:
	Chris Morgan <cmorgan at alum.wpi.edu>
	Clean up return values of testData::delete(), return false upon failure.

Patch: http://cvs.winehq.org/patch.py?id=31295

Old revision  New revision  Changes     Path
 1.74          1.75          +4 -2       appdb/include/testData.php

Index: appdb/include/testData.php
diff -u -p appdb/include/testData.php:1.74 appdb/include/testData.php:1.75
--- appdb/include/testData.php:1.74	31 Jul 2007  3: 7:39 -0000
+++ appdb/include/testData.php	31 Jul 2007  3: 7:39 -0000
@@ -214,8 +214,9 @@ class testData{
            !$_SESSION['current']->hasAppVersionModifyPermission($oVersion) &&
            !(($_SESSION['current']->iUserId == $this->iSubmitterId) && !($this->sQueued == 'false')))
         {
-            return;
+            return false;
         }
+
         // now delete the test data 
         $sQuery = "DELETE FROM testResults
                    WHERE testingId = '?' 
@@ -223,6 +224,7 @@ class testData{
         if(!($hResult = query_parameters($sQuery, $this->iTestingId)))
         {
             addmsg("Error removing the deleted test data!", "red");
+            return false;
         }
 
         if(!$bSilent)
@@ -231,7 +233,7 @@ class testData{
         if($this->iSubmitterId && ($this->iSubmitterId != $_SESSION['current']->iUserId))
             $this->mailSubmitter("delete");
 
-        return TRUE;
+        return true;
     }
 
 



More information about the wine-cvs mailing list