* adjust for task #49362.

This commit is contained in:
王怡栋
2022-03-01 10:28:53 +08:00
parent 5ee1c3e5e3
commit dad7a8236a
2 changed files with 9 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ $('#pageNav .btn-group #dropMenu .table-col .list-group a[href*="showFiles"]').r
</script>
<?php endif;?>
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff')):?>
<?php if(!empty($doc) and !$doc->deleted and $doc->version > 1 and common::hasPriv('doc', 'diff') and $config->edition != 'open'):?>
<?php
$versions = array();
$i = 1;

View File

@@ -516,12 +516,15 @@ class docModel extends model
/* When file change then version add one. */
$files = $this->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. */