Revert "désactivation autoblog (test)"

This reverts commit 7030352d24.
This commit is contained in:
Mitsukarenai 2013-07-13 18:13:07 +02:00
parent 7030352d24
commit 1cda222925
2 changed files with 10 additions and 15 deletions

View file

@ -350,19 +350,16 @@ class VroumVroum_Blog
{
if (!$this->mustUpdate())
return false;
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());
}
}
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);

View file

@ -236,7 +236,6 @@ function svg_status($fill, $text, $back)
}
$svg_ok=svg_status('#008000', 'ok', '');
$svg_off=svg_status('#00158F', 'off', '');
$svg_mv=svg_status('#0000ff', 'mv', '<rect width="100%" height="100%" fill="#ffd800"/>');
$svg_err=svg_status('#000000', 'err', '<rect width="100%" height="100%" fill="#ff0000"/>');
@ -254,7 +253,6 @@ 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))