1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-30 21:30:14 +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:
Dag
2023-06-02 20:22:09 +02:00
committed by GitHub
parent c5cd229445
commit ee498eadf9
18 changed files with 121 additions and 158 deletions

View File

@@ -438,14 +438,17 @@ function getSimpleHTMLDOMCached(
$time !== false
&& (time() - $duration < $time)
&& !Debug::isEnabled()
) { // Contents within duration
) {
// Contents within duration and debug mode is disabled
$content = $cache->loadData();
} else { // Content not within duration
} else {
// Contents not within duration, or debug mode is enabled
$content = getContents(
$url,
$header ?? [],
$opts ?? []
);
// todo: fix bad if statement
if ($content !== false) {
$cache->saveData($content);
}