https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114131

Revision: 114131
Author:   ialex
Date:     2012-03-19 12:30:52 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
Change calls from Xml::namespaceSelector() to Html::namespaceSelector() since 
the former now throws deprecation warnings... 

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialDeletedContributions.php
    trunk/phase3/includes/specials/SpecialExport.php
    trunk/phase3/includes/specials/SpecialImport.php
    trunk/phase3/includes/specials/SpecialLinkSearch.php
    trunk/phase3/includes/specials/SpecialNewpages.php
    trunk/phase3/includes/specials/SpecialProtectedpages.php
    trunk/phase3/includes/specials/SpecialProtectedtitles.php
    trunk/phase3/includes/specials/SpecialWatchlist.php
    trunk/phase3/includes/specials/SpecialWhatlinkshere.php

Modified: trunk/phase3/includes/specials/SpecialDeletedContributions.php
===================================================================
--- trunk/phase3/includes/specials/SpecialDeletedContributions.php      
2012-03-19 12:24:12 UTC (rev 114130)
+++ trunk/phase3/includes/specials/SpecialDeletedContributions.php      
2012-03-19 12:30:52 UTC (rev 114131)
@@ -492,8 +492,17 @@
                                'size' => '20',
                                'required' => ''
                        ) + ( $options['target'] ? array() : array( 'autofocus' 
) ) ) . ' '.
-                       Xml::label( $this->msg( 'namespace' )->text(), 
'namespace' ) . ' ' .
-                       Xml::namespaceSelector( $options['namespace'], '' ) . ' 
' .
+                       Html::namespaceSelector(
+                               array(
+                                       'selected' => $options['namespace'],
+                                       'all' => '',
+                                       'label' => $this->msg( 'namespace' 
)->text()
+                               ), array(
+                                       'name'  => 'namespace',
+                                       'id'    => 'namespace',
+                                       'class' => 'namespaceselector',
+                               )
+                       ) . ' ' .
                        Xml::submitButton( $this->msg( 
'sp-contributions-submit' )->text() ) .
                        Xml::closeElement( 'fieldset' ) .
                        Xml::closeElement( 'form' );

Modified: trunk/phase3/includes/specials/SpecialExport.php
===================================================================
--- trunk/phase3/includes/specials/SpecialExport.php    2012-03-19 12:24:12 UTC 
(rev 114130)
+++ trunk/phase3/includes/specials/SpecialExport.php    2012-03-19 12:30:52 UTC 
(rev 114131)
@@ -185,7 +185,16 @@
                $form .= Xml::submitButton( $this->msg( 'export-addcat' 
)->text(), array( 'name' => 'addcat' ) ) . '<br />';
 
                if ( $wgExportFromNamespaces ) {
-                       $form .= Xml::namespaceSelector( $nsindex, null, 
'nsindex', $this->msg( 'export-addnstext' )->text() ) . '&#160;';
+                       $form .= Html::namespaceSelector(
+                               array(
+                                       'selected' => $nsindex,
+                                       'label' => $this->msg( 
'export-addnstext' )->text()
+                               ), array(
+                                       'name'  => 'nsindex',
+                                       'id'    => 'namespace',
+                                       'class' => 'namespaceselector',
+                               )
+                       ) . '&#160;';
                        $form .= Xml::submitButton( $this->msg( 'export-addns' 
)->text(), array( 'name' => 'addns' ) ) . '<br />';
                }
 

Modified: trunk/phase3/includes/specials/SpecialImport.php
===================================================================
--- trunk/phase3/includes/specials/SpecialImport.php    2012-03-19 12:24:12 UTC 
(rev 114130)
+++ trunk/phase3/includes/specials/SpecialImport.php    2012-03-19 12:30:52 UTC 
(rev 114131)
@@ -279,7 +279,16 @@
                                                Xml::label( $this->msg( 
'import-interwiki-namespace' )->text(), 'namespace' ) .
                                        "</td>
                                        <td class='mw-input'>" .
