[pLog-svn] r5294 - plog/branches/lifetype-1.2/class/file

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Apr 9 09:28:32 EDT 2007


Author: jondaley
Date: 2007-04-09 09:28:31 -0400 (Mon, 09 Apr 2007)
New Revision: 5294

Modified:
   plog/branches/lifetype-1.2/class/file/file.class.php
Log:
removed extra backslash.  This now makes sense to me, although I didn't think I would have had to do it like this.  The last backslash escapes the forward slash.  THe first two pairs of backslashes get escaped to two backslashes when the string parser reads it.  Then the two backslashes get passed into preg_replace, and I guess get unescaped again, though now that I am typing it, it doesn't make sense again.  But, definitely, the parser has trouble with less backslashes, so this is what is required.

Modified: plog/branches/lifetype-1.2/class/file/file.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/file/file.class.php	2007-04-09 13:26:00 UTC (rev 5293)
+++ plog/branches/lifetype-1.2/class/file/file.class.php	2007-04-09 13:28:31 UTC (rev 5294)
@@ -482,7 +482,7 @@
              if( $fileName == null )
                  return false;
 
-             $basename = preg_replace( '/^.+[\\\\\\/]/', '', $fileName );
+             $basename = preg_replace( '/^.+[\\\\\/]/', '', $fileName );
 
              return $basename;
          }         



More information about the pLog-svn mailing list