Support silent input checking. checkOutputEditorInput() can now return TRUE instead of a
list of errors
This commit is contained in:
committed by
WineHQ
parent
d03359ed2e
commit
f688be7c4d
@@ -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";
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user