Fix No external access without using getUrlContent function.
This commit is contained in:
parent
6484fb2a38
commit
e5fc1583c7
@ -239,16 +239,21 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file
|
|||||||
</div></div>
|
</div></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add commit strip
|
||||||
if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
|
if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
if (substr($langs->defaultlang,0,2)=='fr') {
|
if (substr($langs->defaultlang,0,2)=='fr') {
|
||||||
$xml = simplexml_load_file("http://www.commitstrip.com/fr/feed/");
|
$resgetcommitstrip = getURLContent("http://www.commitstrip.com/fr/feed/");
|
||||||
} else {
|
} else {
|
||||||
$xml = simplexml_load_file("http://www.commitstrip.com/en/feed/");
|
$resgetcommitstrip = getURLContent("http://www.commitstrip.com/en/feed/");
|
||||||
}
|
}
|
||||||
|
if ($resgetcommitstrip && $resgetcommitstrip['http_code'] == '200')
|
||||||
$little = $xml->channel->item[0]->children('content',true);
|
{
|
||||||
|
$xml = simplexml_load_string($resgetcommitstrip['content']);
|
||||||
print $little->encoded;
|
$little = $xml->channel->item[0]->children('content',true);
|
||||||
|
print $little->encoded;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user