From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- includes/specials/SpecialImport.php | 50 +++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 21 deletions(-) (limited to 'includes/specials/SpecialImport.php') diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 7d1cf0dd..fc904a23 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -30,14 +30,15 @@ * @ingroup SpecialPage */ class SpecialImport extends SpecialPage { - + private $interwiki = false; private $namespace; private $frompage = ''; private $logcomment= false; private $history = true; private $includeTemplates = false; - + private $pageLinkDepth; + /** * Constructor */ @@ -46,26 +47,27 @@ class SpecialImport extends SpecialPage { global $wgImportTargetNamespace; $this->namespace = $wgImportTargetNamespace; } - + /** * Execute */ function execute( $par ) { global $wgRequest, $wgUser, $wgOut; - + $this->setHeaders(); $this->outputHeader(); - + if ( wfReadOnly() ) { $wgOut->readOnlyPage(); return; } - - if( !$wgUser->isAllowed( 'import' ) && !$wgUser->isAllowed( 'importupload' ) ) + + if( !$wgUser->isAllowedAny( 'import', 'importupload' ) ) { return $wgOut->permissionRequired( 'import' ); + } - # TODO: allow Title::getUserPermissionsErrors() to take an array - # FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what + # @todo Allow Title::getUserPermissionsErrors() to take an array + # @todo FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what # getUserPermissionsErrors() might actually be used for, hence the 'ns-specialprotected' $errors = wfMergeErrorArrays( $this->getTitle()->getUserPermissionsErrors( @@ -88,7 +90,7 @@ class SpecialImport extends SpecialPage { } $this->showForm(); } - + /** * Do the actual import */ @@ -162,7 +164,7 @@ class SpecialImport extends SpecialPage { # Success! $wgOut->addWikiMsg( 'importsuccess' ); } - $wgOut->addWikiText( '
' ); + $wgOut->addHTML( '
' ); } } @@ -290,7 +292,7 @@ class SpecialImport extends SpecialPage { " . - Xml::submitButton( wfMsg( 'import-interwiki-submit' ), $wgUser->getSkin()->tooltipAndAccessKeyAttribs( 'import' ) ) . + Xml::submitButton( wfMsg( 'import-interwiki-submit' ), Linker::tooltipAndAccesskeyAttribs( 'import' ) ) . " " . Xml::closeElement( 'table' ). @@ -312,8 +314,8 @@ class ImportReporter { private $mLogItemCount = 0; function __construct( $importer, $upload, $interwiki , $reason=false ) { - $this->mOriginalPageOutCallback = - $importer->setPageOutCallback( array( $this, 'reportPage' ) ); + $this->mOriginalPageOutCallback = + $importer->setPageOutCallback( array( $this, 'reportPage' ) ); $this->mOriginalLogCallback = $importer->setLogItemCallback( array( $this, 'reportLogItem' ) ); $this->mPageCount = 0; @@ -326,7 +328,7 @@ class ImportReporter { global $wgOut; $wgOut->addHTML( "