[pLog-svn] r5957 - plog/trunk/class/template/editor

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sat Sep 29 03:45:32 EDT 2007


Author: oscar
Date: 2007-09-29 03:45:32 -0400 (Sat, 29 Sep 2007)
New Revision: 5957

Modified:
   plog/trunk/class/template/editor/templatetools.class.php
Log:
Fixed an issue with case sensitiveness of file names, and modifed the FileNameMatchValidator class so that it can support both case-sensitive and case-insensitive modes for matching.


Modified: plog/trunk/class/template/editor/templatetools.class.php
===================================================================
--- plog/trunk/class/template/editor/templatetools.class.php	2007-09-29 07:37:01 UTC (rev 5956)
+++ plog/trunk/class/template/editor/templatetools.class.php	2007-09-29 07:45:32 UTC (rev 5957)
@@ -9,7 +9,7 @@
 	
 			$config =& Config::getConfig();
 			$allowedExtensions = $config->getValue( "template_editor_editable_extensions" );
-			$v = new FileNameMatchValidator( $allowedExtensions );
+			$v = new FileNameMatchValidator( $allowedExtensions, false );
 			return( $v->validate( $name ));
         }
 
@@ -23,7 +23,7 @@
 		    $extensionList = Array( "jpg", "gif", "png", "bmp" );            
             $fileExtension = array_pop(explode('.', $name));
             foreach ($extensionList as $extension) {
-                if ( $fileExtension == trim($extension) ) {
+                if ( strtolower($fileExtension) == trim($extension) ) {
                     return true;   
                 }
             }



More information about the pLog-svn mailing list