diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-01-11 19:06:07 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-01-11 19:06:07 +0000 |
commit | a58285fd06c8113c45377c655dd43cef6337e815 (patch) | |
tree | dfe31d3d12652352fe44890b4811eda0728faefb /includes/SpecialImport.php | |
parent | 20194986f6638233732ba1fc3e838f117d3cc9ea (diff) |
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'includes/SpecialImport.php')
-rw-r--r-- | includes/SpecialImport.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index aaadb662..1c8ee2e0 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -208,7 +208,7 @@ class ImportReporter { $dbw = wfGetDB( DB_MASTER ); $nullRevision = Revision::newNullRevision( $dbw, $title->getArticleId(), $comment, true ); - $nullRevId = $nullRevision->insertOn( $dbw ); + $nullRevision->insertOn( $dbw ); } } @@ -304,7 +304,6 @@ class WikiRevision { } function importOldRevision() { - $fname = "WikiImporter::importOldRevision"; $dbw =& wfGetDB( DB_MASTER ); # Sneak a single revision into place @@ -818,7 +817,7 @@ class ImportStreamSource { return new ImportStreamSource( $file ); } - function newFromUpload( $fieldname = "xmlimport" ) { + static function newFromUpload( $fieldname = "xmlimport" ) { $upload =& $_FILES[$fieldname]; if( !isset( $upload ) || !$upload['name'] ) { @@ -844,10 +843,9 @@ class ImportStreamSource { return $ret; } - function newFromInterwiki( $interwiki, $page, $history=false ) { - $base = Title::getInterwikiLink( $interwiki ); + public static function newFromInterwiki( $interwiki, $page, $history=false ) { $link = Title::newFromText( "$interwiki:Special:Export/$page" ); - if( empty( $base ) || empty( $link ) ) { + if( is_null( $link ) || $link->getInterwiki() == '' ) { return new WikiErrorMsg( 'importbadinterwiki' ); } else { $params = $history ? 'history=1' : ''; |