diff --git a/module/doc/control.php b/module/doc/control.php index 7efa8d6cdf..9abd9fffde 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -851,23 +851,15 @@ class doc extends control */ public function objectLibs($type, $objectID) { - $from = $this->app->openApp; - setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true); + // setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true); $this->session->set('docList', $this->app->getURI(true)); $table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT; $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->project)); - $from = $this->app->openApp; - if($from == 'execution') - { - $this->execution->setMenu($objectID); - } - else - { - $this->loadModel($from)->setMenu($objectID); - } + $openApp = $this->app->openApp; + if($openApp != 'doc') $this->loadModel($openApp)->setMenu($objectID); /* Set Custom. */ foreach(explode(',', $this->config->doc->customObjectLibs) as $libType) $customObjectLibs[$libType] = $this->lang->doc->customObjectLibs[$libType]; @@ -883,7 +875,6 @@ class doc extends control $this->view->type = $type; $this->view->object = $object; - $this->view->from = $from; $this->view->libs = $this->doc->getLibsByObject($type, $objectID); $this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable. $this->display(); diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index 8d59d06fde..9788f087ea 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -12,10 +12,10 @@ ?> doc->appendNavCSS();?> -from == 'execution'):;?> +openApp == 'execution'):;?> -