Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -821,15 +821,15 @@ |
822 | 822 | |
823 | 823 | // Call ONLY after calling $this->limitType() already! |
824 | 824 | public function getFilterParams() { |
825 | | - global $wgFilterLogTypes, $wgUser, $wgRequest; |
| 825 | + global $wgFilterLogTypes; |
826 | 826 | $filters = array(); |
827 | 827 | if( count($this->types) ) { |
828 | 828 | return $filters; |
829 | 829 | } |
830 | 830 | foreach( $wgFilterLogTypes as $type => $default ) { |
831 | 831 | // Avoid silly filtering |
832 | | - if( $type !== 'patrol' || $wgUser->useNPPatrol() ) { |
833 | | - $hide = $wgRequest->getInt( "hide_{$type}_log", $default ); |
| 832 | + if( $type !== 'patrol' || $this->getUser()->useNPPatrol() ) { |
| 833 | + $hide = $this->getRequest()->getInt( "hide_{$type}_log", $default ); |
834 | 834 | $filters[$type] = $hide; |
835 | 835 | if( $hide ) |
836 | 836 | $this->mConds[] = 'log_type != ' . $this->mDb->addQuotes( $type ); |
— | — | @@ -846,13 +846,13 @@ |
847 | 847 | * empty string means no restriction |
848 | 848 | */ |
849 | 849 | private function limitType( $types ) { |
850 | | - global $wgLogRestrictions, $wgUser; |
| 850 | + global $wgLogRestrictions; |
851 | 851 | // If $types is not an array, make it an array |
852 | 852 | $types = ($types === '') ? array() : (array)$types; |
853 | 853 | // Don't even show header for private logs; don't recognize it... |
854 | 854 | foreach ( $types as $type ) { |
855 | 855 | if( isset( $wgLogRestrictions[$type] ) |
856 | | - && !$wgUser->isAllowed($wgLogRestrictions[$type]) |
| 856 | + && !$this->getUser()->isAllowed($wgLogRestrictions[$type]) |
857 | 857 | ) { |
858 | 858 | $types = array_diff( $types, array( $type ) ); |
859 | 859 | } |
— | — | @@ -892,12 +892,12 @@ |
893 | 893 | but for now it won't pass anywhere behind the optimizer */ |
894 | 894 | $this->mConds[] = "NULL"; |
895 | 895 | } else { |
896 | | - global $wgUser; |
897 | 896 | $this->mConds['log_user'] = $userid; |
898 | 897 | // Paranoia: avoid brute force searches (bug 17342) |
899 | | - if( !$wgUser->isAllowed( 'deletedhistory' ) || $wgUser->isBlocked() ) { |
| 898 | + $user = $this->getUser(); |
| 899 | + if( !$user->isAllowed( 'deletedhistory' ) || $user->isBlocked() ) { |
900 | 900 | $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::DELETED_USER) . ' = 0'; |
901 | | - } elseif( !$wgUser->isAllowed( 'suppressrevision' ) || $wgUser->isBlocked() ) { |
| 901 | + } elseif( !$user->isAllowed( 'suppressrevision' ) || $user->isBlocked() ) { |
902 | 902 | $this->mConds[] = $this->mDb->bitAnd('log_deleted', LogPage::SUPPRESSED_USER) . |
903 | 903 | ' != ' . LogPage::SUPPRESSED_USER; |
904 | 904 | } |
— | — | @@ -913,7 +913,7 @@ |
914 | 914 | * @param $pattern String |
915 | 915 | */ |
916 | 916 | private function limitTitle( $page, $pattern ) { |
917 | | - global $wgMiserMode, $wgUser; |
| 917 | + global $wgMiserMode; |
918 | 918 | |
919 | 919 | $title = Title::newFromText( $page ); |
920 | 920 | if( strlen( $page ) == 0 || !$title instanceof Title ) { |
— | — | @@ -944,9 +944,10 @@ |
945 | 945 | $this->mConds['log_title'] = $title->getDBkey(); |
946 | 946 | } |
947 | 947 | // Paranoia: avoid brute force searches (bug 17342) |
948 | | - if( !$wgUser->isAllowed( 'deletedhistory' ) || $wgUser->isBlocked() ) { |
| 948 | + $user = $this->getUser(); |
| 949 | + if( !$user->isAllowed( 'deletedhistory' ) || $user->isBlocked() ) { |
949 | 950 | $this->mConds[] = $db->bitAnd('log_deleted', LogPage::DELETED_ACTION) . ' = 0'; |
950 | | - } elseif( !$wgUser->isAllowed( 'suppressrevision' ) || $wgUser->isBlocked() ) { |
| 951 | + } elseif( !$user->isAllowed( 'suppressrevision' ) || $user->isBlocked() ) { |
951 | 952 | $this->mConds[] = $db->bitAnd('log_deleted', LogPage::SUPPRESSED_ACTION) . |
952 | 953 | ' != ' . LogPage::SUPPRESSED_ACTION; |
953 | 954 | } |