Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -1145,7 +1145,7 @@ |
1146 | 1146 | substr( $m[0], 0, 20 ) . '"' ); |
1147 | 1147 | } |
1148 | 1148 | $url = wfMsg( $urlmsg, $id); |
1149 | | - $sk = $this->mOptions->getSkin(); |
| 1149 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
1150 | 1150 | $la = $sk->getExternalLinkAttributes( "external $CssClass" ); |
1151 | 1151 | return "<a href=\"{$url}\"{$la}>{$keyword} {$id}</a>"; |
1152 | 1152 | } elseif ( isset( $m[5] ) && $m[5] !== '' ) { |
— | — | @@ -1174,7 +1174,7 @@ |
1175 | 1175 | global $wgContLang; |
1176 | 1176 | wfProfileIn( __METHOD__ ); |
1177 | 1177 | |
1178 | | - $sk = $this->mOptions->getSkin(); |
| 1178 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
1179 | 1179 | $trail = ''; |
1180 | 1180 | |
1181 | 1181 | # The characters '<' and '>' (which were escaped by |
— | — | @@ -1423,7 +1423,7 @@ |
1424 | 1424 | global $wgContLang; |
1425 | 1425 | wfProfileIn( __METHOD__ ); |
1426 | 1426 | |
1427 | | - $sk = $this->mOptions->getSkin(); |
| 1427 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
1428 | 1428 | |
1429 | 1429 | $bits = preg_split( $this->mExtLinkBracketedRegex, $text, -1, PREG_SPLIT_DELIM_CAPTURE ); |
1430 | 1430 | $s = array_shift( $bits ); |
— | — | @@ -1572,7 +1572,7 @@ |
1573 | 1573 | * @private |
1574 | 1574 | */ |
1575 | 1575 | function maybeMakeExternalImage( $url ) { |
1576 | | - $sk = $this->mOptions->getSkin(); |
| 1576 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
1577 | 1577 | $imagesfrom = $this->mOptions->getAllowExternalImagesFrom(); |
1578 | 1578 | $imagesexception = !empty( $imagesfrom ); |
1579 | 1579 | $text = false; |
— | — | @@ -1648,7 +1648,7 @@ |
1649 | 1649 | $e1_img = "/^([{$tc}]+)\\|(.*)\$/sD"; |
1650 | 1650 | } |
1651 | 1651 | |
1652 | | - $sk = $this->mOptions->getSkin(); |
| 1652 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
1653 | 1653 | $holders = new LinkHolderArray( $this ); |
1654 | 1654 | |
1655 | 1655 | # split the entire text string on occurences of [[ |
— | — | @@ -1991,7 +1991,7 @@ |
1992 | 1992 | */ |
1993 | 1993 | function makeKnownLinkHolder( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
1994 | 1994 | list( $inside, $trail ) = Linker::splitTrail( $trail ); |
1995 | | - $sk = $this->mOptions->getSkin(); |
| 1995 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
1996 | 1996 | # FIXME: use link() instead of deprecated makeKnownLinkObj() |
1997 | 1997 | $link = $sk->makeKnownLinkObj( $nt, $text, $query, $inside, $prefix ); |
1998 | 1998 | return $this->armorLinks( $link ) . $trail; |
— | — | @@ -3743,7 +3743,7 @@ |
3744 | 3744 | } |
3745 | 3745 | |
3746 | 3746 | # We need this to perform operations on the HTML |
3747 | | - $sk = $this->mOptions->getSkin(); |
| 3747 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
3748 | 3748 | |
3749 | 3749 | # headline counter |
3750 | 3750 | $headlineCount = 0; |
— | — | @@ -4480,7 +4480,7 @@ |
4481 | 4481 | $ig->setParser( $this ); |
4482 | 4482 | $ig->setHideBadImages(); |
4483 | 4483 | $ig->setAttributes( Sanitizer::validateTagAttributes( $params, 'table' ) ); |
4484 | | - $ig->useSkin( $this->mOptions->getSkin() ); |
| 4484 | + $ig->useSkin( $this->mOptions->getSkin( $this->mTitle ) ); |
4485 | 4485 | $ig->mRevisionId = $this->mRevisionId; |
4486 | 4486 | |
4487 | 4487 | if ( isset( $params['showfilename'] ) ) { |
— | — | @@ -4618,7 +4618,7 @@ |
4619 | 4619 | # * text-bottom |
4620 | 4620 | |
4621 | 4621 | $parts = StringUtils::explode( "|", $options ); |
4622 | | - $sk = $this->mOptions->getSkin(); |
| 4622 | + $sk = $this->mOptions->getSkin( $this->mTitle ); |
4623 | 4623 | |
4624 | 4624 | # Give extensions a chance to select the file revision for us |
4625 | 4625 | $skip = $time = $descQuery = false; |
Index: trunk/phase3/includes/parser/ParserOptions.php |
— | — | @@ -74,9 +74,9 @@ |
75 | 75 | function getIsPrintable() { $this->accessedOptions['printable'] = true; |
76 | 76 | return $this->mIsPrintable; } |
77 | 77 | |
78 | | - function getSkin() { |
| 78 | + function getSkin( $title = null ) { |
79 | 79 | if ( !isset( $this->mSkin ) ) { |
80 | | - $this->mSkin = $this->mUser->getSkin(); |
| 80 | + $this->mSkin = $this->mUser->getSkin( $title ); |
81 | 81 | } |
82 | 82 | return $this->mSkin; |
83 | 83 | } |
Index: trunk/phase3/includes/parser/LinkHolderArray.php |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | global $wgContLang; |
134 | 134 | |
135 | 135 | $colours = array(); |
136 | | - $sk = $this->parent->getOptions()->getSkin(); |
| 136 | + $sk = $this->parent->getOptions()->getSkin( $this->parent->mTitle ); |
137 | 137 | $linkCache = LinkCache::singleton(); |
138 | 138 | $output = $this->parent->getOutput(); |
139 | 139 | |
— | — | @@ -269,7 +269,7 @@ |
270 | 270 | |
271 | 271 | wfProfileIn( __METHOD__ ); |
272 | 272 | # Make interwiki link HTML |
273 | | - $sk = $this->parent->getOptions()->getSkin(); |
| 273 | + $sk = $this->parent->getOptions()->getSkin( $this->parent->mTitle ); |
274 | 274 | $output = $this->parent->getOutput(); |
275 | 275 | $replacePairs = array(); |
276 | 276 | foreach( $this->interwikis as $key => $link ) { |
— | — | @@ -294,7 +294,7 @@ |
295 | 295 | $variantMap = array(); // maps $pdbkey_Variant => $keys (of link holders) |
296 | 296 | $output = $this->parent->getOutput(); |
297 | 297 | $linkCache = LinkCache::singleton(); |
298 | | - $sk = $this->parent->getOptions()->getSkin(); |
| 298 | + $sk = $this->parent->getOptions()->getSkin( $this->parent->mTitle ); |
299 | 299 | $threshold = $this->getStubThreshold(); |
300 | 300 | $titlesToBeConverted = ''; |
301 | 301 | $titlesAttrs = array(); |