diff --git a/.gitignore b/.gitignore index 4c658bf7..9a267f6a 100644 --- a/.gitignore +++ b/.gitignore @@ -226,3 +226,4 @@ pip-log.txt ############## /cache /whitelist.txt +DEBUG diff --git a/index.php b/index.php index 783e91a2..a8f96fc4 100644 --- a/index.php +++ b/index.php @@ -14,7 +14,13 @@ TODO : date_default_timezone_set('UTC'); error_reporting(0); -//ini_set('display_errors','1'); error_reporting(E_ALL); // For debugging only. + +if(file_exists("DEBUG")) { + + ini_set('display_errors','1'); error_reporting(E_ALL); //Report all errors + define("DEBUG", "true"); + +} require_once __DIR__ . '/lib/RssBridge.php'; @@ -84,7 +90,7 @@ try{ // Data retrieval $bridge = Bridge::create($bridge); - if(isset($_REQUEST["disable_cache"])) { + if(defined("DEBUG")) { } else { $bridge->setCache($cache); // just add disable cache to your query to disable caching }