|
插件安装后Discuz会删除Xml文件
当你通过Discuz后台云系统安装完插件以后,系统会调用 source/admincp/admincp_plugins.php 文件进行删除相关的语言安装XML. 我们需要做如下修改进行保留
- //中425行注释即可
- //cloudaddons_clear('plugin', $dir);
- //实际函数实现内容
- function cloudaddons_clear($type, $id)
- {
- global $_G;
- if (isset($_G['config']['plugindeveloper']) && $_G['config']['plugindeveloper']
- > 0) {
- return;
- }
- $dirs = array('plugin' => array('plugin', './source/plugin/'), 'template' => array('style', './template/'));
- if ($dirs[$type]
- && cloudaddons_getmd5($id . '.' . $type)) {
- $entrydir = DISCUZ_ROOT . $dirs[$type][1]
- . $id;
- $d = dir($entrydir);
- $filedeleted = false;
- while ($f = $d->read()) {
- if (preg_match('/^discuz_' . $dirs[$type][0]
- . '_' . $id . '(_w+)?.xml$/', $f)) {
- @unlink($entrydir . '/' . $f);
- if ($type == 'plugin' && !$filedeleted) {
- @unlink($entrydir . '/' . $f);
- $importtxt = @implode('', file($entrydir . '/' . $f));
- $pluginarray = getimportdata('Discuz! Plugin');
- if ($pluginarray['installfile']) {
- @unlink($entrydir . '/' . $pluginarray['installfile']);
- }
- if ($pluginarray['upgradefile']) {
- @unlink($entrydir . '/' . $pluginarray['upgradefile']);
- }
- $filedeleted = true;
- }
- }
- }
- }
- }
复制代码
Discuz开启注册表单更多选项后,用户注册依然可以乱填(性别依然为空)
看了下代码这真心的让人很无语
- //source/function/function_profile.php function profile_check
- //214行
- if(in_array($fieldid, array('birthday', 'birthmonth', 'birthyear', 'gender'))) {
- $value = intval($value); return true;
- } elseif(in_array($fieldid, array('birthprovince', 'birthcity', 'birthdist', 'birthcommunity', 'resideprovince', 'residecity', 'residedist', 'residecommunity'))) {
- $value = getstr($value);
- return true;
- }
复制代码
Discuz! X3.2 R20150609 发布,但没有走后台通知更新发布功能
补丁包下载(适合 X3.2 任意版本)
简体中文 GBK http://download.comsenz.com/DiscuzX/3.2/patch/DX32R20150609SCGBK.zip
繁体中文 BIG5 http://download.comsenz.com/DiscuzX/3.2/patch/DX32R20150609TCBIG5.zip
简体 UTF8 http://download.comsenz.com/DiscuzX/3.2/patch/DX32R20150609SCUTF8.zip
繁体 UTF8 http://download.comsenz.com/DiscuzX/3.2/patch/DX32R20150609TCUTF8.zip
升级方法
1. 根据原有的语言版本下载升级包
2. 解压缩, 将目录中的文件上传至服务器, 覆盖旧文件
3. 使用创始人身份进入后台更新缓存 更新记录
|
|