* (bug 4456) Add hook for marking article patrolled
* (bug 3194) default implementation of translateBlockExpiry
which uses ipboptions
+* (bug 4446) $wgExportAllowHistory option to explicitly disable history in
+ Special:Export form, 'exportnohistory' message to translate live hack.
=== Caveats ===
*/
$wgImportSources = array();
+/**
+ * If set to false, disables the full-history option on Special:Export.
+ * This is currently poorly optimized for long edit histories, so is
+ * disabled on Wikimedia's sites.
+ */
+$wgExportAllowHistory = true;
/** Text matching this regular expression will be recognised as spam
*/
function wfSpecialExport( $page = '' ) {
global $wgOut, $wgRequest;
+ global $wgExportAllowHistory;
if( $wgRequest->getVal( 'action' ) == 'submit') {
$page = $wgRequest->getText( 'pages' );
- $curonly = $wgRequest->getCheck( 'curonly' );
+ if( $wgExportAllowHistory ) {
+ $curonly = $wgRequest->getCheck( 'curonly' );
+ } else {
+ $curonly = true;
+ }
} else {
# Pre-check the 'current version only' box in the UI
$curonly = true;
$wgOut->addWikiText( wfMsg( "exporttext" ) );
$titleObj = Title::makeTitle( NS_SPECIAL, "Export" );
$action = $titleObj->escapeLocalURL( 'action=submit' );
+ if( $wgExportAllowHistory ) {
+ $checkbox = "<label><input type='checkbox' name='curonly' value='true' checked='checked' />
+" . wfMsgHtml( 'exportcuronly' ) . "</label><br />";
+ } else {
+ $checkbox = "";
+ $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 />
-<label><input type='checkbox' name='curonly' value='true' checked='checked' />
-" . wfMsgHtml( 'exportcuronly' ) . "</label><br />
+$checkbox
<input type='submit' />
</form>
" );
In the latter case you can also use a link, e.g. [[{{ns:Special}}:Export/{{Mediawiki:mainpage}}]] for the page {{Mediawiki: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.",
# Namespace 8 related