From 42bfd75f5c13cb9d080eb8235cde876c798dfbe5 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 18 Jun 2024 10:15:36 +0800 Subject: [PATCH] * [bug#51144,done,0.2h] Determine if the document type is an Office type rather than a document library type. --- module/doc/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index fd0a3b2f77..7f39cf5017 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -963,7 +963,7 @@ class docModel extends model $requiredFields = $this->config->doc->create->requiredFields; if($doc->status == 'draft') $requiredFields = 'title'; - if(strpos("url|word|ppt|excel", $lib->type) !== false) $requiredFields = trim(str_replace(",content,", ",", ",{$requiredFields},"), ','); + if(strpos("url|word|ppt|excel", $doc->type) !== false) $requiredFields = trim(str_replace(",content,", ",", ",{$requiredFields},"), ','); $checkContent = strpos(",$requiredFields,", ',content,') !== false; if($checkContent && strpos("url|word|ppt|excel|", $lib->type) === false)