无限星辰工作室-客户无限互联网动力之源

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

作者: crx349    时间: 2017-8-5 22:35
标题: 解决 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.         }
复制代码

(, 下载次数: 4) x3.2 x3.3 通用




欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4