智能DIY官网程序远程附件修复
1.0.73
问题:多用户不能独立设置远程附件配置。
修改文件
lf_bddiy/core/modules/admin/models/core_setting/AttachmentConfigModel.php
第145 149 151行,("key","attachment")
$data = ["type" => $type, "qiniu" => $this->qiniu, "alioss" => $this->alioss]; $data = json_encode($data); $exists = CoreSetting::where("site_id", $this->site_id)->site($this->site_id)->exists(); $res = false; if ($exists) { $res = CoreSetting::where("site_id", $this->site_id)->site($this->site_id)->update(["value" => $data]); } else { $res = CoreSetting::create(["site_id" => $this->site_id, "value" => $data, "site_id" => $this->site_id]); } if ($res !== false) { return $this->getUploadConfig(); } else { return $this->arrError("更新失败!"); }
lf_bddiy/core/entities/CoreSetting.php
第18行 ,("key","attachment")
$val = self::where("site_id", $_SESSION['site_id'])->pluck("value"); $data = []; if (!empty($val)) { try { $data = json_decode($val, true); } catch (\Exception $e) { $data = []; }
扫描二维码推送至手机访问。
版权声明:本文由Mpg blog发布,如需转载请注明出处。