From c34596fda365d35a31b2c368b29ca1774195fb6b Mon Sep 17 00:00:00 2001 From: tianya Date: Sun, 25 Jun 2023 23:15:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8B=E6=83=85=E9=93=BE=E6=8E=A5=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.php | 1 + src/system/taglib/flink.lib.php | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/index.php b/src/index.php index 47f6c0f5..ce96f77d 100755 --- a/src/index.php +++ b/src/index.php @@ -8,6 +8,7 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ +define("DEDEINDEX", true); if (!file_exists(dirname(__FILE__).'/data/common.inc.php')) { header('Location:install/index.php'); exit(); diff --git a/src/system/taglib/flink.lib.php b/src/system/taglib/flink.lib.php index dec2f18d..bd229202 100755 --- a/src/system/taglib/flink.lib.php +++ b/src/system/taglib/flink.lib.php @@ -13,7 +13,7 @@ helper('cache'); function lib_flink(&$ctag, &$refObj) { global $dsql, $cfg_soft_lang; - $attlist = "type|textall,row|30,titlelen|30,linktype|1,typeid|0"; + $attlist = "type|textall,row|30,titlelen|30,linktype|,typeid|0"; FillAttsDefault($ctag->CAttribute->Items, $attlist); extract($ctag->CAttribute->Items, EXTR_SKIP); $totalrow = $row; @@ -21,7 +21,16 @@ function lib_flink(&$ctag, &$refObj) if (isset($GLOBALS['envs']['flinkid'])) { $typeid = $GLOBALS['envs']['flinkid']; } - $wsql = " where ischeck >= '$linktype' "; + if (!empty($linktype)) { + $wsql = " where ischeck = '$linktype' "; + } else { + if (defined('DEDEINDEX')) { + $wsql = " where ischeck = 2 "; + } else { + $wsql = " where ischeck = 1 "; + } + } + if ($typeid == 0) { $wsql .= ''; } else {