* (bug 17236) Suppress 'watch user page link' for IP range blocks
* Wrap message 'searchresulttext' (Special:Search) into a div with
class "mw-searchresult"
+* (bug 15283) Interwiki imports can now fetch included templates
=== Bug fixes in 1.15 ===
* (bug 16968) Special:Upload no longer throws useless warnings.
}
}
- public static function newFromInterwiki( $interwiki, $page, $history=false ) {
+ public static function newFromInterwiki( $interwiki, $page, $history = false, $templates = false ) {
if( $page == '' ) {
return new WikiErrorMsg( 'import-noarticle' );
}
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;
$url = $link->getFullUrl( $params );
# For interwikis, use POST to avoid redirects.
return ImportStreamSource::newFromURL( $url, "POST" );
private $frompage = '';
private $logcomment= false;
private $history = true;
+ private $includeTemplates = false;
/**
* Constructor
} else {
$this->history = $wgRequest->getCheck( 'interwikiHistory' );
$this->frompage = $wgRequest->getText( "frompage" );
+ $this->includeTemplates = $wgRequest->getCheck( 'interwikiTemplates' );
$source = ImportStreamSource::newFromInterwiki(
$this->interwiki,
$this->frompage,
- $this->history );
+ $this->history,
+ $this->includeTemplates );
}
} else {
$source = new WikiErrorMsg( "importunknownsource" );
Xml::checkLabel( wfMsg( 'import-interwiki-history' ), 'interwikiHistory', 'interwikiHistory', $this->history ) .
"</td>
</tr>
+ <tr>
+ <td>
+ </td>
+ <td class='mw-input'>" .
+ Xml::checkLabel( wfMsg( 'import-interwiki-templates' ), 'interwikiTemplates', 'interwikiTemplates', $this->includeTemplates ) .
+ "</td>
<tr>
<td>" .
Xml::label( wfMsg( 'import-interwiki-namespace' ), 'namespace' ) .
All transwiki import actions are logged at the [[Special:Log/import|import log]].",
'import-interwiki-source' => 'Source wiki/page:',
'import-interwiki-history' => 'Copy all history versions for this page',
+'import-interwiki-templates' => 'Include all templates',
'import-interwiki-submit' => 'Import',
'import-interwiki-namespace' => 'Destination namespace:',
'import-upload-filename' => 'Filename:',
'import-interwiki-text',
'import-interwiki-source',
'import-interwiki-history',
+ 'import-interwiki-templates',
'import-interwiki-submit',
'import-interwiki-namespace',
'import-upload-filename',