Fix (
[lhc/web/wiklou.git] / includes / specialpage / ChangesListSpecialPage.php
index 3c8bdcc..c28aa86 100644 (file)
@@ -291,8 +291,8 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                        ''
                );
 
-               if ( !wfRunHooks( 'ChangesListSpecialPageQuery',
-                       array( $this->getName(), &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) )
+               if ( !$this->runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds,
+                       $opts )
                ) {
                        return false;
                }
@@ -309,6 +309,13 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                );
        }
 
+       protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) {
+               return wfRunHooks(
+                       'ChangesListSpecialPageQuery',
+                       array( $this->getName(), &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts )
+               );
+       }
+
        /**
         * Return a DatabaseBase object for reading
         *
@@ -403,12 +410,11 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         * @return string
         */
        public static function makeLegend( IContextSource $context ) {
-               global $wgRecentChangesFlags;
                $user = $context->getUser();
                # The legend showing what the letters and stuff mean
                $legend = Html::openElement( 'dl' ) . "\n";
                # Iterates through them and gets the messages for both letter and tooltip
-               $legendItems = $wgRecentChangesFlags;
+               $legendItems = $context->getConfig()->get( 'RecentChangesFlags' );
                if ( !( $user->useRCPatrol() || $user->useNPPatrol() ) ) {
                        unset( $legendItems['unpatrolled'] );
                }