mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 07:37:27 +02:00
refactor: introduce http Request object (#3926)
This commit is contained in:
@@ -12,20 +12,21 @@ class HtmlFormat extends FormatAbstract
|
||||
$formatFactory = new FormatFactory();
|
||||
$buttons = [];
|
||||
$linkTags = [];
|
||||
foreach ($formatFactory->getFormatNames() as $format) {
|
||||
foreach ($formatFactory->getFormatNames() as $formatName) {
|
||||
// Dynamically build buttons for all formats (except HTML)
|
||||
if ($format === 'Html') {
|
||||
if ($formatName === 'Html') {
|
||||
continue;
|
||||
}
|
||||
$formatUrl = '?' . str_ireplace('format=Html', 'format=' . $format, htmlentities($queryString));
|
||||
$formatUrl = '?' . str_ireplace('format=Html', 'format=' . $formatName, htmlentities($queryString));
|
||||
$buttons[] = [
|
||||
'href' => $formatUrl,
|
||||
'value' => $format,
|
||||
'value' => $formatName,
|
||||
];
|
||||
$format = $formatFactory->create($formatName);
|
||||
$linkTags[] = [
|
||||
'href' => $formatUrl,
|
||||
'title' => $format,
|
||||
'type' => $formatFactory->create($format)->getMimeType(),
|
||||
'title' => $formatName,
|
||||
'type' => $format->getMimeType(),
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user