From 8754aa0dc1172a6a3e7af3d16bacfc9bc9b62841 Mon Sep 17 00:00:00 2001 From: Yagami Date: Thu, 11 Oct 2018 17:02:51 +0800 Subject: [PATCH] * Adjust doc orderby. --- module/doc/control.php | 2 +- module/tree/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 5b30917108..ed66dc1586 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -143,7 +143,7 @@ class doc extends control if($module) $title = $module->name; if($libID) $title = $this->libs[$libID]; if(in_array($browseType, array_keys($this->lang->doc->fastMenuList))) $title = $this->lang->doc->fastMenuList[$browseType]; - if($param) $title = $this->doc->buildBreadTitle($libID, $param, $title); + if($param != 0) $title = $this->doc->buildBreadTitle($libID, $param, $title); if($browseType == 'fastsearch') { if($this->post->searchDoc) $this->session->set('searchDoc', $this->post->searchDoc); diff --git a/module/tree/model.php b/module/tree/model.php index 247a73c14d..bcd72dfb92 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1644,7 +1644,7 @@ class treeModel extends model */ public function getDocStructure() { - $stmt = $this->dbh->query($this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('doc')->andWhere('deleted')->eq(0)->get()); + $stmt = $this->dbh->query($this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('doc')->andWhere('deleted')->eq(0)->orderBy('id_desc')->get()); $parent = array(); while($module = $stmt->fetch()) {