国内外主机
测评及优惠码

杰奇2.4,后台采集规则不能删除的bug修复

文件: /modules/article/admin/collectset.php

  • 1.将文件最后的这段代码
if ($updateconfig) {
    jieqi_setconfigs('collectsite', 'jieqiCollectsite', $jieqiCollectsite, JIEQI_MODULE_NAME);
    if (file_exists(JIEQI_ROOT_PATH . '/configs/article/site_' . $_REQUEST['config'] . '.php')) {
        jieqi_delfile(JIEQI_ROOT_PATH . '/configs/article/site_' . $_REQUEST['config'] . '.php');
    }
}
  • 2.放到这里来
if (isset($_POST['act']) && $_POST['act'] == 'del' && !empty($_REQUEST['config']) && preg_match('/^\\w+$/', $_REQUEST['config'])) {
    jieqi_checkpost();
    foreach ($jieqiCollectsite as $k => $v) {
        if ($v['config'] == $_REQUEST['config']) {
            unset($jieqiCollectsite[$k]);
            $updateconfig = true;
            break;
        }
    }

//代码插入的位置 17-18 行附近

    jieqi_jumppage($jieqiModules['article']['url'] . '/admin/collectset.php', '', '', true);
}
  • 3.完成状态
if (isset($_POST['act']) && $_POST['act'] == 'del' && !empty($_REQUEST['config']) && preg_match('/^\\w+$/', $_REQUEST['config'])) {
    jieqi_checkpost();
    foreach ($jieqiCollectsite as $k => $v) {
        if ($v['config'] == $_REQUEST['config']) {
            unset($jieqiCollectsite[$k]);
            $updateconfig = true;
            break;
        }
    }

//插入代码开始
if ($updateconfig) {
    jieqi_setconfigs('collectsite', 'jieqiCollectsite', $jieqiCollectsite, JIEQI_MODULE_NAME);
    if (file_exists(JIEQI_ROOT_PATH . '/configs/article/site_' . $_REQUEST['config'] . '.php')) {
        jieqi_delfile(JIEQI_ROOT_PATH . '/configs/article/site_' . $_REQUEST['config'] . '.php');
    }
}
//插入代码结束

    jieqi_jumppage($jieqiModules['article']['url'] . '/admin/collectset.php', '', '', true);
}
赞(0)
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《杰奇2.4,后台采集规则不能删除的bug修复》
文章链接:https://www.ibytx.com/242.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。

评论 抢沙发

评论前必须登录!

 

'); })();