From 6dd7800fbce1fe1d65534aa439891069a11ecf66 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 9 Jun 2025 16:08:12 +0800 Subject: [PATCH] * [task#144510,doing,0.2h] Replace install to index when fetch the url of template block. --- module/upgrade/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 839a9747e0..a732a6af69 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -11180,14 +11180,14 @@ class upgradeModel extends model $templateBlock = new stdClass(); $templateBlock->doc = $templateID; $templateBlock->type = $blockType; - $templateBlock->settings = $this->config->requestType == 'GET' ? str_replace('upgrade.php?', 'index.php?', $settingUrl) : $settingUrl; + $templateBlock->settings = $this->config->requestType == 'GET' ? str_replace(array('upgrade.php?', 'install.php?'), 'index.php?', $settingUrl) : $settingUrl; $templateBlock->content = json_encode($blockContent); $this->dao->insert(TABLE_DOCBLOCK)->data($templateBlock)->exec(); $templateBlockID = $this->dao->lastInsertId(); $exportUrl = helper::createLink('doc', 'ajaxExportZentaoList', "blockID=__TML_ZENTAOLIST__{$templateBlockID}"); $fetcherUrl = helper::createLink('doc', 'zentaoList', "type={$blockType}&blockID=__TML_ZENTAOLIST__{$templateBlockID}"); - if($this->config->requestType == 'GET') list($exportUrl, $fetcherUrl) = str_replace('upgrade.php?', 'index.php?', array($exportUrl, $fetcherUrl)); + if($this->config->requestType == 'GET') list($exportUrl, $fetcherUrl) = str_replace(array('upgrade.php?', 'install.php?'), 'index.php?', array($exportUrl, $fetcherUrl)); return array('blockTitle' => $blockTitle, 'exportUrl' => $exportUrl, 'fetcherUrl' => $fetcherUrl); }