Module: appdb Branch: master Commit: c33d8a382e8a2748929ac2a186636f561cecbe72 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=c33d8a382e8a2748929ac2a18... Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Mon Oct 22 18:28:48 2007 +0200 objectManager: Cache object before checking if previewing should be allowed --- include/objectManager.php | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/objectManager.php b/include/objectManager.php index 249dc69..d888f05 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -331,6 +331,8 @@ class ObjectManager else $oObject->outputEditor(); + $this->oObject = $oObject; + /* if this is a queue add a dialog for replying to the submitter of the queued entry */ if($this->bIsQueue || ($oObject->objectGetSubmitterId() && $oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId)) @@ -778,6 +780,7 @@ class ObjectManager else $oObject->outputEditor(); + $this->oObject = $oObject; echo "<div align=\"center\">"; echo "<input type=\"submit\" class=\"button\" value=\"Submit\" ". "name=\"sSubmit\" />\n"; @@ -790,7 +793,7 @@ class ObjectManager private function handle_preview_button() { - $oObject = new $this->sClass($this->iId); + $oObject = $this->getObject(); if(!method_exists($oObject, "objectShowPreview")) return;