Skip to content
Snippets Groups Projects
Commit e5fc1583 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix No external access without using getUrlContent function.

parent 6484fb2a
Branches
Tags
No related merge requests found
...@@ -239,17 +239,22 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file ...@@ -239,17 +239,22 @@ 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')
{
$xml = simplexml_load_string($resgetcommitstrip['content']);
$little = $xml->channel->item[0]->children('content',true); $little = $xml->channel->item[0]->children('content',true);
print $little->encoded; print $little->encoded;
} }
}
?> ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment