* [bug#65793,done,2h] fix fetcher link error.

This commit is contained in:
tianshujie
2025-09-25 14:52:54 +08:00
parent 634d96753b
commit fadefd1bb5
6 changed files with 18 additions and 5 deletions
+13 -1
View File
@@ -762,6 +762,9 @@ class weeklyModel extends model
*/
public function getBuildinRawContent(array $blockIdList): string
{
global $oldRequestType;
if(!empty($oldRequestType) && $oldRequestType == 'PATH_INFO') $this->config->requestType = 'PATH_INFO';
$blockCodes = array();
foreach($blockIdList as $blockKey => $blockID) $blockCodes[] = '{' . $blockKey . '}';
@@ -790,13 +793,22 @@ class weeklyModel extends model
}
if(!empty($child->props->content))
{
$child->props->content->fetcher = str_replace($blockCodes, array_values($blockIdList), $child->props->content->fetcher);
if(!empty($child->props->content->fetcher[0]))
{
$fetcher = $child->props->content->fetcher[0];
$fetcher->params = str_replace($blockCodes, array_values($blockIdList), $fetcher->params);
$fetcherLink = helper::createLink($fetcher->module, $fetcher->method, $fetcher->params);
$fetcherLink = str_replace(array('install.php', 'upgrade.php'), 'index.php', $fetcherLink);
$child->props->content->fetcher = "{$fetcherLink}";
}
if(isset($child->props->content->exportUrl)) $child->props->content->exportUrl = str_replace($blockCodes, array_values($blockIdList), $child->props->content->exportUrl);
}
}
}
}
if(!empty($oldRequestType) && $oldRequestType == 'PATH_INFO') $this->config->requestType = 'GET';
return json_encode($rawContent);
}
}