From f484142413aa0308054bef023d07171ca1f0276a Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 4 Mar 2025 21:51:00 +0800 Subject: [PATCH] * [bug #59426] update order for creating doc lib. --- module/doc/model.php | 1 + module/doc/zen.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index 41d964e28c..10bd1ec006 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -353,6 +353,7 @@ class docModel extends model } $libID = $this->docTao->doInsertLib($lib, $this->config->doc->createlib->requiredFields); + $this->dao->update(TABLE_DOCLIB)->set('`order`')->eq($libID)->where('id')->eq($libID)->exec(); if(dao::isError()) return false; return $libID; } diff --git a/module/doc/zen.php b/module/doc/zen.php index edd8298c54..3637ffad7d 100644 --- a/module/doc/zen.php +++ b/module/doc/zen.php @@ -284,7 +284,7 @@ class docZen extends doc $this->action->create('docLib', $libID, 'Created'); if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $libID)); - $lib = array('id' => $libID, 'name' => $libName, 'space' => (int)$objectID, 'orderBy' => $orderBy); + $lib = array('id' => $libID, 'name' => $libName, 'space' => (int)$objectID, 'orderBy' => $orderBy, 'order' => $libID); if(isset($diffExecution) && $diffExecution === true) {