diff --git a/include/application.php b/include/application.php index dd022fb..236e4a2 100644 --- a/include/application.php +++ b/include/application.php @@ -49,17 +49,20 @@ class Application { if($hResult = query_parameters($sQuery, $iAppId)) { $oRow = mysql_fetch_object($hResult); - $this->iAppId = $iAppId; - $this->iVendorId = $oRow->vendorId; - $this->iCatId = $oRow->catId; - $this->iSubmitterId = $oRow->submitterId; - $this->sSubmitTime = $oRow->submitTime; - $this->sDate = $oRow->submitTime; - $this->sName = $oRow->appName; - $this->sKeywords = $oRow->keywords; - $this->sDescription = $oRow->description; - $this->sWebpage = $oRow->webPage; - $this->sQueued = $oRow->queued; + if($oRow) + { + $this->iAppId = $iAppId; + $this->iVendorId = $oRow->vendorId; + $this->iCatId = $oRow->catId; + $this->iSubmitterId = $oRow->submitterId; + $this->sSubmitTime = $oRow->submitTime; + $this->sDate = $oRow->submitTime; + $this->sName = $oRow->appName; + $this->sKeywords = $oRow->keywords; + $this->sDescription = $oRow->description; + $this->sWebpage = $oRow->webPage; + $this->sQueued = $oRow->queued; + } } /* fetch versions of this application, if there are any */ @@ -404,7 +407,10 @@ class Application { { $aClean = array(); //array of filtered user input - $aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']); + if(isset($_REQUEST['sReplyText'])) + $aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']); + else + $aClean['sReplyText'] = ""; switch($sAction) { diff --git a/include/category.php b/include/category.php index 58be7f0..ea8d10a 100644 --- a/include/category.php +++ b/include/category.php @@ -32,11 +32,13 @@ class Category { if($hResult = query_parameters($sQuery, $iCatId)) { $oRow = mysql_fetch_object($hResult); - $this->iCatId = $iCatId; - $this->iParentId = $oRow->catParent; - $this->sName = $oRow->catName; - $this->sDescription = $oRow->catDescription; - + if($oRow) + { + $this->iCatId = $iCatId; + $this->iParentId = $oRow->catParent; + $this->sName = $oRow->catName; + $this->sDescription = $oRow->catDescription; + } } /* diff --git a/include/distribution.php b/include/distribution.php index 74bc91d..caaf2aa 100644 --- a/include/distribution.php +++ b/include/distribution.php @@ -32,13 +32,16 @@ class distribution{ if($hResult = query_parameters($sQuery, $iDistributionId)) { $oRow = mysql_fetch_object($hResult); - $this->iDistributionId = $iDistributionId; - $this->sName = $oRow->name; - $this->sDescription = $oRow->description; - $this->sUrl = $oRow->url; - $this->sSubmitTime = $oRow->submitTime; - $this->iSubmitterId = $oRow->submitterId; - $this->sQueued = $oRow->queued; + if($oRow) + { + $this->iDistributionId = $iDistributionId; + $this->sName = $oRow->name; + $this->sDescription = $oRow->description; + $this->sUrl = $oRow->url; + $this->sSubmitTime = $oRow->submitTime; + $this->iSubmitterId = $oRow->submitterId; + $this->sQueued = $oRow->queued; + } } } diff --git a/include/error_log.php b/include/error_log.php index 640cc05..4d12e3b 100644 --- a/include/error_log.php +++ b/include/error_log.php @@ -1,7 +1,7 @@ iHeight = $oInfo[1]; $this->iType = $oInfo[2]; - $this->set_debuglog("New image class created with as $sFile as" + $this->set_debuglog("New image class created with as $this->sFile as" ." file and {$oInfo[2]} as type. Dimensions" ." {$oInfo[0]}x{$oInfo[1]}"); } @@ -214,7 +214,7 @@ class Image { $iNewWidth,$iNewHeight,$this->iWidth,$this->iHeight); } - $this->set_debuglog("imagecopyresized($new,$this->oImage,0,0,0,0,$iNewWidth," + $this->set_debuglog("imagecopyresized($oNewImage,$this->oImage,0,0,0,0,$iNewWidth," ."$iNewHeight,$this->iWidth,$this->iHeight);"); imagedestroy($this->oImage); $this->oImage = $oNewImage; @@ -231,7 +231,6 @@ class Image { */ function resize_image_border($sBorderColor, $iBorderWidth, $iNewHeight, $iNewWidth) { - $r = hexdec(substr($sBorderColor, 1, 2)); $g = hexdec(substr($sBorderColor, 3, 2)); $b = hexdec(substr($sBorderColor, 5, 2)); diff --git a/include/incl.php b/include/incl.php index 245a451..4844cca 100644 --- a/include/incl.php +++ b/include/incl.php @@ -5,7 +5,7 @@ // get modules ini_set("memory_limit","64M"); -require(BASE."include/config.php"); +require_once(BASE."include/config.php"); require(BASE."include/util.php"); require(BASE."include/user.php"); require(BASE."include/session.php"); diff --git a/include/mail.php b/include/mail.php index 9453ae8..266b4fb 100644 --- a/include/mail.php +++ b/include/mail.php @@ -1,4 +1,6 @@ iMaintainerId = $oRow->maintainerId; - $this->iAppId = $oRow->appId; - $this->iVersionId = $oRow->versionId; - $this->iUserId = $oRow->userId; - $this->sMaintainReason = $oRow->maintainReason; - $this->bSuperMaintainer = $oRow->superMaintainer; - $this->aSubmitTime = $oRow->submitTime; - $this->bQueued = $oRow->queued; + if($oRow) + { + $this->iMaintainerId = $oRow->maintainerId; + $this->iAppId = $oRow->appId; + $this->iVersionId = $oRow->versionId; + $this->iUserId = $oRow->userId; + $this->sMaintainReason = $oRow->maintainReason; + $this->bSuperMaintainer = $oRow->superMaintainer; + $this->aSubmitTime = $oRow->submitTime; + $this->bQueued = $oRow->queued; + } } } @@ -73,8 +76,8 @@ class maintainer { $sStatusMessage = "
The maintainer was successfully added into the database
\n"; - $oApp = new Application($iAppId); - $oVersion = new Version($iVersionId); + $oApp = new Application($this->iAppId); + $oVersion = new Version($this->iVersionId); //Send Status Email $sEmail = $oUser->sEmail; if ($sEmail) diff --git a/include/monitor.php b/include/monitor.php index 438279a..9a252a4 100644 --- a/include/monitor.php +++ b/include/monitor.php @@ -26,11 +26,13 @@ class Monitor { WHERE monitorId = '".$iMonitorId."'"; $hResult = query_appdb($sQuery); $oRow = mysql_fetch_object($hResult); - $this->iMonitorId = $oRow->monitorId; - $this->iAppId = $oRow->appId; - $this->iVersionId = $oRow->versionId; - $this->iUserId = $oRow->userId; - + if($oRow) + { + $this->iMonitorId = $oRow->monitorId; + $this->iAppId = $oRow->appId; + $this->iVersionId = $oRow->versionId; + $this->iUserId = $oRow->userId; + } } } diff --git a/include/note.php b/include/note.php index 662e9a3..fe307ad 100644 --- a/include/note.php +++ b/include/note.php @@ -3,7 +3,10 @@ require_once(BASE."include/util.php"); require_once(BASE."include/version.php"); $aClean = array(); //array of filtered user input -$aClean['sReplyText'] = makeSafe( $_REQUEST['sReplyText'] ); +if(isset($_REQUEST['sReplyText'])) + $aClean['sReplyText'] = makeSafe( $_REQUEST['sReplyText'] ); +else + $aClean['sReplyText'] = ""; /************************************/ /* note class and related functions */ @@ -34,11 +37,14 @@ class Note { AND noteId = '?'"; $hResult = query_parameters($sQuery, $iNoteId); $oRow = mysql_fetch_object($hResult); - $this->iNoteId = $oRow->noteId; - $this->iAppId = $oRow->appId; - $this->iVersionId = $oRow->versionId; - $this->sTitle = $oRow->noteTitle; - $this->sDescription = $oRow->noteDesc; + if($oRow) + { + $this->iNoteId = $oRow->noteId; + $this->iAppId = $oRow->appId; + $this->iVersionId = $oRow->versionId; + $this->sTitle = $oRow->noteTitle; + $this->sDescription = $oRow->noteDesc; + } } } diff --git a/include/query.php b/include/query.php index a547d8a..5d31c37 100644 --- a/include/query.php +++ b/include/query.php @@ -2,7 +2,7 @@ $hAppdbLink = null; $hBugzillaLink = null; -define(MYSQL_DEADLOCK_ERRNO, 1213); +define("MYSQL_DEADLOCK_ERRNO", 1213); function query_appdb($sQuery,$sComment="") { diff --git a/include/screenshot.php b/include/screenshot.php index f9e3e7e..2b3dfea 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -40,14 +40,17 @@ class Screenshot { if($hResult) { $oRow = mysql_fetch_object($hResult); - $this->iScreenshotId = $iScreenshotId; - $this->sDescription = $oRow->description; - $this->iAppId = $oRow->appId; - $this->iVersionId = $oRow->versionId; - $this->sUrl = $oRow->url; - $this->bQueued = ($oRow->queued=="true")?true:false; - $this->sSubmitTime = $oRow->submitTime; - $this->iSubmitterId = $oRow->submitterId; + if($oRow) + { + $this->iScreenshotId = $iScreenshotId; + $this->sDescription = $oRow->description; + $this->iAppId = $oRow->appId; + $this->iVersionId = $oRow->versionId; + $this->sUrl = $oRow->url; + $this->bQueued = ($oRow->queued=="true")?true:false; + $this->sSubmitTime = $oRow->submitTime; + $this->iSubmitterId = $oRow->submitterId; + } } } } diff --git a/include/session.php b/include/session.php index fe0bd67..a3913d4 100644 --- a/include/session.php +++ b/include/session.php @@ -6,7 +6,7 @@ */ /* the number of days a session cookie is flaged to last */ -define(SESSION_DAYS_TO_EXPIRE, 2); +define("SESSION_DAYS_TO_EXPIRE", 2); class session { @@ -73,7 +73,10 @@ class session $result = query_parameters("SELECT data FROM session_list WHERE session_id = '?'", $key); if (!$result) { return null; } $oRow = mysql_fetch_object($result); - return $oRow->data; + if($oRow) + return $oRow->data; + else + return NULL; } // write session to DB diff --git a/include/testData.php b/include/testData.php index a9d3ec4..e37c90b 100644 --- a/include/testData.php +++ b/include/testData.php @@ -38,21 +38,24 @@ class testData{ if($hResult = query_parameters($sQuery, $iTestingId)) { $oRow = mysql_fetch_object($hResult); - $this->iTestingId = $oRow->testingId; - $this->iVersionId = $oRow->versionId; - $this->sWhatWorks = $oRow->whatWorks; - $this->sWhatDoesnt = $oRow->whatDoesnt; - $this->sWhatNotTested = $oRow->whatNotTested; - $this->sTestedDate = $oRow->testedDate; - $this->iDistributionId = $oRow->distributionId; - $this->sTestedRelease = $oRow->testedRelease; - $this->sInstalls = $oRow->installs; - $this->sRuns = $oRow->runs; - $this->sTestedRating = $oRow->testedRating; - $this->sComments = $oRow->comments; - $this->sSubmitTime = $oRow->submitTime; - $this->iSubmitterId = $oRow->submitterId; - $this->sQueued = $oRow->queued; + if($oRow) + { + $this->iTestingId = $oRow->testingId; + $this->iVersionId = $oRow->versionId; + $this->sWhatWorks = $oRow->whatWorks; + $this->sWhatDoesnt = $oRow->whatDoesnt; + $this->sWhatNotTested = $oRow->whatNotTested; + $this->sTestedDate = $oRow->testedDate; + $this->iDistributionId = $oRow->distributionId; + $this->sTestedRelease = $oRow->testedRelease; + $this->sInstalls = $oRow->installs; + $this->sRuns = $oRow->runs; + $this->sTestedRating = $oRow->testedRating; + $this->sComments = $oRow->comments; + $this->sSubmitTime = $oRow->submitTime; + $this->iSubmitterId = $oRow->submitterId; + $this->sQueued = $oRow->queued; + } } } } diff --git a/include/user.php b/include/user.php index 084761a..5ecd940 100644 --- a/include/user.php +++ b/include/user.php @@ -7,13 +7,13 @@ require_once(BASE."include/version.php"); require_once(BASE."include/maintainer.php"); require_once(BASE."include/util.php"); -define(SUCCESS, 0); -define(USER_CREATE_EXISTS, 1); -define(USER_CREATE_FAILED, 2); -define(USER_LOGIN_FAILED, 3); -define(USER_UPDATE_FAILED, 4); -define(USER_UPDATE_FAILED_EMAIL_EXISTS, 5); /* user updating to an email address that is already in use */ -define(USER_UPDATE_FAILED_NOT_LOGGED_IN, 6); /* user::update() called but user not logged in */ +define("SUCCESS", 0); +define("USER_CREATE_EXISTS", 1); +define("USER_CREATE_FAILED", 2); +define("USER_LOGIN_FAILED", 3); +define("USER_UPDATE_FAILED", 4); +define("USER_UPDATE_FAILED_EMAIL_EXISTS", 5); /* user updating to an email address that is already in use */ +define("USER_UPDATE_FAILED_NOT_LOGGED_IN", 6); /* user::update() called but user not logged in */ /** * User class for handling users @@ -41,13 +41,16 @@ class User { WHERE userId = '?'"; $hResult = query_parameters($sQuery, $iUserId); $oRow = mysql_fetch_object($hResult); - $this->iUserId = $oRow->userid; - $this->sEmail = $oRow->email; - $this->sRealname = $oRow->realname; - $this->sStamp = $oRow->stamp; - $this->sDateCreated = $oRow->created; - $this->sWineRelease = $oRow->CVSrelease; - $this->bInactivityWarned = $oRow->inactivity_warned; + if($oRow) + { + $this->iUserId = $oRow->userid; + $this->sEmail = $oRow->email; + $this->sRealname = $oRow->realname; + $this->sStamp = $oRow->stamp; + $this->sDateCreated = $oRow->created; + $this->sWineRelease = $oRow->CVSrelease; + $this->bInactivityWarned = $oRow->inactivity_warned; + } } return $this->isLoggedIn(); } @@ -65,12 +68,16 @@ class User { $hResult = query_parameters($sQuery, $sEmail, $sPassword); $oRow = mysql_fetch_object($hResult); - $this->iUserId = $oRow->userid; - $this->sEmail = $oRow->email; - $this->sRealname = $oRow->realname; - $this->sStamp = $oRow->stamp; - $this->sDateCreated = $oRow->created; - $this->sWineRelease = $oRow->CVSrelease; + if($oRow) + { + $this->iUserId = $oRow->userid; + $this->sEmail = $oRow->email; + $this->sRealname = $oRow->realname; + $this->sStamp = $oRow->stamp; + $this->sDateCreated = $oRow->created; + $this->sWineRelease = $oRow->CVSrelease; + } + if($this->isLoggedIn()) { // Update timestamp and clear the inactivity flag if it was set @@ -740,13 +747,19 @@ class User { while($oRow = mysql_fetch_object($hResult)) { $i = array_search($oRow->userid, $aUserId); - if ($aUserId[$i] != array($oRow->userid)) + + // if we didn't find this entry in the $aUserId + // array then we should add it + if($i === false) { $aUserId[$c] = array($oRow->userid); $c++; } } } + + // go through the email entries and only add the emails for the users + // that want to receive it if ($c > 0) { while(list($index, list($userIdValue)) = each($aUserId)) @@ -756,6 +769,7 @@ class User { $retval .= $oUser->sEmail." "; } } + return $retval; } diff --git a/include/version.php b/include/version.php index 5b6ff23..e257b41 100644 --- a/include/version.php +++ b/include/version.php @@ -45,19 +45,19 @@ class Version { if($hResult = query_parameters($sQuery, $iVersionId)) { $oRow = mysql_fetch_object($hResult); - $this->iVersionId = $iVersionId; - $this->iAppId = $oRow->appId; - $this->iCatId = $oRow->catId; - $this->iSubmitterId = $oRow->submitterId; - $this->sSubmitTime = $oRow->submitTime; - $this->sDate = $oRow->submitTime; - $this->sName = $oRow->versionName; - $this->sKeywords = $oRow->keywords; - $this->sDescription = $oRow->description; - $this->sTestedRelease = $oRow->maintainer_release; - $this->sTestedRating = $oRow->maintainer_rating; - $this->sWebpage = $oRow->webPage; - $this->sQueued = $oRow->queued; + if($oRow) + { + $this->iVersionId = $iVersionId; + $this->iAppId = $oRow->appId; + $this->iSubmitterId = $oRow->submitterId; + $this->sSubmitTime = $oRow->submitTime; + $this->sDate = $oRow->submitTime; + $this->sName = $oRow->versionName; + $this->sDescription = $oRow->description; + $this->sTestedRelease = $oRow->maintainer_release; + $this->sTestedRating = $oRow->maintainer_rating; + $this->sQueued = $oRow->queued; + } } } } @@ -394,7 +394,12 @@ class Version { function mailSubmitter($sAction="add") { $aClean = array(); //array of filtered user input - $aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']); + + // use 'sReplyText' if it is defined, otherwise define the value as an empty string + if(isset($_REQUEST['sReplyText'])) + $aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']); + else + $aClean['sReplyText'] = ""; if($this->iSubmitterId) { @@ -403,12 +408,12 @@ class Version { switch($sAction) { case "add": - $sSubject = "Submitted version accepted"; + $sSubject = "Submitted version accepted"; $sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been accepted by ".$_SESSION['current']->sRealname."."; $sMsg .= "Administrators Responce:\n"; break; case "reject": - $sSubject = "Submitted version rejected"; + $sSubject = "Submitted version rejected"; $sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been rejected by ".$_SESSION['current']->sRealname."."; $sMsg .= "Clicking on the link in this email will allow you to modify and resubmit the version. "; $sMsg .= "A link to your queue of applications and versions will also show up on the left hand side of the Appdb site once you have logged in. "; @@ -416,7 +421,7 @@ class Version { $sMsg .= "Reason given:\n"; break; case "delete": - $sSubject = "Submitted version deleted"; + $sSubject = "Submitted version deleted"; $sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been deleted by ".$_SESSION['current']->sRealname."."; $sMsg .= "Reason given:\n"; break; @@ -432,7 +437,12 @@ class Version { function SendNotificationMail($sAction="add",$sMsg=null) { $aClean = array(); //array of filtered user input - $aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']); + + // use 'sReplyText' if it is defined, otherwise define the value as an empty string + if(isset($_REQUEST['sReplyText'])) + $aClean['sReplyText'] = makeSafe($_REQUEST['sReplyText']); + else + $aClean['sReplyText'] = ""; $oApp = new Application($this->iAppId); switch($sAction) diff --git a/unit_test/run_tests.php b/unit_test/run_tests.php index 3a4c717..6b757eb 100644 --- a/unit_test/run_tests.php +++ b/unit_test/run_tests.php @@ -5,7 +5,7 @@ /* TODO: test the rest of the classes we have */ -error_reporting(E_ALL ^ E_NOTICE); +error_reporting(E_ALL); include_once("test_user.php"); echo "\n"; diff --git a/unit_test/test_application.php b/unit_test/test_application.php index 389aff4..3c25a4a 100644 --- a/unit_test/test_application.php +++ b/unit_test/test_application.php @@ -135,7 +135,7 @@ function test_application_getWithRating() $iItemsPerPage = 50; $iOffset = 0; $sRating = 'Bronze'; - $aApps=Application::getWithRating($sRating, $iOffset, $iItemsPerPage); + $aApps = Application::getWithRating($sRating, $iOffset, $iItemsPerPage); $aTest = array();//array to test the uniqueness our query results while(list($i, $iId) = each($aApps)) //cycle through results returned by getWithRating { @@ -249,13 +249,13 @@ function create_and_login_user() if(!test_application_delete()) echo "test_application_delete() failed!\n"; else - echo "test_application_delete() passed!\n"; + echo "test_application_delete() passed\n"; if(!test_application_getWithRating()) echo "test_application_getWithRating() failed!\n"; else - echo "test_application_getWithRating() passed!\n"; + echo "test_application_getWithRating() passed\n"; ?> diff --git a/unit_test/test_image.php b/unit_test/test_image.php index 8fa6de4..d1f7c35 100644 --- a/unit_test/test_image.php +++ b/unit_test/test_image.php @@ -5,11 +5,11 @@ require_once("path.php"); require_once("test_common.php"); -DEFINE(TEST_IMAGE_FILENAME, "/images/appdb_montage.jpg"); -DEFINE(TEST_IMAGE_OUTPUT_FILENAME, "/tmp/tmpfile.png"); -DEFINE(TEST_IMAGE_WIDTH, 391); -DEFINE(TEST_IMAGE_HEIGHT, 266); -DEFINE(TEST_IMAGE_WATERMARK, "/images/watermark.png"); +DEFINE("TEST_IMAGE_FILENAME", "/images/appdb_montage.jpg"); +DEFINE("TEST_IMAGE_OUTPUT_FILENAME", "/tmp/tmpfile.png"); +DEFINE("TEST_IMAGE_WIDTH", 391); +DEFINE("TEST_IMAGE_HEIGHT", 266); +DEFINE("TEST_IMAGE_WATERMARK", "/images/watermark.png"); function test_image_constructor() { @@ -73,7 +73,7 @@ function test_image_make_thumbnail() from the ratio of the height to width of the original image */ $iBorderWidth = 20; - $oImage->make_thumb($iWidth, $iHeight, $iBorderWidthm, "#0000FF"); + $oImage->make_thumb($iWidth, $iHeight, $iBorderWidth, "#0000FF"); /* did we get the correct size? */ $iActualWidth = $oImage->get_width(); diff --git a/unit_test/test_query.php b/unit_test/test_query.php index 5ce8977..7754d3b 100644 --- a/unit_test/test_query.php +++ b/unit_test/test_query.php @@ -121,7 +121,7 @@ function test_query_parameters() if(!test_query_parameters()) echo "test_query_parameters() failed!\n"; else - echo "test_query_parameters() passed!\n"; + echo "test_query_parameters() passed\n"; -?> \ No newline at end of file +?> diff --git a/unit_test/test_user.php b/unit_test/test_user.php index 8da4d75..636bd13 100644 --- a/unit_test/test_user.php +++ b/unit_test/test_user.php @@ -28,10 +28,13 @@ function test_user_create() { $oUser->delete(); $oUser = new User(); + } else + { + echo "User doesn't already exist\n"; } /* create the user */ - $retval = $oUser->create("testemail@somesite.com", "password", "Test user", "20051020"); + $retval = $oUser->create($test_email, $test_password, "Test user", "20051020"); if($retval != SUCCESS) { if($retval == USER_CREATE_EXISTS) @@ -45,7 +48,7 @@ function test_user_create() } /* try creating the user again, see that we get USER_CREATE_EXISTS */ - $retval = $oUser->create("testemail@somesite.com", "password", "Test user", "20051020"); + $retval = $oUser->create($test_email, $test_password, "Test user", "20051020"); if($retval != USER_CREATE_EXISTS) { echo "Got '".$retval."' instead of USER_CREATE_EXISTS(".USER_CREATE_EXISTS.")\n"; @@ -68,15 +71,17 @@ function test_user_login() $retval = $oUser->login($test_email, $test_password); if($retval != SUCCESS) { + echo "Test that correct information results in a correct login FAILED\n"; echo "Got '".$retval."' instead of SUCCESS(".SUCCESS.")\n"; return false; } /* test that incorrect user results in a login failed */ $oUser = new User(); - $retval = $oUser->login("some nutty username", $testpassword); + $retval = $oUser->login("some nutty username", $test_password); if($retval != USER_LOGIN_FAILED) { + echo "Test that incorrect user results in a failed login FAILED\n"; echo "Got '".$retval."' instead of SUCCESS(".SUCCESS.")\n"; return false; } @@ -86,6 +91,7 @@ function test_user_login() $retval = $oUser->login($test_email, "some password"); if($retval != USER_LOGIN_FAILED) { + echo "Test that incorrect passowrd results in a login failed FAILED\n"; echo "Got '".$retval."' instead of SUCCESS(".SUCCESS.")\n"; return false; }