* Use XML functions to create the form on Special:Export
authorRob Church <robchurch@users.mediawiki.org>
Sun, 25 Jun 2006 01:21:17 +0000 (01:21 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sun, 25 Jun 2006 01:21:17 +0000 (01:21 +0000)
* (bug 6434) Allow customisation of submit button text on Special:Export
* Tweak default text for "exportnohistory"

RELEASE-NOTES
includes/SpecialExport.php
languages/Messages.php

index 9e37d62..e5517b1 100644 (file)
@@ -560,6 +560,7 @@ Some default configuration options have changed:
 * (bug 5903) When requesting the raw source of a non-existent message page,
   return blank content (as opposed to the message key)
 * Improve default blank content of MediaWiki:Common.css and MediaWiki:Monobook.css
+* (bug 6434) Allow customisation of submit button text on Special:Export
 
 == Compatibility ==
 
index 054a7e7..4045bc4 100644 (file)
@@ -64,22 +64,17 @@ function wfSpecialExport( $page = '' ) {
 
        $wgOut->addWikiText( wfMsg( "exporttext" ) );
        $titleObj = Title::makeTitle( NS_SPECIAL, "Export" );
-       $action = $titleObj->escapeLocalURL( 'action=submit' );
+       
+       $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalUrl() ) );
+       $form .= wfOpenElement( 'textarea', array( 'name' => 'pages', 'cols' => 40, 'rows' => 10 ) ) . '</textarea><br />';
        if( $wgExportAllowHistory ) {
-               $checkbox = "<label><input type='checkbox' name='curonly' value='true' checked='checked' />
-" . wfMsgHtml( 'exportcuronly' ) . "</label><br />";
+               $form .= wfCheck( 'curonly', true, array( 'value' => 'true', 'id' => 'curonly' ) );
+               $form .= wfLabel( wfMsg( 'exportcuronly' ), 'curonly' ) . '<br />';
        } else {
-               $checkbox = "";
-               $wgOut->addWikiText( wfMsg( "exportnohistory" ) );
+               $wgOut->addWikiText( wfMsg( 'exportnohistory' ) );
        }
-       $wgOut->addHTML( "
-<form method='post' action=\"$action\">
-<input type='hidden' name='action' value='submit' />
-<textarea name='pages' cols='40' rows='10'></textarea><br />
-$checkbox
-<input type='submit' />
-</form>
-" );
+       $form .= wfSubmitButton( wfMsg( 'export-submit' ) ) . '</form>';
+       $wgOut->addHtml( $form );
 }
 
 ?>
index 8e4f219..2ab49fc 100644 (file)
@@ -1431,7 +1431,8 @@ history lines, or just the current version with the info about the last edit.
 In the latter case you can also use a link, e.g. [[{{ns:Special}}:Export/{{int:mainpage}}]] for the page {{int:mainpage}}.',
 'exportcuronly'        => 'Include only the current revision, not the full history',
 'exportnohistory' => "----
-'''Note:''' exporting the full history of pages through this form has been disabled due to performance reasons.",
+'''Note:''' Exporting the full history of pages through this form has been disabled due to performance reasons.",
+'export-submit' => 'Export',
 
 # Namespace 8 related