From: Ævar Arnfjörð Bjarmason Date: Thu, 13 Oct 2005 23:36:51 +0000 (+0000) Subject: * Using $wgContLang->ucfirst() instead of $wgLang->ucfirst() in loadFromFile() and... X-Git-Tag: 1.6.0~1424 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=f51b433f5232aa0c829e3deebcc941e87fe47c87;p=lhc%2Fweb%2Fwiklou.git * Using $wgContLang->ucfirst() instead of $wgLang->ucfirst() in loadFromFile() and loadFromDB() * wfGetHashPath(): Removed redundant globals --- diff --git a/includes/Image.php b/includes/Image.php index 786d1d27ff..2ec5490327 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -211,7 +211,7 @@ class Image * Load metadata from the file itself */ function loadFromFile() { - global $wgUseSharedUploads, $wgSharedUploadDirectory, $wgLang, + global $wgUseSharedUploads, $wgSharedUploadDirectory, $wgContLang, $wgShowEXIF; $fname = 'Image::loadFromFile'; wfProfileIn( $fname ); @@ -227,7 +227,7 @@ class Image # In case we're on a wgCapitalLinks=false wiki, we # capitalize the first letter of the filename before # looking it up in the shared repository. - $sharedImage = Image::newFromName( $wgLang->ucfirst($this->name) ); + $sharedImage = Image::newFromName( $wgContLang->ucfirst($this->name) ); $this->fileExists = $sharedImage && file_exists( $sharedImage->getFullPath(true) ); if ( $this->fileExists ) { $this->name = $sharedImage->name; @@ -304,7 +304,7 @@ class Image * Load image metadata from the DB */ function loadFromDB() { - global $wgUseSharedUploads, $wgSharedUploadDBname, $wgSharedUploadDBprefix, $wgLang; + global $wgUseSharedUploads, $wgSharedUploadDBname, $wgSharedUploadDBprefix, $wgContLang; $fname = 'Image::loadFromDB'; wfProfileIn( $fname ); @@ -329,7 +329,7 @@ class Image # In case we're on a wgCapitalLinks=false wiki, we # capitalize the first letter of the filename before # looking it up in the shared repository. - $name = $wgLang->ucfirst($this->name); + $name = $wgContLang->ucfirst($this->name); $row = $dbr->selectRow( "`$wgSharedUploadDBname`.{$wgSharedUploadDBprefix}image", array( @@ -760,9 +760,8 @@ class Image * @access private */ function thumbUrl( $width, $subdir='thumb') { - global $wgUploadPath, $wgUploadBaseUrl, - $wgSharedUploadPath,$wgSharedUploadDirectory, - $wgSharedThumbnailScriptPath, $wgThumbnailScriptPath; + global $wgUploadPath, $wgUploadBaseUrl, $wgSharedUploadPath; + global $wgSharedThumbnailScriptPath, $wgThumbnailScriptPath; // Generate thumb.php URL if possible $script = false; @@ -1657,9 +1656,6 @@ function wfImageArchiveDir( $fname , $subdir='archive', $shared=false ) { * use different hash settings from the local one. */ function wfGetHashPath ( $dbkey, $fromSharedDirectory = false ) { - global $wgHashedSharedUploadDirectory, $wgSharedUploadDirectory; - global $wgHashedUploadDirectory; - if( Image::isHashed( $fromSharedDirectory ) ) { $hash = md5($dbkey); return '/' . $hash{0} . '/' . substr( $hash, 0, 2 ) . '/';