diff --git a/index.php b/index.php
index 7b41586c..d57de89b 100644
--- a/index.php
+++ b/index.php
@@ -1,31 +1,4 @@
Warning : Debug mode is active from any location,
-make sure only you can access RSS-Bridge.
+Warning : Debug mode is active from any location,
+ make sure only you can access RSS-Bridge.
EOD;
} else {
$warning .= <<Warning : Debug mode is active from your IP address,
-your requests will bypass the cache.
+Warning : Debug mode is active from your IP address,
+ your requests will bypass the cache.
EOD;
}
}
diff --git a/lib/Debug.php b/lib/Debug.php
index 7d1f498d..0429f7eb 100644
--- a/lib/Debug.php
+++ b/lib/Debug.php
@@ -1,8 +1,85 @@
getTime();
if($time !== false
&& (time() - $duration < $time)
- && (!defined('DEBUG') || DEBUG !== true)) { // Contents within duration
+ && Debug::isEnabled()) { // Contents within duration
$content = $cache->loadData();
} else { // Content not within duration
$content = getContents($url, $header, $opts);
diff --git a/lib/rssbridge.php b/lib/rssbridge.php
index ac70580b..07812f2c 100644
--- a/lib/rssbridge.php
+++ b/lib/rssbridge.php
@@ -1,5 +1,6 @@