Unbreak master by restoring Profiler::profile(In|Out)
[lhc/web/wiklou.git] / includes / specials / SpecialNewpages.php
index ad1f051..82cd0a1 100644 (file)
@@ -56,7 +56,7 @@ class SpecialNewpages extends IncludableSpecialPage {
                $opts->add( 'invert', false );
 
                $this->customFilters = array();
-               wfRunHooks( 'SpecialNewPagesFilters', array( $this, &$this->customFilters ) );
+               Hooks::run( 'SpecialNewPagesFilters', array( $this, &$this->customFilters ) );
                foreach ( $this->customFilters as $key => $params ) {
                        $opts->add( $key, $params['default'] );
                }
@@ -199,6 +199,8 @@ class SpecialNewpages extends IncludableSpecialPage {
 
        protected function form() {
                $out = $this->getOutput();
+               $out->addModules( 'mediawiki.userSuggest' );
+
                // Consume values
                $this->opts->consumeValue( 'offset' ); // don't carry offset, DWIW
                $namespace = $this->opts->consumeValue( 'namespace' );
@@ -226,7 +228,7 @@ class SpecialNewpages extends IncludableSpecialPage {
                        ),
                        'nsinvert' => array(
                                'type' => 'check',
-                               'name' => 'nsinvert',
+                               'name' => 'invert',
                                'label-message' => 'invert',
                                'default' => $nsinvert,
                                'tooltip' => $this->msg( 'tooltip-invert' )->text(),
@@ -234,7 +236,7 @@ class SpecialNewpages extends IncludableSpecialPage {
                        'tagFilter' => array(
                                'type' => 'tagfilter',
                                'name' => 'tagfilter',
-                               'label-raw' => wfMessage( 'tag-filter' )->parse(),
+                               'label-raw' => $this->msg( 'tag-filter' )->parse(),
                                'default' => $tagFilterVal,
                        ),
                        'username' => array(
@@ -546,7 +548,7 @@ class NewPagesPager extends ReverseChronologicalPager {
                );
                $join_conds = array( 'page' => array( 'INNER JOIN', 'page_id=rc_cur_id' ) );
 
-               wfRunHooks( 'SpecialNewpagesConditions',
+               Hooks::run( 'SpecialNewpagesConditions',
                        array( &$this, $this->opts, &$conds, &$tables, &$fields, &$join_conds ) );
 
                $options = array();