打开:source/admincp/admincp_main.php
删除
- if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && ($_G['setting']['showpatchnotice'] == 1 || !isset($_G['cookie']['checkpatch']))) {
- $discuz_patch = new discuz_patch();
- if($_G['setting']['showpatchnotice'] == 1) {
- $notice = $discuz_patch->fetch_patch_notice();
- if($notice['data']) {
- $shownotice = '<div class="notice"><a href="'.$basescript.'?action=patch" id="notice">'.($notice['fixed'] ? $lang['patch_fix_complete'] : $lang['patch_fix_rigth_now']).'</a></div>';
- }
- }
- if(!isset($_G['cookie']['checkpatch'])) {
- $discuz_patch->check_patch();
- }
- }
- if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !$shownotice && $_G['setting']['upgrade']) {
- $shownotice = '<div class="notice"><a href="'.$basescript.'?action=upgrade" id="notice">'.$lang['upgrade_right_now'].'</a></div>';
- }
- if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !isset($_G['cookie']['checkupgrade'])) {
- $discuz_upgrade = new discuz_upgrade();
- if($discuz_upgrade->check_upgrade()) {
- if(empty($shownotice)) {
- $shownotice = '<div class="notice"><a href="'.$basescript.'?action=upgrade" id="notice">'.$lang['upgrade_right_now'].'</a></div>';
- }
- }
- dsetcookie('checkupgrade', 1, 7200);
- }
复制代码
前台也有影响管理员打开速度的
下载替换文件 source\module\misc\misc_patch.php
删除
- if($_G['uid'] && $_G['member']['allowadmincp'] == 1) {
- $discuz_patch = new discuz_patch();
- $discuz_patch->check_patch();
- }
复制代码- $patchlist = '';
- if($_G['member']['allowadmincp'] == 1) {
- $discuz_patch = new discuz_patch();
- $patchnotice = $discuz_patch->fetch_patch_notice();
- if(!empty($patchnotice['data'])) {
- $lang = lang('forum/misc');
- $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">';
- if($patchnotice['fixed']) {
- $patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_is_fixed'];
- } else {
- $patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_need_fix'];
- }
- $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>';
- foreach($patchnotice['data'] as $notice) {
- $patchlist .= '<tr><td>'.$notice['serial'].'</td><td>'.dgmdate($notice['dateline'], 'Y-m-d').'</td><td>';
- if($notice['status'] >= 1) {
- $patchlist .= '<span class="fixed">'.$lang['patch_fixed_status'].'<span>';
- } elseif($notice['status'] < 0) {
- $patchlist .= '<span class="unfixed">'.$lang['patch_fix_failed_status'].'</span>';
- } else {
- $patchlist .= '<span class="unfixed">'.$lang['patch_unfix_status'].'</span>';
- }
- $patchlist .= '</td></tr>';
- }
- $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>';
- $patchlist .= '</div></div>';
- }
- }
复制代码- require_once libfile('function/admincp');
- require_once libfile('function/plugin');
- require_once libfile('function/cloudaddons');
- $pluginarray = C::t('common_plugin')->fetch_all_data();
- $addonids = $vers = array();
- foreach($pluginarray as $row) {
- if(ispluginkey($row['identifier'])) {
- $addonids[] = $row['identifier'].'.plugin';
- $vers[$row['identifier'].'.plugin'] = $row['version'];
- }
- }
- $checkresult = dunserialize(cloudaddons_upgradecheck($addonids));
- savecache('addoncheck_plugin', $checkresult);
- $newversion = 0;
- foreach($checkresult as $addonid => $value) {
- list(, $newver, $sysver) = explode(':', $value);
- if($sysver && $sysver > $vers[$addonid] || $newver) {
- $newversion++;
- }
- }
复制代码- if($newversion) {
- $lang = lang('forum/misc');
- 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>';
- echo '<h2 class="i">'.$lang['plugin_title'].'</h2></div><div class="bm_c">';
- echo '<div class="cl bbda pbm">'.lang('forum/misc', 'plugin_memo', array('number' => $newversion)).'</div>';
- echo '<div class="ptn cl"><a href="admin.php?action=plugins" class="xi2 y">'.$lang['plugin_link'].' »</a></div>';
- echo '</div></div>';
- }
复制代码
misc_patch.zip
(770 Bytes, 下载次数: 4)
x3.2 x3.3 通用 |