From c33d8a382e8a2748929ac2a186636f561cecbe72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Mon, 22 Oct 2007 18:28:48 +0200 Subject: [PATCH] objectManager: Cache object before checking if previewing should be allowed --- include/objectManager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 "
"; echo "\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;