* Set flow for custom doc menu.
This commit is contained in:
@@ -576,7 +576,8 @@ class doc extends control
|
||||
*/
|
||||
public function ajaxFixedMenu($libID, $type = 'fixed')
|
||||
{
|
||||
$customMenus = $this->loadModel('setting')->getItem("owner={$this->app->user->account}&module=common§ion=customMenu&key=doc");
|
||||
$customMenuKey = $this->config->global->flow . '_doc';
|
||||
$customMenus = $this->loadModel('setting')->getItem("owner={$this->app->user->account}&module=common§ion=customMenu&key={$customMenuKey}");
|
||||
if($customMenus) $customMenus = json_decode($customMenus);
|
||||
if(empty($customMenus))
|
||||
{
|
||||
@@ -604,7 +605,7 @@ class doc extends control
|
||||
$customMenu->order = count($customMenus);
|
||||
$customMenu->float = 'right';
|
||||
if($type == 'fixed') $customMenus[] = $customMenu;
|
||||
$this->setting->setItem("{$this->app->user->account}.common.customMenu.doc", json_encode($customMenus));
|
||||
$this->setting->setItem("{$this->app->user->account}.common.customMenu.{$customMenuKey}", json_encode($customMenus));
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,10 @@ class docModel extends model
|
||||
*/
|
||||
public function setMenu($libID = 0, $moduleID = 0, $crumb = '')
|
||||
{
|
||||
if(isset($this->config->customMenu->doc))
|
||||
$customMenuKey = $this->config->global->flow . '_doc';
|
||||
if(isset($this->config->customMenu->{$customMenuKey}))
|
||||
{
|
||||
$customMenu = json_decode($this->config->customMenu->doc, true);
|
||||
$customMenu = json_decode($this->config->customMenu->{$customMenuKey}, true);
|
||||
$menuLibIdList = array();
|
||||
foreach($customMenu as $i => $menu)
|
||||
{
|
||||
@@ -59,7 +60,7 @@ class docModel extends model
|
||||
$libName .= $lib->name;
|
||||
$customMenu[$i]['link'] = "{$libName}|doc|browse|libID={$menuLibID}";
|
||||
}
|
||||
$this->config->customMenu->doc = json_encode($customMenu);
|
||||
$this->config->customMenu->{$customMenuKey} = json_encode($customMenu);
|
||||
}
|
||||
|
||||
$this->app->loadLang('project');
|
||||
|
||||
Reference in New Issue
Block a user