From 15813c755e66d209c856e79dfc2adb96c72e4080 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?=
<93301500+xushubieli@users.noreply.github.com>
Date: Fri, 7 Mar 2025 12:12:22 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE=E9=93=BE=E6=8E=A5?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
开启绝对判断http协议,有的http的不加网站根网址,没有的加网站根网址
---
src/system/archive/archives.class.php | 2 +-
src/system/archive/freelist.class.php | 4 ++--
src/system/archive/listview.class.php | 8 ++++----
src/system/archive/searchview.class.php | 4 ++--
src/system/archive/sglistview.class.php | 6 +++---
src/system/archive/specview.class.php | 2 +-
src/system/archive/taglist.class.php | 4 ++--
src/system/taglib/arclist.lib.php | 2 +-
src/system/taglib/arclistsg.lib.php | 2 +-
src/system/taglib/likearticle.lib.php | 2 +-
src/system/taglib/relation.lib.php | 2 +-
11 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/system/archive/archives.class.php b/src/system/archive/archives.class.php
index 3644c455..047ffc82 100755
--- a/src/system/archive/archives.class.php
+++ b/src/system/archive/archives.class.php
@@ -221,7 +221,7 @@ class Archives
if ($this->Fields['litpic'] == '-' || $this->Fields['litpic'] == '') {
$this->Fields['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- if (!preg_match("#^http:\/\/#i", $this->Fields['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $this->Fields['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$this->Fields['litpic'] = $GLOBALS['cfg_mainsite'].$this->Fields['litpic'];
}
$this->Fields['picname'] = $this->Fields['litpic'];
diff --git a/src/system/archive/freelist.class.php b/src/system/archive/freelist.class.php
index 75f6a3e7..b725067e 100755
--- a/src/system/archive/freelist.class.php
+++ b/src/system/archive/freelist.class.php
@@ -542,9 +542,9 @@ class FreeList
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- /*if (!preg_match("#^http:\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
- }*/
+ }
$row['picname'] = $row['litpic'];
$row['info'] = $row['description'];
$row['filename'] = $row['arcurl'];
diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php
index 24b7a8e8..4d3190ca 100755
--- a/src/system/archive/listview.class.php
+++ b/src/system/archive/listview.class.php
@@ -539,9 +539,9 @@ class ListView
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- /*if (!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
- }*/
+ }
$row['picname'] = $row['litpic'];
$row['stime'] = GetDateMK($row['pubdate']);
$row['typelink'] = "".$row['typename']."";
@@ -971,9 +971,9 @@ class ListView
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- /*if (!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
- }*/
+ }
$row['picname'] = $row['litpic'];
$row['stime'] = GetDateMK($row['pubdate']);
$row['typelink'] = "".$row['typename']."";
diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php
index 61bee5d5..18d9c204 100755
--- a/src/system/archive/searchview.class.php
+++ b/src/system/archive/searchview.class.php
@@ -575,9 +575,9 @@ class SearchView
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- /*if (!preg_match("/^(http|https):\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
- }*/
+ }
$row['picname'] = $row['litpic'];
$row["typeurl"] = GetTypeUrl($row["typeid"], $row["typedir"], $row["isdefault"], $row["defaultname"], $row["ispart"], $row["namerule2"], $row["moresite"], $row["siteurl"], $row["sitepath"]);
$row["info"] = $row["description"];
diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php
index cb15a34c..0bc40ede 100755
--- a/src/system/archive/sglistview.class.php
+++ b/src/system/archive/sglistview.class.php
@@ -447,9 +447,9 @@ class SgListView
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- /*if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
- }*/
+ }
$row['picname'] = $row['litpic'];
$row['pubdate'] = $row['senddate'];
$row['stime'] = GetDateMK($row['pubdate']);
@@ -810,7 +810,7 @@ class SgListView
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
diff --git a/src/system/archive/specview.class.php b/src/system/archive/specview.class.php
index 61126bd1..d2e414b9 100755
--- a/src/system/archive/specview.class.php
+++ b/src/system/archive/specview.class.php
@@ -350,7 +350,7 @@ class SpecView
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php
index 25126f12..91f63dab 100755
--- a/src/system/archive/taglist.class.php
+++ b/src/system/archive/taglist.class.php
@@ -342,9 +342,9 @@ class TagList
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- /*if (!preg_match("/^http:\/\//", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
- }*/
+ }
$row['picname'] = $row['litpic'];
$row['stime'] = GetDateMK($row['pubdate']);
$row['typelink'] = "".$row['typename']."";
diff --git a/src/system/taglib/arclist.lib.php b/src/system/taglib/arclist.lib.php
index e8379d46..fd728bd4 100755
--- a/src/system/taglib/arclist.lib.php
+++ b/src/system/taglib/arclist.lib.php
@@ -348,7 +348,7 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- if (!preg_match("#^(http|https):\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
diff --git a/src/system/taglib/arclistsg.lib.php b/src/system/taglib/arclistsg.lib.php
index fe8a56c5..05be961f 100755
--- a/src/system/taglib/arclistsg.lib.php
+++ b/src/system/taglib/arclistsg.lib.php
@@ -180,7 +180,7 @@ function lib_arclistsg(&$ctag, &$refObj)
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- if (!preg_match("#^(http|https):\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
diff --git a/src/system/taglib/likearticle.lib.php b/src/system/taglib/likearticle.lib.php
index cdf84402..c1c5af35 100755
--- a/src/system/taglib/likearticle.lib.php
+++ b/src/system/taglib/likearticle.lib.php
@@ -124,7 +124,7 @@ function lib_likearticle(&$ctag, &$refObj)
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- if (!preg_match("#^(http|https):\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
diff --git a/src/system/taglib/relation.lib.php b/src/system/taglib/relation.lib.php
index 85ce18f5..65155f8b 100644
--- a/src/system/taglib/relation.lib.php
+++ b/src/system/taglib/relation.lib.php
@@ -110,7 +110,7 @@ function lib_relation(&$ctag, &$refObj)
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/thumbnail.jpg';
}
- if (!preg_match("#^(http|https):\/\/#i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
+ if (!preg_match("/^(http|https):\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') {
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];