[pLog-svn] r2835 - plog/branches/lifetype-1.0.3/class/template/smarty/plugins

mark at devel.lifetype.net mark at devel.lifetype.net
Fri Jan 20 11:04:50 GMT 2006


Author: mark
Date: 2006-01-20 11:04:50 +0000 (Fri, 20 Jan 2006)
New Revision: 2835

Modified:
   plog/branches/lifetype-1.0.3/class/template/smarty/plugins/modifier.stars.php
Log:
There is a bug in this plugin, if the suffix is 0, it will show the whole password after the star. Just fix it.

Modified: plog/branches/lifetype-1.0.3/class/template/smarty/plugins/modifier.stars.php
===================================================================
--- plog/branches/lifetype-1.0.3/class/template/smarty/plugins/modifier.stars.php	2006-01-20 10:37:46 UTC (rev 2834)
+++ plog/branches/lifetype-1.0.3/class/template/smarty/plugins/modifier.stars.php	2006-01-20 11:04:50 UTC (rev 2835)
@@ -15,7 +15,7 @@
 {
     $_prefix_len = strlen($string) - $suffix;
     if($_prefix_len > 0) {
-        return str_repeat($char, $_prefix_len) . substr($string, - $suffix);
+        return str_repeat($char, $_prefix_len) . substr($string, -$suffix, $suffix);
     } else {
         return $string;
     }



More information about the pLog-svn mailing list