Author: skonsoft
Date: 2010-02-18 22:29:26 +0100 (Thu, 18 Feb 2010)
New Revision: 28124

Modified:
   plugins/sfTeraWurflPlugin/trunk/config/app.yml
   plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurflConfig.class.php
Log:
fixing app.yml as default config file

Modified: plugins/sfTeraWurflPlugin/trunk/config/app.yml
===================================================================
--- plugins/sfTeraWurflPlugin/trunk/config/app.yml      2010-02-18 21:21:31 UTC 
(rev 28123)
+++ plugins/sfTeraWurflPlugin/trunk/config/app.yml      2010-02-18 21:29:26 UTC 
(rev 28124)
@@ -1,10 +1,17 @@
 all: 
   sfTeraWurflPlugin: 
     data_dir: "%sf_plugins_dir%/sfTeraWurflPlugin/data/" # important !
+    thumb_dir: "%sf_web_dir%/images/thumbs/"      # where generated images 
should be stored. be careful when changing it ! your thumbs should be under 
sf_web_dir
     data_file: "wurfl.xml"
     patch_file: "custom_web_patch.xml;web_browsers_patch.xml"
     download_url: 
"http://downloads.sourceforge.net/project/wurfl/WURFL/latest/wurfl-latest.zip";
     cvs_download_url: 
"http://wurfl.cvs.sourceforge.net/%2Acheckout%2A/wurfl/xml/wurfl.xml";
+    override_memory_limit: true     #Enable to override PHP's memory limit if 
you are having problems loading the WURFL data like this:
+                                    #Fatal error: Allowed memory size of 
67108864 bytes exhausted (tried to allocate 24 bytes) in TeraWurflLoader.php on 
line 287
+                                    
+    memory_limit:  "256M"       #size of memory to be allocated when 
override_memory_limit is activated
+    
+    
     database: 
       host: localhost
       name: terawurfl       #database name

Modified: plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurflConfig.class.php
===================================================================
--- plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurflConfig.class.php     
2010-02-18 21:21:31 UTC (rev 28123)
+++ plugins/sfTeraWurflPlugin/trunk/lib/sfTeraWurflConfig.class.php     
2010-02-18 21:29:26 UTC (rev 28124)
@@ -230,5 +230,20 @@
        public static function getCvsDownloadUrl(){
                 return sfConfig::get("app_sfTeraWurflPlugin_cvs_download_url");
        }
+       /**
+        * check if override memory limit is enabled
+        * @return bool
+        */
+       public static function isOverrideMemoryLimitEnabled(){
+               return 
sfConfig::get("app_sfTeraWurflPlugin_override_memory_limit");
+       }
+       /**
+        * PHP Memory Limit.  
+        * @See isOverrideMemoryLimitEnabled for more info
+        * @return string
+        */
+       public static function getMemoryLimit(){
+               return sfConfig::get("app_sfTeraWurflPlugin_memory_limit");
+       }
 }
 ?>
\ No newline at end of file

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to