From 4c7699178a1d6762caba5165fae078b068c3f683 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 27 Jul 2022 08:48:42 +0800 Subject: [PATCH] * Modify the object id equal zero for custom type doc. --- module/doc/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 43dfae32a8..905867ad55 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -316,7 +316,7 @@ class doc extends control $this->action->create('doc', $docID, 'Created', $fileAction); if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $docID)); - $objectID = zget($lib, $lib->type, ''); + $objectID = zget($lib, $lib->type, 0); $params = "type={$lib->type}&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id']; $link = isonlybody() ? 'parent' : $this->createLink('doc', 'objectLibs', $params, 'html') . '#app=' . $this->app->tab; $response = array('result' => 'success', 'message' => $this->lang->saveSuccess); @@ -376,7 +376,7 @@ class doc extends control $this->view->title = $libName . $this->lang->doc->create; $this->view->objectType = $objectType; - $this->view->objectID = zget($lib, $lib->type, ''); + $this->view->objectID = zget($lib, $lib->type, 0); $this->view->libID = $libID; $this->view->lib = $lib; $this->view->libs = $libs; @@ -508,7 +508,7 @@ class doc extends control $this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted', $doc->users); $this->view->from = $from; $this->view->files = $this->loadModel('file')->getByObject('doc', $docID); - $this->view->objectID = zget($lib, $type, ''); + $this->view->objectID = zget($lib, $type, 0); $this->display(); }