http://www.mediawiki.org/wiki/Special:Code/MediaWiki/84572

Revision: 84572
Author:   hashar
Date:     2011-03-22 22:07:53 +0000 (Tue, 22 Mar 2011)
Log Message:
-----------
Convert special pages form actions to nice URLs

This make use of the recent SpecialPage->getFormAction() method introduced
with r84571. Using it to replace our ugly $wgScript / $title->getTitle etc.

Modified Paths:
--------------
    branches/hashar/prettyURL/includes/specials/SpecialAllmessages.php
    branches/hashar/prettyURL/includes/specials/SpecialAllpages.php
    branches/hashar/prettyURL/includes/specials/SpecialBooksources.php
    branches/hashar/prettyURL/includes/specials/SpecialFileDuplicateSearch.php
    branches/hashar/prettyURL/includes/specials/SpecialFilepath.php
    branches/hashar/prettyURL/includes/specials/SpecialLinkSearch.php
    branches/hashar/prettyURL/includes/specials/SpecialMIMEsearch.php
    branches/hashar/prettyURL/includes/specials/SpecialMergeHistory.php
    branches/hashar/prettyURL/includes/specials/SpecialNewpages.php
    branches/hashar/prettyURL/includes/specials/SpecialPrefixindex.php
    branches/hashar/prettyURL/includes/specials/SpecialProtectedpages.php
    branches/hashar/prettyURL/includes/specials/SpecialProtectedtitles.php
    branches/hashar/prettyURL/includes/specials/SpecialRecentchanges.php
    branches/hashar/prettyURL/includes/specials/SpecialSearch.php
    branches/hashar/prettyURL/includes/specials/SpecialUndelete.php
    branches/hashar/prettyURL/includes/specials/SpecialUserrights.php
    branches/hashar/prettyURL/includes/specials/SpecialWhatlinkshere.php
    branches/hashar/prettyURL/includes/specials/SpecialWithoutinterwiki.php

Modified: branches/hashar/prettyURL/includes/specials/SpecialAllmessages.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialAllmessages.php  
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialAllmessages.php  
2011-03-22 22:07:53 UTC (rev 84572)
@@ -83,14 +83,11 @@
        }
 
        function buildForm() {
-               global $wgScript;
-
                $languages = Language::getLanguageNames( false );
                ksort( $languages );
 
-               $out  = Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript, 'id' => 'mw-allmessages-form' ) ) .
+               $out  = Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $this->getFormAction(), 'id' => 'mw-allmessages-form' ) ) .
                        Xml::fieldset( wfMsg( 'allmessages-filter-legend' ) ) .
-                       Html::hidden( 'title', 
$this->getTitle()->getPrefixedText() ) .
                        Xml::openElement( 'table', array( 'class' => 
'mw-allmessages-table' ) ) . "\n" .
                        '<tr>
                                <td class="mw-label">' .

Modified: branches/hashar/prettyURL/includes/specials/SpecialAllpages.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialAllpages.php     
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialAllpages.php     
2011-03-22 22:07:53 UTC (rev 84572)
@@ -95,12 +95,9 @@
         * @param $to String: dbKey we are ending listing at.
         */
        function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '' ) {
-               global $wgScript;
-               $t = $this->getTitle();
 
                $out  = Xml::openElement( 'div', array( 'class' => 
'namespaceoptions' ) );
-               $out .= Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript ) );
-               $out .= Html::hidden( 'title', $t->getPrefixedText() );
+               $out .= Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $this->getFormAction() ) );
                $out .= Xml::openElement( 'fieldset' );
                $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) );
                $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 
'class' => 'allpages' ) );

Modified: branches/hashar/prettyURL/includes/specials/SpecialBooksources.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialBooksources.php  
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialBooksources.php  
2011-03-22 22:07:53 UTC (rev 84572)
@@ -114,11 +114,8 @@
         * @return string
         */
        private function makeForm() {
-               global $wgScript;
-               $title = self::getTitleFor( 'Booksources' );
                $form  = '<fieldset><legend>' . wfMsgHtml( 
'booksources-search-legend' ) . '</legend>';
-               $form .= Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript ) );
-               $form .= Html::hidden( 'title', $title->getPrefixedText() );
+               $form .= Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $this->getFormAction() ) );
                $form .= '<p>' . Xml::inputLabel( wfMsg( 'booksources-isbn' ), 
'isbn', 'isbn', 20, $this->isbn );
                $form .= '&#160;' . Xml::submitButton( wfMsg( 'booksources-go' 
) ) . '</p>';
                $form .= Xml::closeElement( 'form' );