-                                               Xml::namespaceSelector( 
$this->namespace, '' ) .
+                                               Html::namespaceSelector(
+                                                       array(
+                                                               'selected' => 
$this->namespace,
+                                                               'all' => '',
+                                                       ), array(
+                                                               'name'  => 
'namespace',
+                                                               'id'    => 
'namespace',
+                                                               'class' => 
'namespaceselector',
+                                                       )
+                                               ) .
                                        "</td>
                                </tr>
                                <tr>

Modified: trunk/phase3/includes/specials/SpecialLinkSearch.php
===================================================================
--- trunk/phase3/includes/specials/SpecialLinkSearch.php        2012-03-19 
12:24:12 UTC (rev 114130)
+++ trunk/phase3/includes/specials/SpecialLinkSearch.php        2012-03-19 
12:30:52 UTC (rev 114131)
@@ -91,8 +91,17 @@
                        Xml::element( 'legend', array(), $this->msg( 
'linksearch' )->text() ) .
                        Xml::inputLabel( $this->msg( 'linksearch-pat' 
)->text(), 'target', 'target', 50, $target ) . ' ';
                if ( !$wgMiserMode ) {
-                       $s .= Xml::label( $this->msg( 'linksearch-ns' 
)->text(), 'namespace' ) . ' ' .
-                               Xml::namespaceSelector( $namespace, '' );
+                       $s .= Html::namespaceSelector(
+                               array(
+                                       'selected' => $namespace,
+                                       'all' => '',
+                                       'label' => $this->msg( 'linksearch-ns' 
)->text()
+                               ), array(
+                                       'name'  => 'namespace',
+                                       'id'    => 'namespace',
+                                       'class' => 'namespaceselector',
+                               )
+                       );
                }
                $s .=   Xml::submitButton( $this->msg( 'linksearch-ok' 
)->text() ) .
                        '</fieldset>' .

Modified: trunk/phase3/includes/specials/SpecialNewpages.php
===================================================================
--- trunk/phase3/includes/specials/SpecialNewpages.php  2012-03-19 12:24:12 UTC 
(rev 114130)
+++ trunk/phase3/includes/specials/SpecialNewpages.php  2012-03-19 12:30:52 UTC 
(rev 114131)
@@ -237,7 +237,16 @@
                                        Xml::label( wfMsg( 'namespace' ), 
'namespace' ) .
                                '</td>
                                <td class="mw-input">' .
-                                       Xml::namespaceSelector( $namespace, 
'all' ) .
+                                       Html::namespaceSelector(
+                                               array(
+                                                       'selected' => 
$namespace,
+                                                       'all' => 'all',
+                                               ), array(
+                                                       'name'  => 'namespace',
+                                                       'id'    => 'namespace',
+                                                       'class' => 
'namespaceselector',
+                                               )
+                                       ) .
                                '</td>
                        </tr>' . ( $tagFilter ? (
                        '<tr>

