优化 应对应用中心 https 化

This commit is contained in:
Comsenz 2018-11-01 10:26:21 +08:00
parent e72668b7f0
commit 485e1d1563
2 changed files with 5 additions and 9 deletions

View File

@ -30,11 +30,7 @@ if(!$operation) {
$extra .= '&'.addslashes($_GET['extra']);
}
$url = cloudaddons_url($extra);
if($_G['isHTTPS']) {
echo '<script type="text/javascript">window.open(\''.$url.'\');</script>';
} else {
echo '<script type="text/javascript">location.href=\''.$url.'\';</script>';
}
echo '<script type="text/javascript">location.href=\''.$url.'\';</script>';
} elseif($operation == 'download') {
$step = intval($_GET['step']);

View File

@ -15,10 +15,10 @@ $addonsource = $_G['config']['addonsource'] ? $_G['config']['addonsource'] : ($_
$addon = $addonsource ?
$_G['config']['addon'][$addonsource] :
array(
'website_url' => 'http://addon.discuz.com',
'download_url' => 'http://addon.discuz.com/index.php',
'website_url' => 'https://addon.discuz.com',
'download_url' => 'https://addon.discuz.com/index.php',
'download_ip' => '',
'check_url' => 'http://addon1.discuz.com/md5/',
'check_url' => 'https://addon1.discuz.com/md5/',
'check_ip' => '',
);
@ -34,7 +34,7 @@ function cloudaddons_md5($file) {
function cloudaddons_getuniqueid() {
global $_G;
if(CLOUDADDONS_WEBSITE_URL == 'http://addon.discuz.com') {
if(CLOUDADDONS_WEBSITE_URL == 'https://addon.discuz.com') {
return $_G['setting']['siteuniqueid'] ? $_G['setting']['siteuniqueid'] : C::t('common_setting')->fetch('siteuniqueid');
} else {
if(!$_G['setting']['addon_uniqueid']) {