Prevent PHP notice on undefined $subjectpreview and $summarypreview variables in...
[lhc/web/wiklou.git] / img_auth.php
index 111fbdf..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 = $wgLang->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 ) {