Modified: trunk/phase3/includes/specials/SpecialProtectedpages.php
===================================================================
--- trunk/phase3/includes/specials/SpecialProtectedpages.php    2012-03-19 
12:24:12 UTC (rev 114130)
+++ trunk/phase3/includes/specials/SpecialProtectedpages.php    2012-03-19 
12:30:52 UTC (rev 114131)
@@ -187,8 +187,19 @@
         */
        protected function getNamespaceMenu( $namespace = null ) {
                return "<span style='white-space: nowrap'>" .
-                       Xml::label( wfMsg( 'namespace' ), 'namespace' ) . 
'&#160;'
-                       . Xml::namespaceSelector( $namespace, '' ) . "</span>";
+               Html::rawElement( 'span', array( 'style' => 
'white-space:nowrap' ),
+                       Html::namespaceSelector(
+                               array(
+                                       'selected' => $namespace,
+                                       'all' => '',
+                                       'label' => $this->msg( 'namespace' 
)->text()
+                               ), array(
+                                       'name'  => 'namespace',
+                                       'id'    => 'namespace',
+                                       'class' => 'namespaceselector',
+                               )
+                       )
+               );
        }
 
        /**

Modified: trunk/phase3/includes/specials/SpecialProtectedtitles.php
===================================================================
--- trunk/phase3/includes/specials/SpecialProtectedtitles.php   2012-03-19 
12:24:12 UTC (rev 114130)
+++ trunk/phase3/includes/specials/SpecialProtectedtitles.php   2012-03-19 
12:30:52 UTC (rev 114131)
@@ -138,9 +138,17 @@
         * @return string
         */
        function getNamespaceMenu( $namespace = null ) {
-               return Xml::label( wfMsg( 'namespace' ), 'namespace' )
-                       . '&#160;'
-                       . Xml::namespaceSelector( $namespace, '' );
+               return Html::namespaceSelector(
+                       array(
+                               'selected' => $namespace,
+                               'all' => '',
+                               'label' => $this->msg( 'namespace' )->text()
+                       ), array(
+                               'name'  => 'namespace',
+                               'id'    => 'namespace',
+                               'class' => 'namespaceselector',
+                       )
+               );
        }
 
        /**

Modified: trunk/phase3/includes/specials/SpecialWatchlist.php
===================================================================
--- trunk/phase3/includes/specials/SpecialWatchlist.php 2012-03-19 12:24:12 UTC 
(rev 114130)
+++ trunk/phase3/includes/specials/SpecialWatchlist.php 2012-03-19 12:30:52 UTC 
(rev 114131)
@@ -328,8 +328,17 @@
                $form .= $lang->pipeList( $links );
                $form .= Xml::openElement( 'form', array( 'method' => 'post', 
'action' => $this->getTitle()->getLocalUrl(), 'id' => 
'mw-watchlist-form-namespaceselector' ) );
                $form .= '<hr /><p>';
-               $form .= Xml::label( $this->msg( 'namespace' )->text(), 
'namespace' ) . '&#160;';
-               $form .= Xml::namespaceSelector( $nameSpace, '' ) . '&#160;';
+               $form .= Html::namespaceSelector(
+                       array(
+                               'selected' => $nameSpace,
+                               'all' => '',
+                               'label' => $this->msg( 'namespace' )->text()
+                       ), array(
+                               'name'  => 'namespace',
+                               'id'    => 'namespace',
+                               'class' => 'namespaceselector',
+                       )
+               ) . '&#160;';
                $form .= Xml::checkLabel( $this->msg( 'invert' )->text(), 
'invert', 'nsinvert', $invert ) . '&#160;';
                $form .= Xml::submitButton( $this->msg( 'allpagessubmit' 
)->text() ) . '</p>';
                $form .= Html::hidden( 'days', $values['days'] );

Modified: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
===================================================================
--- trunk/phase3/includes/specials/SpecialWhatlinkshere.php     2012-03-19 
12:24:12 UTC (rev 114130)
+++ trunk/phase3/includes/specials/SpecialWhatlinkshere.php     2012-03-19 
12:30:52 UTC (rev 114131)
@@ -413,8 +413,17 @@
                $f .= ' ';
 
                # Namespace selector
-               $f .= Xml::label( $this->msg( 'namespace' )->text(), 
'namespace' ) . '&#160;' .
-                       Xml::namespaceSelector( $namespace, '' );
+               $f .= Html::namespaceSelector(
+                       array(
+                               'selected' => $namespace,
+                               'all' => '',
+                               'label' => $this->msg( 'namespace' )->text()
+                       ), array(
+                               'name'  => 'namespace',
+                               'id'    => 'namespace',
+                               'class' => 'namespaceselector',
+                       )
+               );
 
                $f .= ' ';
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to