[Pieforms-commit] SF.net SVN: pieforms: [143] pieforms-php5/trunk/src/pieform.php
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2006-12-24 06:29:28
|
Revision: 143 http://svn.sourceforge.net/pieforms/?rev=143&view=rev Author: oracleshinoda Date: 2006-12-23 22:29:24 -0800 (Sat, 23 Dec 2006) Log Message: ----------- Renumbered response constants to be negative numbers, to allow application developers to use the positive numbers Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2006-12-24 05:12:32 UTC (rev 142) +++ pieforms-php5/trunk/src/pieform.php 2006-12-24 06:29:24 UTC (rev 143) @@ -26,6 +26,13 @@ $GLOBALS['_PIEFORM_REGISTRY'] = array(); +/** The form was processed successfully */ +define('PIEFORM_OK', 0); +/** The form failed processing/validating */ +define('PIEFORM_ERR', -1); +/** A cancel button was pressed */ +define('PIEFORM_CANCEL', -2); + /** * Builds, validates and processes a form. * @@ -877,7 +884,7 @@ } else { // Redirect if the form is being cancelled - if (data.returnCode == 2) { + if (data.returnCode == -2) { window.location = data.message; return; } @@ -890,7 +897,7 @@ } } - if (data.returnCode == 1) { + if (data.returnCode == -1) { // The request failed validation EOF; @@ -1330,8 +1337,4 @@ return array_unique($htmlelements); } -define('PIEFORM_OK', 0); -define('PIEFORM_ERR', 1); -define('PIEFORM_CANCEL', 2); - ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |