objectManager: Cache object before checking if previewing should be allowed
This commit is contained in:
committed by
Chris Morgan
parent
cdee3a77e9
commit
c33d8a382e
@@ -331,6 +331,8 @@ class ObjectManager
|
|||||||
else
|
else
|
||||||
$oObject->outputEditor();
|
$oObject->outputEditor();
|
||||||
|
|
||||||
|
$this->oObject = $oObject;
|
||||||
|
|
||||||
/* if this is a queue add a dialog for replying to the submitter of the
|
/* if this is a queue add a dialog for replying to the submitter of the
|
||||||
queued entry */
|
queued entry */
|
||||||
if($this->bIsQueue || ($oObject->objectGetSubmitterId() && $oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId))
|
if($this->bIsQueue || ($oObject->objectGetSubmitterId() && $oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId))
|
||||||
@@ -778,6 +780,7 @@ class ObjectManager
|
|||||||
else
|
else
|
||||||
$oObject->outputEditor();
|
$oObject->outputEditor();
|
||||||
|
|
||||||
|
$this->oObject = $oObject;
|
||||||
echo "<div align=\"center\">";
|
echo "<div align=\"center\">";
|
||||||
echo "<input type=\"submit\" class=\"button\" value=\"Submit\" ".
|
echo "<input type=\"submit\" class=\"button\" value=\"Submit\" ".
|
||||||
"name=\"sSubmit\" />\n";
|
"name=\"sSubmit\" />\n";
|
||||||
@@ -790,7 +793,7 @@ class ObjectManager
|
|||||||
|
|
||||||
private function handle_preview_button()
|
private function handle_preview_button()
|
||||||
{
|
{
|
||||||
$oObject = new $this->sClass($this->iId);
|
$oObject = $this->getObject();
|
||||||
|
|
||||||
if(!method_exists($oObject, "objectShowPreview"))
|
if(!method_exists($oObject, "objectShowPreview"))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user