Export: Preloading the category name through a URL parameter
authorayush_garg <ayush.ce13@iitp.ac.in>
Wed, 11 Feb 2015 11:13:26 +0000 (16:43 +0530)
committerUmherirrender <umherirrender_de.wp@web.de>
Sun, 22 Feb 2015 12:58:44 +0000 (12:58 +0000)
Bug: T88683
Change-Id: Iff7d4c1e7138c5160dbaa7b2455695837026d6c1

includes/specials/SpecialExport.php

index 38c52a0..c30d962 100644 (file)
@@ -182,13 +182,20 @@ class SpecialExport extends SpecialPage {
                $out = $this->getOutput();
                $out->addWikiMsg( 'exporttext' );
 
+               if ( $page == '' ) {
+                       $categoryName = $request->getText( 'catname' );
+               } else {
+                       $categoryName = '';
+               }
+
                $form = Xml::openElement( 'form', array( 'method' => 'post',
                        'action' => $this->getPageTitle()->getLocalURL( 'action=submit' ) ) );
                $form .= Xml::inputLabel(
                        $this->msg( 'export-addcattext' )->text(),
                        'catname',
                        'catname',
-                       40
+                       40,
+                       $categoryName
                ) . '&#160;';
                $form .= Xml::submitButton(
                        $this->msg( 'export-addcat' )->text(),