From 4524dd2596d557d9a9789b8eabaa8efd72d1a3fe Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 25 Jun 2006 01:21:17 +0000 Subject: [PATCH] * Use XML functions to create the form on Special:Export * (bug 6434) Allow customisation of submit button text on Special:Export * Tweak default text for "exportnohistory" --- RELEASE-NOTES | 1 + includes/SpecialExport.php | 21 ++++++++------------- languages/Messages.php | 3 ++- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9e37d62414..e5517b15bd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SpecialExport.php b/includes/SpecialExport.php index 054a7e7897..4045bc482c 100644 --- a/includes/SpecialExport.php +++ b/includes/SpecialExport.php @@ -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 ) ) . '
'; if( $wgExportAllowHistory ) { - $checkbox = "
"; + $form .= wfCheck( 'curonly', true, array( 'value' => 'true', 'id' => 'curonly' ) ); + $form .= wfLabel( wfMsg( 'exportcuronly' ), 'curonly' ) . '
'; } else { - $checkbox = ""; - $wgOut->addWikiText( wfMsg( "exportnohistory" ) ); + $wgOut->addWikiText( wfMsg( 'exportnohistory' ) ); } - $wgOut->addHTML( " -
- -
-$checkbox - -
-" ); + $form .= wfSubmitButton( wfMsg( 'export-submit' ) ) . ''; + $wgOut->addHtml( $form ); } ?> diff --git a/languages/Messages.php b/languages/Messages.php index 8e4f2195cf..2ab49fcf82 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -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 -- 2.20.1