diff --git a/autoblogs/autoblog.php b/autoblogs/autoblog.php
index a2aff27..5a7895e 100644
--- a/autoblogs/autoblog.php
+++ b/autoblogs/autoblog.php
@@ -350,16 +350,19 @@ class VroumVroum_Blog
{
if (!$this->mustUpdate())
return false;
-
- try {
- $body = file_get_contents($this->config->feed_url, false, $this->_getStreamContext());
- }
- catch (ErrorException $e)
- {
- $this->log_update(false, $e->getMessage() . "\n\n" . (!empty($http_response_header) ? implode("\n", $http_response_header) : ''));
- throw new VroumVroum_Feed_Exception("Can't retrieve feed: ".$e->getMessage());
- }
-
+ if(isset($this->config->off)) {
+ throw new VroumVroum_Feed_Exception('This autoblog has been turned off');
+ }
+ else {
+ try {
+ $body = file_get_contents($this->config->feed_url, false, $this->_getStreamContext());
+ }
+ catch (ErrorException $e)
+ {
+ $this->log_update(false, $e->getMessage() . "\n\n" . (!empty($http_response_header) ? implode("\n", $http_response_header) : ''));
+ throw new VroumVroum_Feed_Exception("Can't retrieve feed: ".$e->getMessage());
+ }
+ }
libxml_use_internal_errors(true);
$xml = @simplexml_load_string($body);
diff --git a/index.php b/index.php
index d18f390..4b70e10 100755
--- a/index.php
+++ b/index.php
@@ -236,6 +236,7 @@ function svg_status($fill, $text, $back)
}
$svg_ok=svg_status('#008000', 'ok', '');
+ $svg_off=svg_status('#00158F', 'off', '');
$svg_mv=svg_status('#0000ff', 'mv', '');
$svg_err=svg_status('#000000', 'err', '');
@@ -253,6 +254,7 @@ function svg_status($fill, $text, $back)
else /* ..sinon, lancer la procédure de contrôle */
{
$ini = parse_ini_file("./". escape( $_GET['check'] ) ."/vvb.ini") or die;
+ if(isset($ini['OFF'])) { die($svg_off); }
$headers = get_headers($ini['FEED_URL']);
if(!empty($headers))