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()) {