* adjust for notice when view deny doc.
This commit is contained in:
@@ -100,8 +100,7 @@ $lang->doc->errorEditSystemDoc = "System Doc Lib needs no modifications.";
|
||||
$lang->doc->errorEmptyProduct = "No {$lang->productCommon}. Document cannot be created.";
|
||||
$lang->doc->errorEmptyProject = "No {$lang->projectCommon}. Document cannot be created.";
|
||||
$lang->doc->errorMainSysLib = "Can not delete this library.";
|
||||
$lang->doc->accessDenied = "Access to library denied!";
|
||||
$lang->doc->noMatched = "No library including '%s' can be found.";
|
||||
$lang->doc->accessDenied = "Access denied!";
|
||||
$lang->doc->versionNotFount = 'The document is not exist in this version.';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
|
||||
@@ -100,8 +100,7 @@ $lang->doc->errorEditSystemDoc = "系统文档库无需修改。";
|
||||
$lang->doc->errorEmptyProduct = "没有{$lang->productCommon},无法创建文档";
|
||||
$lang->doc->errorEmptyProject = "没有{$lang->projectCommon},无法创建文档";
|
||||
$lang->doc->errorMainSysLib = "该系统文档库不能删除!";
|
||||
$lang->doc->accessDenied = "您没有权限访问该文档库!";
|
||||
$lang->doc->noMatched = '找不到包含"%s"的文档库';
|
||||
$lang->doc->accessDenied = "您没有权限访问!";
|
||||
$lang->doc->versionNotFount = '该版本文档不存在';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
|
||||
@@ -45,7 +45,7 @@ class docModel extends model
|
||||
foreach($libs as $lib)
|
||||
{
|
||||
if($lib->product) $productIdList[] = $lib->product;
|
||||
if($lib->project) $productIdList[] = $lib->project;
|
||||
if($lib->project) $projectIdList[] = $lib->project;
|
||||
}
|
||||
}
|
||||
$products = $productIdList ? $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->in($productIdList)->fetchPairs('id', 'name') : array();
|
||||
@@ -312,7 +312,12 @@ class docModel extends model
|
||||
public function getById($docID, $version = 0, $setImgSize = false)
|
||||
{
|
||||
$doc = $this->dao->select('*')->from(TABLE_DOC)->where('id')->eq((int)$docID)->fetch();
|
||||
if(!$doc or !$this->checkPriv($doc)) return false;
|
||||
if(!$doc) return false;
|
||||
if(!$this->checkPriv($doc))
|
||||
{
|
||||
echo(js::alert($this->lang->doc->accessDenied));
|
||||
die(js::locate('back'));
|
||||
}
|
||||
$version = $version ? $version : $doc->version;
|
||||
$docContent = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->eq($doc->id)->andWhere('version')->eq($version)->fetch();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user