From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/Import.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'includes/Import.php') 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" ); -- cgit v1.2.2