Merge "SpecialTrackingCategories: Read from the extension registry"
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 59e2bba..c2cd812 100644 (file)
@@ -176,7 +176,7 @@ class SpecialContributions extends IncludableSpecialPage {
                // Add RSS/atom links
                $this->addFeedLinks( $feedParams );
 
-               if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id, $userObj, $this ) ) ) {
+               if ( Hooks::run( 'SpecialContributionsBeforeMainOutput', array( $id, $userObj, $this ) ) ) {
                        if ( !$this->including() ) {
                                $out->addHTML( $this->getForm() );
                        }
@@ -386,7 +386,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        );
                }
 
-               wfRunHooks( 'ContributionsToolLinks', array( $id, $userpage, &$tools ) );
+               Hooks::run( 'ContributionsToolLinks', array( $id, $userpage, &$tools ) );
 
                return $tools;
        }
@@ -658,7 +658,7 @@ class ContribsPager extends ReverseChronologicalPager {
        public $mDb;
        public $preventClickjacking = false;
 
-       /** @var DatabaseBase */
+       /** @var IDatabase */
        public $mDbSecondary;
 
        /**
@@ -672,10 +672,7 @@ class ContribsPager extends ReverseChronologicalPager {
                $msgs = array(
                        'diff',
                        'hist',
-                       'newarticle',
                        'pipe-separator',
-                       'rev-delundel',
-                       'rollbacklink',
                        'uctop'
                );
 
@@ -714,7 +711,7 @@ class ContribsPager extends ReverseChronologicalPager {
 
        /**
         * This method basically executes the exact same code as the parent class, though with
-        * a hook added, to allow extentions to add additional queries.
+        * a hook added, to allow extensions to add additional queries.
         *
         * @param string $offset Index offset, inclusive
         * @param int $limit Exact query limit
@@ -750,7 +747,7 @@ class ContribsPager extends ReverseChronologicalPager {
                $data = array( $this->mDb->select(
                        $tables, $fields, $conds, $fname, $options, $join_conds
                ) );
-               wfRunHooks(
+               Hooks::run(
                        'ContribsPager::reallyDoQuery',
                        array( &$data, $pager, $offset, $limit, $descending )
                );
@@ -827,7 +824,7 @@ class ContribsPager extends ReverseChronologicalPager {
                        $this->tagFilter
                );
 
-               wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
+               Hooks::run( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
 
                return $queryInfo;
        }
@@ -957,7 +954,6 @@ class ContribsPager extends ReverseChronologicalPager {
         * @return string
         */
        function formatRow( $row ) {
-               wfProfileIn( __METHOD__ );
 
                $ret = '';
                $classes = array();
@@ -973,7 +969,7 @@ class ContribsPager extends ReverseChronologicalPager {
                try {
                        $rev = new Revision( $row );
                        $validRevision = (bool)$rev->getId();
-               } catch ( MWException $e ) {
+               } catch ( Exception $e ) {
                        $validRevision = false;
                }
                wfRestoreWarnings();
@@ -1112,7 +1108,7 @@ class ContribsPager extends ReverseChronologicalPager {
                }
 
                // Let extensions add data
-               wfRunHooks( 'ContributionsLineEnding', array( $this, &$ret, $row, &$classes ) );
+               Hooks::run( 'ContributionsLineEnding', array( $this, &$ret, $row, &$classes ) );
 
                if ( $classes === array() && $ret === '' ) {
                        wfDebug( "Dropping Special:Contribution row that could not be formatted\n" );
@@ -1121,8 +1117,6 @@ class ContribsPager extends ReverseChronologicalPager {
                        $ret = Html::rawElement( 'li', array( 'class' => $classes ), $ret ) . "\n";
                }
 
-               wfProfileOut( __METHOD__ );
-
                return $ret;
        }