diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index ba501e802ddf9d91ca108f786d15112ed4078399..e0aa28ce2d67126a088d38f52c0118e41f7c3588 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -239,16 +239,21 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file </div></div> <?php } + +// Add commit strip 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') { - $xml = simplexml_load_file("http://www.commitstrip.com/fr/feed/"); + $resgetcommitstrip = getURLContent("http://www.commitstrip.com/fr/feed/"); } else { - $xml = simplexml_load_file("http://www.commitstrip.com/en/feed/"); + $resgetcommitstrip = getURLContent("http://www.commitstrip.com/en/feed/"); } - - $little = $xml->channel->item[0]->children('content',true); - - print $little->encoded; + if ($resgetcommitstrip && $resgetcommitstrip['http_code'] == '200') + { + $xml = simplexml_load_string($resgetcommitstrip['content']); + $little = $xml->channel->item[0]->children('content',true); + print $little->encoded; + } } ?>