[pLog-svn] r993 - plog/trunk/class/locale

ork at devel.plogworld.net ork at devel.plogworld.net
Tue Feb 8 12:41:06 GMT 2005


Author: ork
Date: 2005-02-08 12:41:06 +0000 (Tue, 08 Feb 2005)
New Revision: 993

Modified:
   plog/trunk/class/locale/locale.class.php
Log:
added check if str_replace is really needed.. we reduced the number of
calls for str_replace from 1300 (!) to about 100 .. 
the other str_replace comes from PatternLayout, i'll take a look there
too.. 


Modified: plog/trunk/class/locale/locale.class.php
===================================================================
--- plog/trunk/class/locale/locale.class.php	2005-02-08 12:15:36 UTC (rev 992)
+++ plog/trunk/class/locale/locale.class.php	2005-02-08 12:41:06 UTC (rev 993)
@@ -494,7 +494,8 @@
 
 			$text = $format;
 			foreach( array_keys($values) as $key ) {
-				$text = str_replace( $key, $values[$key], $text );
+                if (strpos($format, $key))
+                    $text = str_replace( $key, $values[$key], $text );
 			}
 
 			return $text;




More information about the pLog-svn mailing list