| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -2308,6 +2308,11 @@ |
| 2309 | 2309 | $wgExportMaxLinkDepth = 0; |
| 2310 | 2310 | |
| 2311 | 2311 | /** |
| | 2312 | + * Whether to allow the "export all pages in namespace" option |
| | 2313 | + */ |
| | 2314 | +$wgExportFromNamespaces = false; |
| | 2315 | + |
| | 2316 | +/** |
| 2312 | 2317 | * Edits matching these regular expressions in body text |
| 2313 | 2318 | * will be recognised as spam and rejected automatically. |
| 2314 | 2319 | * |
| Index: trunk/phase3/includes/specials/SpecialExport.php |
| — | — | @@ -33,6 +33,7 @@ |
| 34 | 34 | public function execute( $par ) { |
| 35 | 35 | global $wgOut, $wgRequest, $wgSitename, $wgExportAllowListContributors; |
| 36 | 36 | global $wgExportAllowHistory, $wgExportMaxHistory, $wgExportMaxLinkDepth; |
| | 37 | + global $wgExportFromNamespaces; |
| 37 | 38 | |
| 38 | 39 | $this->setHeaders(); |
| 39 | 40 | $this->outputHeader(); |
| — | — | @@ -62,7 +63,7 @@ |
| 63 | 64 | } |
| 64 | 65 | } |
| 65 | 66 | } |
| 66 | | - else if( $wgRequest->getCheck( 'addns' ) ) { |
| | 67 | + else if( $wgRequest->getCheck( 'addns' ) && $wgExportFromNamespaces ) { |
| 67 | 68 | $page = $wgRequest->getText( 'pages' ); |
| 68 | 69 | $nsindex = $wgRequest->getText( 'nsindex' ); |
| 69 | 70 | |
| — | — | @@ -149,8 +150,10 @@ |
| 150 | 151 | $form .= Xml::inputLabel( wfMsg( 'export-addcattext' ) , 'catname', 'catname', 40 ) . ' '; |
| 151 | 152 | $form .= Xml::submitButton( wfMsg( 'export-addcat' ), array( 'name' => 'addcat' ) ) . '<br />'; |
| 152 | 153 | |
| 153 | | - $form .= Xml::namespaceSelector( '', null, 'nsindex', wfMsg( 'export-addnstext' ) ) . ' '; |
| 154 | | - $form .= Xml::submitButton( wfMsg( 'export-addns' ), array( 'name' => 'addns' ) ) . '<br />'; |
| | 154 | + if ( $wgExportFromNamespaces ) { |
| | 155 | + $form .= Xml::namespaceSelector( '', null, 'nsindex', wfMsg( 'export-addnstext' ) ) . ' '; |
| | 156 | + $form .= Xml::submitButton( wfMsg( 'export-addns' ), array( 'name' => 'addns' ) ) . '<br />'; |
| | 157 | + } |
| 155 | 158 | |
| 156 | 159 | $form .= Xml::element( 'textarea', array( 'name' => 'pages', 'cols' => 40, 'rows' => 10 ), $page, false ); |
| 157 | 160 | $form .= '<br />'; |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -29,6 +29,8 @@ |
| 30 | 30 | instead of falling back to GD. |
| 31 | 31 | * Added $wgRedirectOnLogin to allow specifying a specifc page to redirect users |
| 32 | 32 | to upon logging in (ex: "Main Page") |
| | 33 | +* Add $wgExportFromNamespaces for enabling/disabling the "export all from |
| | 34 | + namespace" option (disabled by default) |
| 33 | 35 | |
| 34 | 36 | === New features in 1.15 === |
| 35 | 37 | |