* adjust for show image.

This commit is contained in:
wangyidong
2021-07-13 14:10:27 +08:00
parent e2f6101340
commit 637acf434a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -534,7 +534,7 @@ class docModel extends model
->join('mailto', ',')
->remove('comment,files,labels,uid,contactListMenu')
->get();
$doc = $this->loadModel('file')->processImgURL($doc, $this->config->doc->editor->edit['id'], $this->post->uid);
if($doc->contentType == 'markdown') $doc->content = $this->post->content;
if(!empty($doc->acl) and $doc->acl == 'private') $doc->users = $oldDoc->addedBy;
+2 -2
View File
@@ -30,7 +30,7 @@ $sessionString .= session_name() . '=' . session_id();
var url = createLink('file', 'download', 'fileID=' + fileID + '&mouse=left') + sessionString;
var width = (windowWidth > imageWidth) ? ((imageWidth < windowWidth * 0.5) ? windowWidth * 0.5 : imageWidth) : windowWidth;
var checkExtension = fileTitle.lastIndexOf('.' + extension) == (fileTitle.length - extension.length - 1);
if(fileTypes.indexOf(extension) >= 0 && checkExtension)
if(fileTypes.indexOf(extension) >= 0 && checkExtension && config.onlybody != 'yes')
{
$('<a>').modalTrigger({url: url, type: 'iframe', width: width}).trigger('click');
}
@@ -80,7 +80,7 @@ $sessionString .= session_name() . '=' . session_id();
}
echo "<li title='{$uploadDate}'>" . html::a($this->createLink('file', 'download', "fileID=$file->id") . $sessionString, $fileTitle . " <span class='text-muted'>({$fileSize})</span>", '_blank', "onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\"");
$objectType = zget($this->config->file->objectType, $file->objectType);
$objectType = zget($this->config->file->objectType, $file->objectType);
if(common::hasPriv($objectType, 'edit', $object))
{
echo "<span class='right-icon'>&nbsp; ";