Modified: 
branches/hashar/prettyURL/includes/specials/SpecialFileDuplicateSearch.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialFileDuplicateSearch.php  
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialFileDuplicateSearch.php  
2011-03-22 22:07:53 UTC (rev 84572)
@@ -91,7 +91,7 @@
        }
 
        function execute( $par ) {
-               global $wgRequest, $wgOut, $wgLang, $wgContLang, $wgScript;
+               global $wgRequest, $wgOut, $wgLang, $wgContLang;
 
                $this->setHeaders();
                $this->outputHeader();
@@ -106,8 +106,7 @@
 
                # Create the input form
                $wgOut->addHTML(
-                       Xml::openElement( 'form', array( 'id' => 
'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) .
-                       Html::hidden( 'title', 
$this->getTitle()->getPrefixedDbKey() ) .
+                       Xml::openElement( 'form', array( 'id' => 
'fileduplicatesearch', 'method' => 'get', 'action' => $this->getFormAction() ) 
) .
                        Xml::openElement( 'fieldset' ) .
                        Xml::element( 'legend', null, wfMsg( 
'fileduplicatesearch-legend' ) ) .
                        Xml::inputLabel( wfMsg( 'fileduplicatesearch-filename' 
), 'filename', 'filename', 50, $this->filename ) . ' ' .

Modified: branches/hashar/prettyURL/includes/specials/SpecialFilepath.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialFilepath.php     
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialFilepath.php     
2011-03-22 22:07:53 UTC (rev 84572)
@@ -71,13 +71,12 @@
        }
 
        function showForm( $title ) {
-               global $wgOut, $wgScript;
+               global $wgOut;
 
                $wgOut->addHTML(
-                       Html::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript, 'id' => 'specialfilepath' ) ) .
+                       Html::openElement( 'form', array( 'method' => 'get', 
'action' => $this->getFormAction(), 'id' => 'specialfilepath' ) ) .
                        Html::openElement( 'fieldset' ) .
                        Html::element( 'legend', null, wfMsg( 'filepath' ) ) .
-                       Html::hidden( 'title', 
$this->getTitle()->getPrefixedText() ) .
                        Xml::inputLabel( wfMsg( 'filepath-page' ), 'file', 
'file', 25, is_object( $title ) ? $title->getText() : '' ) . ' ' .
                        Xml::submitButton( wfMsg( 'filepath-submit' ) ) . "\n" .
                        Html::closeElement( 'fieldset' ) .

Modified: branches/hashar/prettyURL/includes/specials/SpecialLinkSearch.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialLinkSearch.php   
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialLinkSearch.php   
2011-03-22 22:07:53 UTC (rev 84572)
@@ -42,6 +42,7 @@
                return false;
        }
 
+       /** @todo rewrite this function to make it cleaner! Please? :( */
        function execute( $par ) {
                global $wgOut, $wgRequest, $wgUrlProtocols, $wgMiserMode, 
$wgLang;
                $this->setHeaders();
@@ -80,8 +81,7 @@
                $self = $this->getTitle();
 
                $wgOut->addWikiMsg( 'linksearch-text', '<nowiki>' . 
$wgLang->commaList( $wgUrlProtocols ) . '</nowiki>' );
-               $s = Xml::openElement( 'form', array( 'id' => 
'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
-                       Html::hidden( 'title', $self->getPrefixedDbKey() ) .
+               $s = Xml::openElement( 'form', array( 'id' => 
'mw-linksearch-form', 'method' => 'get', 'action' => $this->getFormAction() ) ) 
.
                        '<fieldset>' .
                        Xml::element( 'legend', array(), wfMsg( 'linksearch' ) 
) .
                        Xml::inputLabel( wfMsg( 'linksearch-pat' ), 'target', 
'target', 50, $target ) . ' ';

Modified: branches/hashar/prettyURL/includes/specials/SpecialMIMEsearch.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialMIMEsearch.php   
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialMIMEsearch.php   
2011-03-22 22:07:53 UTC (rev 84572)
@@ -65,9 +65,8 @@
                $this->setHeaders();
                $this->outputHeader();
                $wgOut->addHTML(
-                       Xml::openElement( 'form', array( 'id' => 
'specialmimesearch', 'method' => 'get', 'action' => SpecialPage::getTitleFor( 
'MIMEsearch' )->getLocalUrl() ) ) .
+                       Xml::openElement( 'form', array( 'id' => 
'specialmimesearch', 'method' => 'get', 'action' => $this->getFormAction() ) ) .
                        Xml::openElement( 'fieldset' ) .
-                       Html::hidden( 'title', SpecialPage::getTitleFor( 
'MIMEsearch' )->getPrefixedText() ) .
                        Xml::element( 'legend', null, wfMsg( 'mimesearch' ) ) .
                        Xml::inputLabel( wfMsg( 'mimetype' ), 'mime', 'mime', 
20, $mime ) . ' ' .
                        Xml::submitButton( wfMsg( 'ilsubmit' ) ) .

Modified: branches/hashar/prettyURL/includes/specials/SpecialMergeHistory.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialMergeHistory.php 
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialMergeHistory.php 
2011-03-22 22:07:53 UTC (rev 84572)
@@ -131,18 +131,17 @@
        }
 
        function showMergeForm() {
-               global $wgOut, $wgScript;
+               global $wgOut ;
 
                $wgOut->addWikiMsg( 'mergehistory-header' );
 
                $wgOut->addHTML(
                        Xml::openElement( 'form', array(
                                'method' => 'get',
-                               'action' => $wgScript ) ) .
+                               'action' => $this->getFormAction() ) ) .
                        '<fieldset>' .
                        Xml::element( 'legend', array(),
                                wfMsg( 'mergehistory-box' ) ) .
-                       Html::hidden( 'title', 
$this->getTitle()->getPrefixedDbKey() ) .
                        Html::hidden( 'submitted', '1' ) .
                        Html::hidden( 'mergepoint', $this->mTimestamp ) .
                        Xml::openElement( 'table' ) .

Modified: branches/hashar/prettyURL/includes/specials/SpecialNewpages.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialNewpages.php     
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialNewpages.php     
2011-03-22 22:07:53 UTC (rev 84572)
@@ -203,7 +203,7 @@
        }
 
        protected function form() {
-               global $wgOut, $wgEnableNewpagesUserFilter, $wgScript;
+               global $wgOut, $wgEnableNewpagesUserFilter;
 
                // Consume values
                $this->opts->consumeValue( 'offset' ); // don't carry offset, 
DWIW
@@ -227,8 +227,7 @@
                        list( $tagFilterLabel, $tagFilterSelector ) = 
$tagFilter;
                }
 
-               $form = Xml::openElement( 'form', array( 'action' => $wgScript 
) ) .
-                       Html::hidden( 'title', 
$this->getTitle()->getPrefixedDBkey() ) .
+               $form = Xml::openElement( 'form', array( 'action' => 
$this->getFormAction() ) ) .
                        Xml::fieldset( wfMsg( 'newpages' ) ) .
                        Xml::openElement( 'table', array( 'id' => 
'mw-newpages-table' ) ) .
                        '<tr>

Modified: branches/hashar/prettyURL/includes/specials/SpecialPrefixindex.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialPrefixindex.php  
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialPrefixindex.php  
2011-03-22 22:07:53 UTC (rev 84572)
@@ -77,12 +77,9 @@
        * @param $from String: dbKey we are starting listing at.
        */
        function namespacePrefixForm( $namespace = NS_MAIN, $from = '' ) {
-               global $wgScript;
-               $t = $this->getTitle();
 
                $out  = Xml::openElement( 'div', array( 'class' => 
'namespaceoptions' ) );
-               $out .= Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript ) );
-               $out .= Html::hidden( 'title', $t->getPrefixedText() );
+               $out .= Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $this->getFormAction() ) );
                $out .= Xml::openElement( 'fieldset' );
                $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) );
                $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 
