From dad7a8236a67d0df5a3848a4cde9128871873d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Tue, 1 Mar 2022 10:28:53 +0800 Subject: [PATCH] * adjust for task #49362. --- .../lite/doc/ext/view/objectlibs.lite.html.hook.php | 2 +- module/doc/model.php | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php b/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php index 1ac68e29da..6ebc48b5f7 100644 --- a/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php +++ b/extension/lite/doc/ext/view/objectlibs.lite.html.hook.php @@ -10,7 +10,7 @@ $('#pageNav .btn-group #dropMenu .table-col .list-group a[href*="showFiles"]').r -deleted and $doc->version > 1 and common::hasPriv('doc', 'diff')):?> +deleted and $doc->version > 1 and common::hasPriv('doc', 'diff') and $config->edition != 'open'):?> loadModel('file')->getByObject('doc', $docID); $docFiles = array(); - foreach($files as $file) + if($docContent) { - $pathName = $this->file->getRealPathName($file->pathname); - $file->webPath = $this->file->webPath . $pathName; - $file->realPath = $this->file->savePath . $pathName; - if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file; + foreach($files as $file) + { + $pathName = $this->file->getRealPathName($file->pathname); + $file->webPath = $this->file->webPath . $pathName; + $file->realPath = $this->file->savePath . $pathName; + if(strpos(",{$docContent->files},", ",{$file->id},") !== false) $docFiles[$file->id] = $file; + } } /* Check file change. */