From f688be7c4d037f1e0f79c645a951e81a650d0cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Tue, 24 Apr 2007 00:35:51 +0000 Subject: [PATCH] Support silent input checking. checkOutputEditorInput() can now return TRUE instead of a list of errors --- include/objectManager.php | 7 +++++++ objectManager.php | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/objectManager.php b/include/objectManager.php index d4cfe4a..c4b5825 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -436,6 +436,13 @@ class ObjectManager { 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 "\n"; echo "The following errors were found
\n"; echo "\n"; diff --git a/objectManager.php b/objectManager.php index 9836b35..735487d 100644 --- a/objectManager.php +++ b/objectManager.php @@ -58,8 +58,6 @@ $oOtherObject = new $oObject->sClass($oObject->iId); processForm return TRUE on success, or a user-readable list of errors on failure */ $sErrors = $oObject->processForm($aClean); -if($sErrors === TRUE) - $sErrors = ""; if($oObject->iId && $aClean['sAction'] == "delete") $oObject->delete_entry();