Merge pull request #233 from teromene/master

Added an URL option to activate debug :
This commit is contained in:
Mitsu 2016-03-20 16:44:12 +01:00
commit b2f42144f8
2 changed files with 9 additions and 2 deletions

1
.gitignore vendored
View file

@ -226,3 +226,4 @@ pip-log.txt
##############
/cache
/whitelist.txt
DEBUG

View file

@ -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
}