'class' => 'allpages' ) );

Modified: branches/hashar/prettyURL/includes/specials/SpecialProtectedpages.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialProtectedpages.php       
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialProtectedpages.php       
2011-03-22 22:07:53 UTC (rev 84572)
@@ -159,12 +159,9 @@
         * @return String: input form
         */
        protected function showOptions( $namespace, $type='edit', $level, 
$sizetype, $size, $indefOnly, $cascadeOnly ) {
-               global $wgScript;
-               $title = SpecialPage::getTitleFor( 'Protectedpages' );
-               return Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript ) ) .
+               return Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $this->getFormAction() ) ) .
                        Xml::openElement( 'fieldset' ) .
                        Xml::element( 'legend', array(), wfMsg( 
'protectedpages' ) ) .
-                       Html::hidden( 'title', $title->getPrefixedDBkey() ) . 
"\n" .
                        $this->getNamespaceMenu( $namespace ) . "&#160;\n" .
                        $this->getTypeMenu( $type ) . "&#160;\n" .
                        $this->getLevelMenu( $level ) . "&#160;\n" .

Modified: branches/hashar/prettyURL/includes/specials/SpecialProtectedtitles.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialProtectedtitles.php      
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialProtectedtitles.php      
2011-03-22 22:07:53 UTC (rev 84572)
@@ -112,14 +112,10 @@
         * @private
         */
        function showOptions( $namespace, $type='edit', $level ) {
-               global $wgScript;
-               $action = htmlspecialchars( $wgScript );
-               $title = SpecialPage::getTitleFor( 'Protectedtitles' );
-               $special = htmlspecialchars( $title->getPrefixedDBkey() );
-               return "<form action=\"$action\" method=\"get\">\n" .
+               # FIXME use Xml: or Html: methods to build the form
+               return "<form action=\"". $this->getFormAction()."\" 
method=\"get\">\n" .
                        '<fieldset>' .
                        Xml::element( 'legend', array(), wfMsg( 
'protectedtitles' ) ) .
-                       Html::hidden( 'title', $special ) . "&#160;\n" .
                        $this->getNamespaceMenu( $namespace ) . "&#160;\n" .
                        $this->getLevelMenu( $level ) . "&#160;\n" .
                        "&#160;" . Xml::submitButton( wfMsg( 'allpagessubmit' ) 
) . "\n" .

Modified: branches/hashar/prettyURL/includes/specials/SpecialRecentchanges.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialRecentchanges.php        
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialRecentchanges.php        
2011-03-22 22:07:53 UTC (rev 84572)
@@ -510,9 +510,7 @@
                        $out .= Html::hidden( $key, $value );
                }
 
