Browse Source

修正错误

tags/6.2.0
tianya 1 year ago
parent
commit
6e594aad7d
4 changed files with 13 additions and 11 deletions
  1. +3
    -3
      src/system/common.func.php
  2. +1
    -1
      src/system/database/dedesqlite.class.php
  3. +2
    -2
      src/system/helpers/channelunit.helper.php
  4. +7
    -5
      src/system/taglib/channelartlist.lib.php

+ 3
- 3
src/system/common.func.php View File

@@ -409,13 +409,13 @@ function IndexActive($idx)
//是否是HTTPS
function IsSSL()
{
if ($_SERVER['HTTPS'] && ('1' == $_SERVER['HTTPS'] || 'on' == strtolower($_SERVER['HTTPS']))) {
if (@$_SERVER['HTTPS'] && ('1' == $_SERVER['HTTPS'] || 'on' == strtolower($_SERVER['HTTPS']))) {
return true;
} elseif ('https' == $_SERVER['REQUEST_SCHEME']) {
} elseif ('https' == @$_SERVER['REQUEST_SCHEME']) {
return true;
} elseif ('443' == $_SERVER['SERVER_PORT']) {
return true;
} elseif ('https' == $_SERVER['HTTP_X_FORWARDED_PROTO']) {
} elseif ('https' == @$_SERVER['HTTP_X_FORWARDED_PROTO']) {
return true;
}
return false;


+ 1
- 1
src/system/database/dedesqlite.class.php View File

@@ -367,7 +367,7 @@ class DedeSqlite
function GetVersion($isformat = TRUE)
{
global $dsqlite;
if (!$dsqlite->isInit) {
if (!@$dsqlite->isInit) {
$this->Init($this->pconnect);
}
if ($dsqlite->isClose) {


+ 2
- 2
src/system/helpers/channelunit.helper.php View File

@@ -476,9 +476,9 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y')
if (DEBUG_LEVEL == TRUE) {
$queryTime = ExecTime() - $ttt1;
if (PHP_SAPI === 'cli') {
echo '标签:'.$tagname.'载入花费时间:'.$queryTime."\r\n";
echo '标签:'.$tagname.' 载入花费时间:'.$queryTime."\r\n";
} else {
echo DedeAlert('标签:'.$tagname.'载入花费时间:'.$queryTime, ALERT_WARNING);
echo DedeAlert('标签:'.$tagname.' 载入花费时间:'.$queryTime, ALERT_WARNING);
}
}


+ 7
- 5
src/system/taglib/channelartlist.lib.php View File

@@ -59,11 +59,13 @@ function lib_channelartlist(&$ctag, &$refObj)
$pv = new PartView($typeids[$i]['id']);
$pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]);
//栏目高亮
if ($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['reid'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['topid'] || $typeids[$i]['id'] == GetTopid($refObj->TypeLink->TypeInfos['id']) )
{
$pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : 'current';
} else {
$pv->Fields['currentstyle'] = '';
if (isset($refObj->TypeLink->TypeInfos)) {
if ($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['reid'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['topid'] || $typeids[$i]['id'] == GetTopid($refObj->TypeLink->TypeInfos['id']) )
{
$pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : 'current';
} else {
$pv->Fields['currentstyle'] = '';
}
}
$pv->SetTemplet($innertext,'string');
$artlist .= $pv->GetResult();


Loading…
Cancel
Save