找回密码
 立即注册

QQ登录

只需一步,快速开始

解决 Discuz!X3.4以下版本前台打开卡慢、后台登陆卡死或504错误等问题


打开:source/admincp/admincp_main.php

删除
  1. if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && ($_G['setting']['showpatchnotice'] == 1 || !isset($_G['cookie']['checkpatch']))) {
  2.         $discuz_patch = new discuz_patch();
  3.         if($_G['setting']['showpatchnotice'] == 1) {
  4.                 $notice = $discuz_patch->fetch_patch_notice();
  5.                 if($notice['data']) {
  6.                         $shownotice = '<div class="notice"><a href="'.$basescript.'?action=patch" id="notice">'.($notice['fixed'] ? $lang['patch_fix_complete'] : $lang['patch_fix_rigth_now']).'</a></div>';
  7.                 }
  8.         }
  9.         if(!isset($_G['cookie']['checkpatch'])) {
  10.                 $discuz_patch->check_patch();
  11.         }
  12. }
  13. if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !$shownotice && $_G['setting']['upgrade']) {
  14.         $shownotice = '<div class="notice"><a href="'.$basescript.'?action=upgrade" id="notice">'.$lang['upgrade_right_now'].'</a></div>';
  15. }
  16. if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !isset($_G['cookie']['checkupgrade'])) {
  17.         $discuz_upgrade = new discuz_upgrade();
  18.         if($discuz_upgrade->check_upgrade()) {
  19.                 if(empty($shownotice)) {
  20.                         $shownotice = '<div class="notice"><a href="'.$basescript.'?action=upgrade" id="notice">'.$lang['upgrade_right_now'].'</a></div>';
  21.                 }
  22.         }
  23.         dsetcookie('checkupgrade', 1, 7200);
  24. }
复制代码

前台也有影响管理员打开速度的
下载替换文件 source\module\misc\misc_patch.php
删除
  1. if($_G['uid'] && $_G['member']['allowadmincp'] == 1) {
  2.                 $discuz_patch = new discuz_patch();
  3.                 $discuz_patch->check_patch();
  4.         }
复制代码
  1. $patchlist = '';
  2.         if($_G['member']['allowadmincp'] == 1) {
  3.                 $discuz_patch = new discuz_patch();
  4.                 $patchnotice = $discuz_patch->fetch_patch_notice();
  5.                 if(!empty($patchnotice['data'])) {
  6.                         $lang = lang('forum/misc');
  7.                         $patchlist .= '<div class="bm'.($patchnotice['fixed'] ? ' allfixed' : '').'"><div class="bm_h cl"><a href="javascript:;" onclick="$(\'patch_notice\').style.display=\'none\'" class="y" title="'.$lang['patch_close'].'">'.$lang['patch_close'].'</a><h2 class="i">';
  8.                         if($patchnotice['fixed']) {
  9.                                 $patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_is_fixed'];
  10.                         } else {
  11.                                 $patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_need_fix'];
  12.                         }
  13.                         $patchlist .= '</h2></div><div class="bm_c"><table width="100%" class="mbm"><tr><th>'.$lang['patch_name'].'</th><th class="patchdate">'.$lang['patch_dateline'].'</th><th class="patchstat">'.$lang['patch_status'].'</th><tr>';
  14.                         foreach($patchnotice['data'] as $notice) {
  15.                                 $patchlist .= '<tr><td>'.$notice['serial'].'</td><td>'.dgmdate($notice['dateline'], 'Y-m-d').'</td><td>';
  16.                                 if($notice['status'] >= 1) {
  17.                                         $patchlist .= '<span class="fixed">'.$lang['patch_fixed_status'].'<span>';
  18.                                 } elseif($notice['status'] < 0) {
  19.                                         $patchlist .= '<span class="unfixed">'.$lang['patch_fix_failed_status'].'</span>';
  20.                                 } else {
  21.                                         $patchlist .= '<span class="unfixed">'.$lang['patch_unfix_status'].'</span>';
  22.                                 }
  23.                                 $patchlist .= '</td></tr>';
  24.                         }
  25.                         $patchlist .= '</table><p class="cl"><a href="admin.php?action=patch" class="y pn"><strong>'.($patchnotice['fixed'] ? $lang['patch_view_fix_detail'] : $lang['patch_fix_right_now']).'</strong></a></p>';
  26.                         $patchlist .= '</div></div>';
  27.                 }
  28.         }
复制代码
  1. echo $patchlist;
复制代码
  1. require_once libfile('function/admincp');
  2.         require_once libfile('function/plugin');
  3.         require_once libfile('function/cloudaddons');
  4.         $pluginarray = C::t('common_plugin')->fetch_all_data();
  5.         $addonids = $vers = array();
  6.         foreach($pluginarray as $row) {
  7.                 if(ispluginkey($row['identifier'])) {
  8.                         $addonids[] = $row['identifier'].'.plugin';
  9.                         $vers[$row['identifier'].'.plugin'] = $row['version'];
  10.                 }
  11.         }
  12.         $checkresult = dunserialize(cloudaddons_upgradecheck($addonids));
  13.         savecache('addoncheck_plugin', $checkresult);
  14.         $newversion = 0;
  15.         foreach($checkresult as $addonid => $value) {
  16.                 list(, $newver, $sysver) = explode(':', $value);
  17.                 if($sysver && $sysver > $vers[$addonid] || $newver) {
  18.                         $newversion++;
  19.                 }
  20.         }
复制代码
  1.         if($newversion) {
  2.                 $lang = lang('forum/misc');
  3.                 echo '<div class="bm"><div class="bm_h cl"><a href="javascript:;" onclick="$(\'plugin_notice\').style.display=\'none\';setcookie(\'pluginnotice\', 1, 86400)" class="y" title="'.$lang['patch_close'].'">'.$lang['patch_close'].'</a>';
  4.                 echo '<h2 class="i">'.$lang['plugin_title'].'</h2></div><div class="bm_c">';
  5.                 echo '<div class="cl bbda pbm">'.lang('forum/misc', 'plugin_memo', array('number' => $newversion)).'</div>';
  6.                 echo '<div class="ptn cl"><a href="admin.php?action=plugins" class="xi2 y">'.$lang['plugin_link'].' &raquo;</a></div>';
  7.                 echo '</div></div>';
  8.         }
复制代码

misc_patch.zip (770 Bytes, 下载次数: 4) x3.2 x3.3 通用

本教程由无限星辰工作室CRX349独家整理和提供,转载请注明地址,谢谢。本文地址:https://www.xmspace.net/thread-539-1-1.html
无限星辰工作室  好集导航 Discuz全集下载  星辰站长网  集热爱361  一品文学  手机小游戏合集   海外空间网 星辰api  星辰支付二维码管理平台 阿里云服务器 腾讯云服务器
服务Discuz!建站|DiscuzQ配置|二开|小程序|APP|搬家|挂马清理|防护|Win/Linux环境搭建|优化|运维|
服务理念:专业 诚信 友好QQ842062626 服务项目 Q群315524225

发表于 2017-8-5 22:35:39 | 显示全部楼层 |阅读模式

回复 | 使用道具 举报

该帖共收到 0 条回复!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

美图秀

    • fastadmin 后台界面使用字段数组类型
    • Discuz!x3.5 修改标题高亮颜色
    • Discuz!x3.5 应用中心 下载应用一直下载中
    • 帖子定时显示
    • 论坛辅助审核
拖动客服框
Online Service
点击这里给我发消息
点击这里联系我们
微信扫一扫
在线客服
快速回复 返回顶部 返回列表