Ejemplo n.º 1
0
 /**
  * 更新内容
  * @param type $jump 是否跳转.当继承本类时,若不跳转,提交false
  * @param type $commit 是否提交事务.默认提交.若想继承者继续在本事务中操作,请提交false
  */
 public function action($jump = TRUE, $commit = TRUE)
 {
     $this->db()->transaction();
     $updateResult = \Model\Content::updateContent();
     if (!empty($_POST['back_url'])) {
         $url = base64_decode($_POST['back_url']);
     } else {
         $url = $this->url(GROUP . '-' . MODULE . '-index');
     }
     if ($commit === TRUE) {
         $this->db()->commit();
     }
     if ($jump === TRUE) {
         $this->success('更新内容成功', $url);
     }
 }
Ejemplo n.º 2
0
 /**
  * 更新内容
  * @param type $jump 是否跳转.当继承本类时,若不跳转,提交false
  * @param type $commit 是否提交事务.默认提交.若想继承者继续在本事务中操作,请提交false
  */
 public function action($jump = TRUE, $commit = TRUE)
 {
     $this->db()->transaction();
     $updateResult = \Model\Content::updateContent();
     if (!empty($_POST['back_url'])) {
         $url = $_POST['back_url'];
     } else {
         $url = '/d/manage';
     }
     if ($commit === TRUE) {
         $this->db()->commit();
     }
     if ($jump === TRUE) {
         $this->success('更新内容成功', $url);
     }
 }
Ejemplo n.º 3
0
 /**
  * 更新内容
  */
 public function action()
 {
     $this->db()->transaction();
     $updateResult = \Model\Content::updateContent();
     if ($updateResult['status'] == false) {
         $this->db()->rollBack();
         $this->error($updateResult['mes']);
     }
     $this->db()->commit();
     if (!empty($_POST['back_url'])) {
         $url = $_POST['back_url'];
     } else {
         $url = $this->url('Team-' . MODULE . '-index');
     }
     $this->success($GLOBALS['_LANG']['CONTENT']['UPDATE_CONTENT_SUCCESS'], $url);
 }