* Code for task #86270.

This commit is contained in:
wangxuepeng
2023-03-10 05:34:34 +00:00
parent 0f6839155d
commit a5e86054e3
8 changed files with 73 additions and 85 deletions
+29 -26
View File
@@ -584,41 +584,44 @@ class group extends control
}
}
/**
* edit priv
*
* edit priv
* @param int $privID
* @access public
* @return void
*
*
**/
public function editPriv($privID)
{
$privID = intval($privID);
$currentLang = $this->app->clientLang ? : 'zh-cn';
$priv = $this->group->getPrivInfo($privID,$currentLang);
if(!empty($_POST))
{
$responseResult = "success";
$responseMeessage = $this->lang->saveSuccess;
$locate = "parent";
$this->group->updatePrivLang($privID,$currentLang);
if(dao::isError())
$privID = intval($privID);
$currentLang = $this->app->clientLang ? : 'zh-cn';
$priv = $this->group->getPrivInfo($privID, $currentLang);
if(!$priv)
{
return print(js::alert($this->lang->group->noneProject));
}
if(!empty($_POST))
{
$responseResult = "fail";
$responseMessage = dao::getError();
$locate = "";
$responseResult = "success";
$responseMeessage = $this->lang->saveSuccess;
$locate = "parent";
$this->group->updatePrivLang($privID, $currentLang);
$actionID = $this->loadModel('action')->create('privlang', $privID, 'Edited');
if(dao::isError())
{
$responseResult = "fail";
$responseMessage = dao::getError();
$locate = "";
}
$this->send(array('result' => $responseResult, 'message' => $responseMessage, 'locate' => $locate));
}
$this->send(array('result'=>$responseResult,'message'=>$responseMessage,'locate'=>$locate));
}
$this->view->modulePackage = $this->group->getModuleAndPackageTree();
if($priv)
{
$this->view->priv = $priv;
$this->display();
}
$this->view->modulePackage = $this->group->getModuleAndPackageTree();
$this->view->priv = $priv;
$this->display();
}
}