* Code for bug #34060.
This commit is contained in:
@@ -1142,12 +1142,11 @@ class doc extends control
|
||||
public function view($docID = 0, $version = 0, $appendLib = 0)
|
||||
{
|
||||
$doc = $this->doc->getById($docID);
|
||||
if(!$doc)
|
||||
if(!$doc or !isset($doc->id))
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
|
||||
return print(js::error($this->lang->notFound) . js::locate($this->inlink('index')));
|
||||
}
|
||||
if(!$this->doc->checkPrivDoc($doc)) return $this->accessDenied();
|
||||
|
||||
$lib = $this->doc->getLibById($doc->lib);
|
||||
if(!empty($lib) and $lib->deleted == '1') $appendLib = $doc->id;
|
||||
|
||||
Reference in New Issue
Block a user