Add missing global $wgUser
authorSam Reed <reedy@users.mediawiki.org>
Sat, 24 Jul 2010 19:08:23 +0000 (19:08 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 24 Jul 2010 19:08:23 +0000 (19:08 +0000)
includes/api/ApiQueryWatchlist.php

index e6896da..503744d 100644 (file)
@@ -142,6 +142,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
                        // Check permissions.
                        if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ) {
+                               global $wgUser;
                                if ( !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) {
                                        $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' );
                                }