Merge "Fix phpcs errors and warnings in includes/filerepo"
[lhc/web/wiklou.git] / includes / specials / SpecialExport.php
index e4e4bfb..c30d962 100644 (file)
@@ -37,10 +37,6 @@ class SpecialExport extends SpecialPage {
        }
 
        public function execute( $par ) {
-               global $wgSitename, $wgExportAllowListContributors, $wgExportFromNamespaces;
-               global $wgExportAllowHistory, $wgExportMaxHistory, $wgExportMaxLinkDepth;
-               global $wgExportAllowAll;
-
                $this->setHeaders();
                $this->outputHeader();
                $config = $this->getConfig();
@@ -186,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
                ) . ' ';
                $form .= Xml::submitButton(
                        $this->msg( 'export-addcat' )->text(),