* (bug 7279) Use wfBaseName in place of basename() in more places
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 10 Sep 2006 12:11:36 +0000 (12:11 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 10 Sep 2006 12:11:36 +0000 (12:11 +0000)
RELEASE-NOTES
img_auth.php
includes/Exif.php
maintenance/FiveUpgrade.inc
maintenance/dumpHTML.inc
maintenance/importImages.php

index 3fb2417..614601a 100644 (file)
@@ -190,6 +190,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6887) PHP error for call to getId() on bad input to Special:Revisiondelete
 * (bug 6888) PHP error for call to getTimestamp() on bad input to Special:Revisiondelete
 * (bug 7252) Use dvipng support in texvc math rastrization. dvipng is required if texvc is rebuilt.
+* (bug 7279) Use wfBaseName in place of basename() in more places
+
 
 == Languages updated ==
 
index 4917fe5..cfe005e 100644 (file)
@@ -18,7 +18,7 @@ if( !isset( $_SERVER['PATH_INFO'] ) ) {
 # Get filenames/directories
 $filename = realpath( $wgUploadDirectory . $_SERVER['PATH_INFO'] );
 $realUploadDirectory = realpath( $wgUploadDirectory );
-$imageName = $wgContLang->getNsText( NS_IMAGE ) . ":" . basename( $_SERVER['PATH_INFO'] );
+$imageName = $wgContLang->getNsText( NS_IMAGE ) . ":" . wfBaseName( $_SERVER['PATH_INFO'] );
 
 # Check if the filename is in the correct directory
 if ( substr( $filename, 0, strlen( $realUploadDirectory ) ) != $realUploadDirectory ) {
index f9fb9a2..2ab0feb 100644 (file)
@@ -293,7 +293,7 @@ class Exif {
                );
 
                $this->file = $file;
-               $this->basename = basename( $this->file );
+               $this->basename = wfBaseName( $this->file );
 
                $this->makeFlatExifTags();
 
index f56e62b..c9fe2ee 100644 (file)
@@ -804,7 +804,7 @@ END;
                        array_shift( $against );
                }
 
-               array_push( $pieces, basename( $path ) );
+               array_push( $pieces, wfBaseName( $path ) );
 
                return implode( '/', $pieces );
        }
index e0ef494..c22be78 100644 (file)
@@ -298,7 +298,7 @@ class DumpHTML {
                                glob( "{$this->sharedStaticDirectory}/thumb/$dir/*" ) );
 
                        foreach ( $paths as $path ) {
-                               $file = basename( $path );
+                               $file = wfBaseName( $path );
                                if ( !(++$i % REPORTING_INTERVAL ) ) {
                                        print "$i\r";
                                }
index 925c64b..a2b889e 100644 (file)
@@ -32,7 +32,7 @@ if( count( $args ) > 1 ) {
        # Batch "upload" operation
        foreach( $files as $file ) {
        
-               $base = basename( $file );
+               $base = wfBaseName( $file );
                
                # Validate a title
                $title = Title::makeTitleSafe( NS_IMAGE, $base );