summaryrefslogtreecommitdiff
path: root/includes/Import.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Import.php')
-rw-r--r--includes/Import.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/Import.php b/includes/Import.php
index 56e7a7fb..973866df 100644
--- a/includes/Import.php
+++ b/includes/Import.php
@@ -223,7 +223,7 @@ class WikiRevision {
} elseif( $changed ) {
wfDebug( __METHOD__ . ": running onArticleEdit\n" );
- Article::onArticleEdit( $this->title, 'skiptransclusions' ); // leave templatelinks for editUpdates()
+ Article::onArticleEdit( $this->title );
wfDebug( __METHOD__ . ": running edit updates\n" );
$article->editUpdates(
@@ -1116,7 +1116,7 @@ class ImportStreamSource {
}
}
- public static function newFromInterwiki( $interwiki, $page, $history=false ) {
+ public static function newFromInterwiki( $interwiki, $page, $history = false, $templates = false, $pageLinkDepth = 0 ) {
if( $page == '' ) {
return new WikiErrorMsg( 'import-noarticle' );
}
@@ -1124,7 +1124,10 @@ class ImportStreamSource {
if( is_null( $link ) || $link->getInterwiki() == '' ) {
return new WikiErrorMsg( 'importbadinterwiki' );
} else {
- $params = $history ? 'history=1' : '';
+ $params = array();
+ if ( $history ) $params['history'] = 1;
+ if ( $templates ) $params['templates'] = 1;
+ if ( $pageLinkDepth ) $params['pagelink-depth'] = $pageLinkDepth;
$url = $link->getFullUrl( $params );
# For interwikis, use POST to avoid redirects.
return ImportStreamSource::newFromURL( $url, "POST" );