* finish task #2840.

This commit is contained in:
wangyidong
2017-01-09 09:47:06 +08:00
parent cd25a4216e
commit 77b8cb76f8
+5 -1
View File
@@ -99,7 +99,7 @@ class docModel extends model
*/
public function getLibByObject($type, $objectID)
{
return $this->dao->select('*')->from(TABLE_DOCLIB)->where($type)->eq($objectID)->fetchAll('id');
return $this->dao->select('*')->from(TABLE_DOCLIB)->where($type)->eq($objectID)->andWhere('deleted')->eq('0')->fetchAll('id');
}
/**
@@ -316,6 +316,8 @@ class docModel extends model
if(!$this->checkPriv($doc))
{
echo(js::alert($this->lang->doc->accessDenied));
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
die(js::locate('back'));
}
$version = $version ? $version : $doc->version;
@@ -1173,6 +1175,8 @@ class docModel extends model
if(!$this->checkPriv($lib))
{
echo(js::alert($this->lang->doc->accessDenied));
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
die(js::locate('back'));
}