From 830feb8661691d92d21998bac754d8d363f7c663 Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 10 Dec 2024 17:11:19 +0800 Subject: [PATCH] * [story #70009] change default doc content type to "doc" from uploading local files. --- module/doc/model.php | 2 +- module/doc/ui/uploaddocs.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/doc/model.php b/module/doc/model.php index 766acba127..e3cd3db633 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1472,7 +1472,7 @@ class docModel extends model $docContent->files = ',' . $fileTitle->id; $docContent->title = $title; $docContent->content = ''; - $docContent->type = 'attachment'; + $docContent->type = isset($docContent->type) ? $docContent->type : 'attachment'; $docContent->digest = ''; $docContent->version = 1; $this->dao->insert(TABLE_DOCCONTENT)->data($docContent)->exec(); diff --git a/module/doc/ui/uploaddocs.html.php b/module/doc/ui/uploaddocs.html.php index 4f4237e858..823565a72f 100644 --- a/module/doc/ui/uploaddocs.html.php +++ b/module/doc/ui/uploaddocs.html.php @@ -162,5 +162,5 @@ formPanel ), formHidden('status', 'normal'), formHidden('type', $docType), - formHidden('contentType', 'html') + formHidden('contentType', 'doc') );