diff --git a/module/doc/model.php b/module/doc/model.php index 2a8b4aef81..942516d49f 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -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; diff --git a/module/file/view/printfiles.html.php b/module/file/view/printfiles.html.php index e4c7c2a783..73773b0bad 100644 --- a/module/file/view/printfiles.html.php +++ b/module/file/view/printfiles.html.php @@ -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') { $('').modalTrigger({url: url, type: 'iframe', width: width}).trigger('click'); } @@ -80,7 +80,7 @@ $sessionString .= session_name() . '=' . session_id(); } echo "
  • " . html::a($this->createLink('file', 'download', "fileID=$file->id") . $sessionString, $fileTitle . " ({$fileSize})", '_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 "  ";