Esempio n. 1
0
 public function gallery_edit_info()
 {
     try {
         $this->throwMsgCheck('is_post', 'is_login', 'is_active');
         lib()->load('Gallery');
         $req = req()->_plain();
         $g = new Gallery($req->post('gallery_id'), login_user()->getId());
         $g->edit_info($req->post('gallery_title'), $req->post('gallery_description'), $req->post('gallery_comment_status'));
         $meta = req()->post('meta');
         if (is_array($meta) && count($meta) > 0) {
             $g->set_meta_info($meta);
         }
         $g->updated();
         $this->rt_msg['status'] = true;
     } catch (\Exception $ex) {
         $this->rt_msg['msg'] = $ex->getMessage();
         $this->rt_msg['code'] = $ex->getCode();
     }
 }