From 7b0ea1e8fd3813fa3a8b8bf8701f4ede970ee693 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 18 Nov 2008 12:11:03 +0000 Subject: [PATCH] Cleanup to r43657, don't really need strlen() here. --- includes/filerepo/ForeignAPIRepo.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index b4b08e883e..a6773e11ec 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -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); -- 2.20.1