* [bug#57134,done,0.5h,0h] Check if the library ID is empty.
This commit is contained in:
@@ -327,7 +327,10 @@ class doc extends control
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$libID = (int)$this->post->lib;
|
||||
$libID = (int)$this->post->lib;
|
||||
|
||||
if(!$libID) return $this->send(array('result' => 'fail', 'message' => array('lib' => sprintf($this->lang->error->notempty, $this->lang->doc->lib))));
|
||||
|
||||
$doclib = $this->loadModel('doc')->getLibByID($libID);
|
||||
$canVisit = $this->docZen->checkPrivForCreate($doclib, $objectType);
|
||||
if(!$canVisit) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->accessDenied));
|
||||
|
||||
Reference in New Issue
Block a user