* [bug#63710] Add the data of built-in when enter template home.

This commit is contained in:
xieqiyu
2025-06-26 02:17:41 +00:00
parent 3181fea8b9
commit a9fbb58cbe
2 changed files with 10 additions and 10 deletions
+10
View File
@@ -586,6 +586,16 @@ class doc extends control
*/
public function browseTemplate(int $libID = 0, string $type = 'all', int $docID = 0, string $orderBy = 'id_desc', int $recPerPage = 20, int $pageID = 1, string $mode = 'home')
{
/* 添加内置的范围、分类、文档模板。*/
/* Add the built-in scopes and type and doc template. */
$builtInScopes = $this->dao->select('id')->from(TABLE_DOCLIB)->where('type')->eq('template')->andWhere('main')->eq('1')->fetchAll();
if(empty($builtInScopes))
{
$this->doc->addBuiltInScopes();
$this->doc->addBuiltInDocTemplateType();
$this->doc->addBuiltInDocTemplateByType();
}
$this->lang->doc->menu->template['alias'] .= ',' . $this->app->rawMethod;
$libModules = $this->doc->getTemplateModules($libID);
if($mode == 'create' && empty($libModules)) return $this->send(array('result' => 'success', 'load' => array('alert' => $this->lang->docTemplate->createTypeFirst)));
-10
View File
@@ -387,16 +387,6 @@ class install extends control
$this->install->enableCache();
/* 添加内置的范围、分类、文档模板。*/
/* Add the built-in scopes and type and doc template. */
if($this->config->edition == 'max' || $this->config->edition == 'ipd')
{
$this->loadModel('doc');
$this->doc->addBuiltInScopes();
$this->doc->addBuiltInDocTemplateType();
$this->doc->addBuiltInDocTemplateByType();
}
return $this->send(array('result' => 'success', 'load' => inlink('step6')));
}