mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-01 06:10:22 +02:00
fix: move debug mode to config (#3324)
* fix: move debug mode to config * fix: also move debug_whitelist to .ini config * fix: move logic back to Debug class * docs * docs * fix: disable debug mode by default * fix: restore previous behavior for alerts * fix: center-align alert text
This commit is contained in:
@@ -107,7 +107,7 @@ class DisplayAction implements ActionInterface
|
||||
&& (time() - $cache_timeout < $mtime)
|
||||
&& !Debug::isEnabled()
|
||||
) {
|
||||
// At this point we found the feed in the cache
|
||||
// At this point we found the feed in the cache and debug mode is disabled
|
||||
|
||||
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
|
||||
// The client wants to know if the feed has changed since its last check
|
||||
@@ -118,7 +118,7 @@ class DisplayAction implements ActionInterface
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch the cached feed from the cache and prepare it
|
||||
// Load the feed from cache and prepare it
|
||||
$cached = $cache->loadData();
|
||||
if (isset($cached['items']) && isset($cached['extraInfos'])) {
|
||||
foreach ($cached['items'] as $item) {
|
||||
@@ -127,7 +127,7 @@ class DisplayAction implements ActionInterface
|
||||
$infos = $cached['extraInfos'];
|
||||
}
|
||||
} else {
|
||||
// At this point we did NOT find the feed in the cache. So invoke the bridge!
|
||||
// At this point we did NOT find the feed in the cache or debug mode is enabled.
|
||||
try {
|
||||
$bridge->setDatas($bridge_params);
|
||||
$bridge->collectData();
|
||||
@@ -200,7 +200,7 @@ class DisplayAction implements ActionInterface
|
||||
$item->setURI(get_current_url());
|
||||
$item->setTimestamp(time());
|
||||
|
||||
// Create a item identifier for feed readers e.g. "staysafetv twitch videos_19389"
|
||||
// Create an item identifier for feed readers e.g. "staysafetv twitch videos_19389"
|
||||
$item->setUid($bridge->getName() . '_' . $uniqueIdentifier);
|
||||
|
||||
$content = render_template(__DIR__ . '/../templates/bridge-error.html.php', [
|
||||
|
@@ -24,6 +24,7 @@ final class FrontpageAction implements ActionInterface
|
||||
}
|
||||
|
||||
return render(__DIR__ . '/../templates/frontpage.html.php', [
|
||||
'messages' => [],
|
||||
'admin_email' => Configuration::getConfig('admin', 'email'),
|
||||
'admin_telegram' => Configuration::getConfig('admin', 'telegram'),
|
||||
'bridges' => $body,
|
||||
|
Reference in New Issue
Block a user