From a7d8eb7e20d51bed9c15e8bb34d20d9450b518a0 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Tue, 31 Jul 2007 03:07:39 +0000 Subject: [PATCH] Clean up return values of testData::delete(), return false upon failure. --- include/testData.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/testData.php b/include/testData.php index 62147c7..ff9e790 100644 --- a/include/testData.php +++ b/include/testData.php @@ -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; }