I18n.php
[Pman.Core] / I18n.php
index 0fed9ee..4403e8c 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');
         
@@ -292,9 +297,10 @@ class Pman_Core_I18n extends Pman
             if (!strlen($f)) {
                 $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;