Follow-up r92924: move the CSS/JS for e-mail validation to Special:ChangeEmail.
[lhc/web/wiklou.git] / thumb.php
index e16d95b..74cc711 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -8,9 +8,9 @@
  */
 define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
 if ( isset( $_SERVER['MW_COMPILED'] ) ) {
-       require ( 'phase3/includes/WebStart.php' );
+       require( 'phase3/includes/WebStart.php' );
 } else {
-       require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
+       require( dirname( __FILE__ ) . '/includes/WebStart.php' );
 }
 
 // Don't use fancy mime detection, just check the file extension for jpg/gif/png
@@ -118,7 +118,7 @@ function wfStreamThumb( array $params ) {
 
        // Check permissions if there are read restrictions
        if ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) {
-               if ( !$img->getTitle()->userCanRead() ) {
+               if ( !$img->getTitle()->userCan( 'read' ) ) {
                        wfThumbError( 403, 'Access denied. You do not have permission to access ' .
                                'the source file.' );
                        wfProfileOut( __METHOD__ );