Support silent input checking. checkOutputEditorInput() can now return TRUE instead of a

list of errors
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-04-24 00:35:51 +00:00
committed by WineHQ
parent d03359ed2e
commit f688be7c4d
2 changed files with 7 additions and 2 deletions

View File

@@ -436,6 +436,13 @@ class ObjectManager
{ {
if($sErrors) if($sErrors)
{ {
/* A class's checkOutputEditorInput() may simply return TRUE if
it wants the editor to be displayed again, without any error
messages. This is for example useful when gathering information
in several steps, such as with application submission */
if($sErrors === TRUE)
return TRUE;
echo "<font color=\"red\">\n"; echo "<font color=\"red\">\n";
echo "The following errors were found<br />\n"; echo "The following errors were found<br />\n";
echo "<ul>$sErrors</ul>\n"; echo "<ul>$sErrors</ul>\n";

View File

@@ -58,8 +58,6 @@ $oOtherObject = new $oObject->sClass($oObject->iId);
processForm return TRUE on success, or a user-readable list of errors processForm return TRUE on success, or a user-readable list of errors
on failure */ on failure */
$sErrors = $oObject->processForm($aClean); $sErrors = $oObject->processForm($aClean);
if($sErrors === TRUE)
$sErrors = "";
if($oObject->iId && $aClean['sAction'] == "delete") if($oObject->iId && $aClean['sAction'] == "delete")
$oObject->delete_entry(); $oObject->delete_entry();