DataObjects/core.sql
[Pman.Core] / I18n.php
index 9d403d9..abffb4f 100644 (file)
--- a/I18n.php
+++ b/I18n.php
@@ -111,6 +111,11 @@ class Pman_Core_I18n extends Pman
      
         $lbits = $this->guessUsersLanguage();
          
+        if ($this->authUser && !empty($_REQUEST['_debug'])) {
+            DB_DataObject::debugLevel(1);
+        }
+        
+        
         
         $i = DB_DataObject::Factory('I18n');
         
@@ -290,11 +295,12 @@ class Pman_Core_I18n extends Pman
             // 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';
+                $target = dirname(__FILE__).'/eurofxref-daily.xml';
+                
                 
-                return false;
+            } else {
+                file_put_contents($target,$f);
             }
-            file_put_contents($target,$f);
         } 
         $dom = simplexml_load_file($target);
         $this->rates['EUR'] = 1.0;