if (!empty($_REQUEST['debug'])) {
DB_DataObject::debugLevel(1);
}
- print_r('ininin');
+
$i = DB_DataObject::Factory('I18n');
$i->buildDB();
$ar = array();
foreach($langs as $lang)
{
- $rlang = array_shift(explode('_', strtoupper($lang)));
+ //$rlang = array_shift(explode('_', strtoupper($lang)));
+ $rlang = array_shift(explode('_', $lang));
$ar[$lang] = array();
$i = DB_DataObject::Factory('I18n');
}
$target = ini_get('session.save_path').'/eurofxref-daily.xml';
if (!file_exists($target) || filemtime($target) < (time() - 60*60*24)) {
- $f = file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml');
+ // this may fail...
+ $f = @file_get_contents('http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml');
if (!strlen($f)) {
+ $target = dirname(__FILE__).'eurofxref-daily.xml';
+
return false;
}
file_put_contents($target,$f);