appdb/ ./objectManager.php include/objectManag ...

WineHQ wineowner at wine.codeweavers.com
Mon Apr 23 19:35:52 CDT 2007


ChangeSet ID:	31100
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/04/23 19:35:51

Modified files:
	.              : objectManager.php 
	include        : objectManager.php 

Log message:
	Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
	Support silent input checking. checkOutputEditorInput() can now return TRUE instead of a
	list of errors

Patch: http://cvs.winehq.org/patch.py?id=31100

Old revision  New revision  Changes     Path
 1.7           1.8           +0 -2       appdb/objectManager.php
 1.16          1.17          +7 -0       appdb/include/objectManager.php

Index: appdb/objectManager.php
diff -u -p appdb/objectManager.php:1.7 appdb/objectManager.php:1.8
--- appdb/objectManager.php:1.7	24 Apr 2007  0:35:51 -0000
+++ appdb/objectManager.php	24 Apr 2007  0:35:51 -0000
@@ -58,8 +58,6 @@ $oOtherObject = new $oObject->sClass($oO
    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();
Index: appdb/include/objectManager.php
diff -u -p appdb/include/objectManager.php:1.16 appdb/include/objectManager.php:1.17
--- appdb/include/objectManager.php:1.16	24 Apr 2007  0:35:52 -0000
+++ appdb/include/objectManager.php	24 Apr 2007  0:35:52 -0000
@@ -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 "<font color=\"red\">\n";
             echo "The following errors were found<br />\n";
             echo "<ul>$sErrors</ul>\n";



More information about the wine-cvs mailing list