/**
  * 更新保留字操作
  * @param HttpRequest $request
  */
 public function update(HttpRequest $request)
 {
     $data = $request->getParameter('data');
     $data['edit_time'] = time();
     $data['edit_user'] = $this->loginUser["id"];
     parent::update($data, $request);
 }
 /**
  * 更新菜单分组操作
  * @param HttpRequest $request
  */
 public function update(HttpRequest $request)
 {
     $data = $request->getParameter('data');
     $tkeyBak = $request->getParameter('tkey_bak');
     //修改了tkey需要重新验证
     if ($tkeyBak != trim($data['tkey'])) {
         $this->checkField('tkey', $data['tkey']);
     }
     parent::update($data, $request);
 }
Exemplo n.º 3
0
 /**
  * 更新管理员操作
  * @param HttpRequest $request
  */
 public function update(HttpRequest $request)
 {
     $data = $request->getParameter('data');
     $password = $request->getParameter('password', 'trim');
     if ($password != '') {
         $password = md5(md5($password));
         $data['password'] = $password;
     }
     parent::update($data, $request);
 }
Exemplo n.º 4
0
 /**
  * 更新角色操作
  * @param HttpRequest $request
  */
 public function update(HttpRequest $request)
 {
     $data = $request->getParameter('data');
     parent::update($data, $request);
 }
 /**
  * 更新文章
  * @param HttpRequest $request
  */
 public function update(HttpRequest $request)
 {
     $data = $request->getParameter('data');
     $data['update_time'] = time();
     //是否定时发布
     $publish = $request->getParameter('publish');
     if ($publish == 0) {
         $data['publish_time'] = strtotime($request->getParameter('publish_time', 'trim'));
         //更改审核状态
         $data['ischeck'] = 0;
     } else {
         $data['publish_time'] = 0;
         $data['ischeck'] = 1;
     }
     //如果有标签则先插入标签
     $tag_bak = $request->getParameter('tag_bak', 'trim');
     if (trim($data['tags']) != $tag_bak) {
         $tagService = Beans::get('article.tags.service');
         $tags = explode(',', $data['tags']);
         $tagIds = array();
         foreach ($tags as $value) {
             $id = $tagService->add(array('name' => $value));
             if ($id > 0) {
                 $tagIds[] = $id;
             }
         }
         $data['tags'] = implode(',', $tagIds);
         //不更改标签
     } else {
         unset($data['tags']);
     }
     parent::update($data, $request);
 }
 /**
  * 更新显示位操作
  * @param HttpRequest $request
  */
 public function update(HttpRequest $request)
 {
     $data = $request->getParameter('data');
     $posBak = $request->getParameter('pos_bak', 'trim');
     //更改了position重新认证
     if ($posBak != $data['position']) {
         $this->checkField('position', $data['position']);
     }
     parent::update($data, $request);
 }