public function check() { $discuz_upgrade = new discuz_upgrade(); if ($discuz_upgrade->check_upgrade()) { $return = array('status' => 1, 'type' => 'header', 'lang' => lang('optimizer', 'optimizer_upgrade_need_optimizer')); } else { $return = array('status' => 0, 'type' => 'none', 'lang' => lang('optimizer', 'optimizer_upgrade_no_need')); } return $return; }
$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); } /*vot*/ $rtl_suffix = RTLSUFFIX; echo <<<EOT <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml" dir="{$_G[langdir]}"><head> <meta http-equiv="Content-Type" content="text/html; charset=$charset"> <title>$title</title> <meta content="Comsenz Inc." name="Copyright" />
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: admincp_upgrade.php 33274 2013-05-14 02:08:00Z jeffjzhang $ */ if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } @set_time_limit(0); cpheader(); include_once 'source/discuz_version.php'; $discuz_upgrade = new discuz_upgrade(); $step = intval($_GET['step']); $step = $step ? $step : 1; $operation = $operation ? $operation : 'check'; if (!$_G['setting']['bbclosed'] && in_array($operation, array('cross', 'patch'))) { cpmsg('upgrade_close_site', '', 'error'); } if ($operation == 'patch' || $operation == 'cross') { $version = trim($_GET['version']); $release = trim($_GET['release']); $locale = trim($_GET['locale']); $charset = trim($_GET['charset']); $upgradeinfo = $upgrade_step = array(); if ($_GET['ungetfrom']) { if (md5($_GET['ungetfrom'] . $_G['config']['security']['authkey']) == $_GET['ungetfrommd5']) { $dbreturnurl = $_G['siteurl'] . ADMINSCRIPT . '?action=upgrade&operation=' . $operation . '&version=' . $version . '&release=' . $release . '&step=5'; dheader('Location: ' . $_G['siteurl'] . 'install/update.php?step=prepare&from=' . rawurlencode($dbreturnurl) . '&frommd5=' . rawurlencode(md5($dbreturnurl . $_G['config']['security']['authkey'])));