业务经理

微信扫描以上二维码

028-61286886

技术咨询

模块表单添加内容时候修改录入作者账号错误

开源系统 更新 2017-05-15 15:09:13 张贤亮

模块表单添加内容时候修改录入作者账号,按照模块主信息,可以修改掉uid。但是模块表单仅仅是修改掉author字段,uid字段没有被更新。


建议可以同步修改。  这样表单应用可以更灵活。

方案

  • 张贤亮 #1 · 2017-05-15 15:09:13
    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也存在问题。毕竟后台还需要灵活,前台则无需。

迅睿系统漏洞

GEO系统
GEO系统(2026-09-15)
运营客户端,防止误触阴影处关闭对话框
独立站群系统
独立站群系统(2026-09-14)
子站独立部署时修复同步附件失败问题
在线客服
在线客服(2026-09-13)
修复删除会话报错问题 删除会话时联动删除聊天图片
在线考试竞赛系统
在线考试竞赛系统(2026-09-12)
增加投票功能 考试功能拓展 注意:更新后需要执行系统更新,更新数...
网上信箱
网上信箱(2026-09-12)
修复新版本兼容问题
GeoSeo收录宝
GeoSeo收录宝(2026-09-12)
1 优化Update.php文件,解决版本在线升级不完整问题 2 ...
GeoSeo工具箱
GeoSeo工具箱(2026-09-11)
修正历史记录推送
微信系统
微信系统(2026-09-11)
增加数据统计总览界面 账号管理增加服务和公众号的区别 菜单管理支持更...
答题系统
答题系统(2026-09-11)
一站式在线答题系统,支持真题考试、题库练习和错题本,适合培训、考证、...
阿里云滑动验证码
阿里云滑动验证码(2026-09-10)
采用阿里云验证码替换迅睿系统自带的图片验证码和滑动验证码。后台设置方...