Fix use of get url
This commit is contained in:
parent
067f37e22e
commit
3cc478b133
@ -71,7 +71,7 @@ class BlockedLogAuthority
|
|||||||
|
|
||||||
$this->blockchain = '';
|
$this->blockchain = '';
|
||||||
|
|
||||||
if (is_array($bocks)) {
|
if (is_array($blocks)) {
|
||||||
foreach ($blocks as &$b) {
|
foreach ($blocks as &$b) {
|
||||||
$this->blockchain .= $b->signature;
|
$this->blockchain .= $b->signature;
|
||||||
}
|
}
|
||||||
@ -299,16 +299,18 @@ class BlockedLogAuthority
|
|||||||
|
|
||||||
$signature = $block_static->getSignature();
|
$signature = $block_static->getSignature();
|
||||||
|
|
||||||
foreach ($blocks as &$block) {
|
if (is_array($blocks)) {
|
||||||
$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$signature.'&b='.$block->signature;
|
foreach ($blocks as &$block) {
|
||||||
|
$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$signature.'&b='.$block->signature;
|
||||||
|
|
||||||
$res = file_get_contents($url);
|
$res = getURLContent($url);
|
||||||
echo $block->signature.' '.$url.' '.$res.'<br>';
|
echo $block->signature.' '.$url.' '.$res.'<br>';
|
||||||
if ($res === 'blockalreadyadded' || $res === 'blockadded') {
|
if ($res === 'blockalreadyadded' || $res === 'blockadded') {
|
||||||
$block->setCertified();
|
$block->setCertified();
|
||||||
} else {
|
} else {
|
||||||
$this->error = $langs->trans('ImpossibleToContactAuthority ', $url);
|
$this->error = $langs->trans('ImpossibleToContactAuthority ', $url);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user