From: Gunnar Wrobel Date: Fri, 26 Jun 2009 07:24:36 +0000 (+0200) Subject: Refresh the buttons after an action has been performed. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2f8f48f32238ada85c82c8e2949dce4c986994dc;p=horde.git Refresh the buttons after an action has been performed. --- diff --git a/koward/lib/Koward/Controller/ObjectController.php b/koward/lib/Koward/Controller/ObjectController.php index 463c407e6..7a703585d 100644 --- a/koward/lib/Koward/Controller/ObjectController.php +++ b/koward/lib/Koward/Controller/ObjectController.php @@ -181,9 +181,17 @@ class ObjectController extends Koward_Controller_Application exit; } else if ($this->actions->validate()) { $action = $this->actions->execute(); - //FIXME: Hack + //FIXME: Hack $result = $this->object->$action(); + // Refresh the object view + $this->actions = null; + $this->object = $this->koward->getObject($this->params->id); + $buttons = $this->_getButtons($this->object, $this->object_type); + if (!empty($buttons)) { + $this->actions = new Koward_Form_Actions($this->object, $buttons); + } + $this->action_url = $this->urlFor(array('controller' => 'object', 'action' => 'view', 'id' => $this->params->id,