-               $t = $this->getTitle();
-               $out .= Html::hidden( 'title', $t->getPrefixedText() );
-               $form = Xml::tags( 'form', array( 'action' => $wgScript ), $out 
);
+               $form = Xml::tags( 'form', array( 'action' => 
$this->getFormAction() ), $out );
                $panel[] = $form;
                $panelString = implode( "\n", $panel );
 

Modified: branches/hashar/prettyURL/includes/specials/SpecialSearch.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialSearch.php       
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialSearch.php       
2011-03-22 22:07:53 UTC (rev 84572)
@@ -218,7 +218,7 @@
                                array(
                                        'id' => ( $this->searchAdvanced ? 
'powersearch' : 'search' ),
                                        'method' => 'get',
-                                       'action' => $wgScript
+                                       'action' => $this->getFormAction(),
                                )
                        )
                );
@@ -836,7 +836,6 @@
                        $namespaceTables .
                        Xml::element( 'div', array( 'class' => 'divider' ), '', 
false ) .
                        $redirects .
-                       Html::hidden( 'title', SpecialPage::getTitleFor( 
'Search' )->getPrefixedText() ) .
                        Html::hidden( 'advanced', $this->searchAdvanced ) .
                        Html::hidden( 'fulltext', 'Advanced search' ) .
                        Xml::closeElement( 'fieldset' );
@@ -960,8 +959,6 @@
        }
 
        protected function shortDialog( $term ) {
-               $searchTitle = SpecialPage::getTitleFor( 'Search' );
-               $out = Html::hidden( 'title', $searchTitle->getPrefixedText() ) 
. "\n";
                // Keep redirect setting
                $out .= Html::hidden( "redirs", (int)$this->searchRedirects ) . 
"\n";
                // Term box

Modified: branches/hashar/prettyURL/includes/specials/SpecialUndelete.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialUndelete.php     
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialUndelete.php     
2011-03-22 22:07:53 UTC (rev 84572)
@@ -718,16 +718,15 @@
        }
 
        function showSearchForm() {
-               global $wgOut, $wgScript;
+               global $wgOut;
                $wgOut->addWikiMsg( 'undelete-header' );
 
                $wgOut->addHTML(
                        Xml::openElement( 'form', array(
                                'method' => 'get',
-                               'action' => $wgScript ) ) .
+                               'action' => $this->getFormAction(),
+                               ) ) .
                        Xml::fieldset( wfMsg( 'undelete-search-box' ) ) .
