diff --git a/module/doc/control.php b/module/doc/control.php index 6aec9fb045..3b4a5de89b 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -369,7 +369,7 @@ class doc extends control public function view($docID) { /* Get doc. */ - $doc = $this->doc->getById($docID); + $doc = $this->doc->getById($docID, true); if(!$doc) die(js::error($this->lang->notFound) . js::locate('back')); if($doc->project != 0 and !$this->project->checkPriv($this->project->getById($doc->project))) { diff --git a/module/doc/model.php b/module/doc/model.php index ab944be65c..780b43a2dd 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -138,17 +138,18 @@ class docModel extends model * Get doc info by id. * * @param int $docID + * @param bool $setImgSize * @access public * @return void */ - public function getById($docID) + public function getById($docID, $setImgSize = false) { $doc = $this->dao->select('*') ->from(TABLE_DOC) ->where('id')->eq((int)$docID) ->fetch(); if(!$doc) return false; - $doc->content = $this->loadModel('file')->setImgSize($doc->content); + if($setImgSize) $doc->content = $this->loadModel('file')->setImgSize($doc->content); $doc->files = $this->loadModel('file')->getByObject('doc', $docID); $doc->libName = ''; diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index 368263e1e3..a29096b424 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -11,13 +11,6 @@ */ ?> -
| doc->keywords;?> | keywords;?> |
|---|---|
| doc->url;?> | url), '', '_blank');?> |
| doc->content;?> | content;?> | doc->digest;?> | digest);?> | -
| files;?> | fetch('file', 'printFiles', array('files' => $doc->files, 'fieldset' => 'false'));?> |