From 7e7af669a53db57143328ffdeb67fb12872ee70e Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 2 Apr 2021 14:58:12 +0800 Subject: [PATCH] * Fix doc. --- module/doc/control.php | 9 ++++++--- module/doc/model.php | 17 +++++++++-------- module/doc/view/createlib.html.php | 2 +- module/doc/view/editlib.html.php | 4 ++-- module/doc/view/side.html.php | 6 +++--- module/tree/control.php | 1 + 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 2875d23931..df386e6754 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -259,7 +259,10 @@ class doc extends control $actionID = $this->action->create('docLib', $libID, 'edited'); $this->action->logHistory($actionID, $changes); } - die(js::locate($this->createLink($this->moduleName, 'browse', "libID=$libID"), 'parent.parent')); + $response['message'] = $this->lang->saveSuccess; + $response['result'] = 'success'; + $response['locate'] = 'parent'; + $this->send($response); } $lib = $this->doc->getLibByID($libID); @@ -294,7 +297,7 @@ class doc extends control if(!empty($lib->main)) die(js::alert($this->lang->doc->errorMainSysLib)); $this->doc->delete(TABLE_DOCLIB, $libID); - die(js::locate($this->createLink('doc', 'browse'), 'parent')); + die(js::locate($this->createLink('doc', 'index'), 'parent')); } } @@ -947,7 +950,7 @@ class doc extends control $this->view->type = $type; $this->view->object = $object; $this->view->libID = $libID; - $this->view->lib = $libs[$libID]; + $this->view->lib = isset($libs[$libID]) ? $libs[$libID] : array(); $this->view->libs = $this->doc->getLibsByObject($type, $objectID); $this->view->moduleTree = $moduleTree; $this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable. diff --git a/module/doc/model.php b/module/doc/model.php index ec23f1a568..c7b65b08e1 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1857,7 +1857,6 @@ EOF; if(empty($objects)) return ''; $output = ''; - $dropMenuLink = helper::createLink('repo', 'ajaxGetDropMenu'); $output = "