mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-30 14:49:53 +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:
parent
c5cd229445
commit
ee498eadf9
18 changed files with 121 additions and 158 deletions
|
@ -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', [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue