Index: trunk/phase3/img_auth.php |
— | — | @@ -30,11 +30,12 @@ |
31 | 31 | wfProfileIn( 'img_auth.php' ); |
32 | 32 | require_once( dirname( __FILE__ ) . '/includes/StreamFile.php' ); |
33 | 33 | |
34 | | -$perms = User::getGroupPermissions( array( '*' ) ); |
35 | | - |
36 | 34 | // See if this is a public Wiki (no protections) |
37 | | -if ( $wgImgAuthPublicTest && in_array( 'read', $perms, true ) ) |
| 35 | +if ( $wgImgAuthPublicTest |
| 36 | + && in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) |
| 37 | +{ |
38 | 38 | wfForbidden('img-auth-accessdenied','img-auth-public'); |
| 39 | +} |
39 | 40 | |
40 | 41 | // Extract path and image information |
41 | 42 | if( !isset( $_SERVER['PATH_INFO'] ) ) |