added spaces + some curly braces + some usage of dbm::is_result()

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-04-04 19:48:25 +02:00 committed by Roland Häder
commit 635b26353c
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
8 changed files with 329 additions and 265 deletions

View file

@ -170,11 +170,14 @@ function slapper($owner, $url, $slap) {
}
logger('slapper for '.$url.' returned ' . $return_code);
if (! $return_code) {
return(-1);
return -1;
}
if (($return_code == 503) && (stristr($a->get_curl_headers(), 'retry-after'))) {
return(-1);
return -1;
}
return ((($return_code >= 200) && ($return_code < 300)) ? 0 : 1);
}