-                       Html::hidden( 'title',
-                               $this->getTitle()->getPrefixedDbKey() ) .
                        Xml::inputLabel( wfMsg( 'undelete-search-prefix' ),
                                'prefix', 'prefix', 20,
                                $this->mSearchPrefix ) . ' ' .

Modified: branches/hashar/prettyURL/includes/specials/SpecialUserrights.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialUserrights.php   
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialUserrights.php   
2011-03-22 22:07:53 UTC (rev 84572)
@@ -372,10 +372,14 @@
         * Output a form to allow searching for a user
         */
        function switchForm() {
-               global $wgOut, $wgScript;
+               global $wgOut;
                $wgOut->addHTML(
-                       Html::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) .
-                       Html::hidden( 'title',  
$this->getTitle()->getPrefixedText() ) .
+                       Html::openElement( 'form', array(
+                               'action' => $this->getFormAction(),
+                               'id' => 'mw-userrights-form1',
+                               'method' => 'get',
+                               'name' => 'uluser',
+                               ) ) .
                        Xml::fieldset( wfMsg( 'userrights-lookup-user' ) ) .
                        Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 
'user', 'username', 30, str_replace( '_', ' ', $this->mTarget ) ) . ' ' .
                        Xml::submitButton( wfMsg( 'editusergroup' ) ) .
@@ -438,7 +442,12 @@
                        $grouplist .= '<p>' . $autogrouplistintro  . ' ' . 
$wgLang->listToText( $autolist ) . "</p>\n";
                }
                $wgOut->addHTML(
-                       Xml::openElement( 'form', array( 'method' => 'post', 
'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 
'mw-userrights-form2' ) ) .
+                       Xml::openElement( 'form', array(
+                               'action' => $this->getFormAction(),
+                               'id' => 'mw-userrights-form2',
+                               'method' => 'post',
+                               'name' => 'editGroup',
+                       ) ) .
                        Html::hidden( 'user', $this->mTarget ) .
                        Html::hidden( 'wpEditToken', $wgUser->editToken( 
$this->mTarget ) ) .
                        Xml::openElement( 'fieldset' ) .

Modified: branches/hashar/prettyURL/includes/specials/SpecialWhatlinkshere.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialWhatlinkshere.php        
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialWhatlinkshere.php        
2011-03-22 22:07:53 UTC (rev 84572)
@@ -380,10 +380,9 @@
                $namespace = $this->opts->consumeValue( 'namespace' );
 
                # Build up the form
-               $f = Xml::openElement( 'form', array( 'action' => $wgScript ) );
+               $f = Xml::openElement( 'form', array( 'action' => 
$this->getFormAction() ) );
 
                # Values that should not be forgotten
-               $f .= Html::hidden( 'title', 
$this->getTitle()->getPrefixedText() );
                foreach ( $this->opts->getUnconsumedValues() as $name => $value 
) {
                        $f .= Html::hidden( $name, $value );
                }

Modified: 
branches/hashar/prettyURL/includes/specials/SpecialWithoutinterwiki.php
===================================================================
--- branches/hashar/prettyURL/includes/specials/SpecialWithoutinterwiki.php     
2011-03-22 22:05:42 UTC (rev 84571)
+++ branches/hashar/prettyURL/includes/specials/SpecialWithoutinterwiki.php     
2011-03-22 22:07:53 UTC (rev 84572)
@@ -41,7 +41,7 @@
        }
 
        function getPageHeader() {
-               global $wgScript, $wgMiserMode;
+               global $wgMiserMode;
 
                # Do not show useless input form if wiki is running in misermode
                if( $wgMiserMode ) {
@@ -49,12 +49,10 @@
                }
 
                $prefix = $this->prefix;
-               $t = SpecialPage::getTitleFor( $this->getName() );
 
-               return  Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $wgScript ) ) .
+               return  Xml::openElement( 'form', array( 'method' => 'get', 
'action' => $this->getFormAction() ) ) .
                        Xml::openElement( 'fieldset' ) .
                        Xml::element( 'legend', null, wfMsg( 
'withoutinterwiki-legend' ) ) .
-                       Html::hidden( 'title', $t->getPrefixedText() ) .
                        Xml::inputLabel( wfMsg( 'allpagesprefix' ), 'prefix', 
'wiprefix', 20, $prefix ) . ' ' .
                        Xml::submitButton( wfMsg( 'withoutinterwiki-submit' ) ) 
.
                        Xml::closeElement( 'fieldset' ) .


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

Reply via email to