diff --git a/inc/config.php b/inc/config.php index a7904de..4db3cf4 100644 --- a/inc/config.php +++ b/inc/config.php @@ -14,6 +14,7 @@ if (!is_dir('db/')) { define ('DB_PATH', 'sqlite:./db/poche.sqlite'); define ('ABS_PATH', 'assets/'); +define ('DOWNLOAD_PICTURES', TRUE); include 'db.php'; include 'functions.php'; diff --git a/inc/functions.php b/inc/functions.php index b7c7baf..f572d98 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -112,7 +112,10 @@ function prepare_url($url, $id) { $content = $r->articleContent->innerHTML; $parametres['title'] = $r->articleTitle->innerHTML; - $parametres['content'] = filtre_picture($content, $url, $id); + if (DOWNLOAD_PICTURES) { + $content = filtre_picture($content, $url, $id); + } + $parametres['content'] = $content; return $parametres; } }