Cleanup to r43657, don't really need strlen() here.
authorChad Horohoe <demon@users.mediawiki.org>
Tue, 18 Nov 2008 12:11:03 +0000 (12:11 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Tue, 18 Nov 2008 12:11:03 +0000 (12:11 +0000)
includes/filerepo/ForeignAPIRepo.php

index b4b08e8..a6773e1 100644 (file)
@@ -128,8 +128,7 @@ class ForeignAPIRepo extends FileRepo {
                        $foreignUrl = $this->getThumbUrl( $name, $width, $height );
                        
                        // We need the same filename as the remote one :)
-                       $fileName = ltrim( substr( $foreignUrl, strrpos( $foreignUrl, '/' ),
-                                                               strlen ( $foreignUrl ) ), '/' );
+                       $fileName = ltrim( substr( $foreignUrl, strrpos( $foreignUrl, '/' ) ), '/' );
                        $path = 'thumb/' . $this->getHashPath( $name ) . $name . "/";
                        if ( !is_dir($wgUploadDirectory . '/' . $path) ) {
                                wfMkdirParents($wgUploadDirectory . '/' . $path);