迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發框架,基于MIT開源許可協議發布,免費且不限制商業使用,是免費開源的產品,以萬端互聯為設計理念,支持的微信公眾號、小程序、APP客戶端、移動端網站、PC網站等多終端式管理系統。
聯系官方銷售客服
1835022288
028-61286886
模塊表單添加內容時候修改錄入作者賬號,按照模塊主信息,可以修改掉uid。但是模塊表單僅僅是修改掉author字段,uid字段沒有被更新。
建議可以同步修改。 這樣表單應用可以更靈活。
D_Admin_Form.php
if (IS_POST) { // 設置uid便于校驗處理 $uid = $this->input->post('data[author]') ? get_member_id($this->input->post('data[author]')) : 0; $post = $this->validate_filter($this->field, $data); if (isset($post['error'])) { $error = $post; $data = $this->input->post('data', TRUE); } else { $post[1]['cid'] = $post[0]['cid'] = $this->cid; $post[1]['uid'] = $post[0]['uid'] = $uid; $post[1]['url'] = $this->cdata['url']; $post[1]['title'] = $this->cdata['title']; $post[1]['subject'] = $this->cdata['title']; $post[1]['inputip'] = $this->input->ip_address(); $post[1]['inputtime'] = SYS_TIME; $table = SITE_ID.'_'.APP_DIR.'_form_'.$this->fid; if ($id = $this->_add($table, $post)) { // 操作成功處理附件 $this->attachment_handle($this->uid, $this->db->dbprefix($this->table).'-'.$id, $this->form['field']); $this->admin_msg(fc_lang('操作成功,正在刷新...'), dr_url(APP_DIR.'/'.$this->router->class.'/index', array('cid' => $this->cid)), 1); } else { $this->admin_msg(fc_lang('操作失敗')); } }
$uid = $this->input->post('data[author]') ? get_member_id($this->input->post('data[author]')) : 0; 增加關聯查詢。
$post[1]['uid'] = $post[0]['uid'] = $uid; 修改為查詢得到的UID。
冒失修改表單相應錄入者和UID也存在問題。
畢竟后臺還需要靈活,前臺則無需。
D_Admin_Form.php
$uid = $this->input->post('data[author]') ? get_member_id($this->input->post('data[author]')) : 0; 增加關聯查詢。
$post[1]['uid'] = $post[0]['uid'] = $uid; 修改為查詢得到的UID。
冒失修改表單相應錄入者和UID也存在問題。
畢竟后臺還需要靈活,前臺則無需。