Index: trunk/phase3/includes/parser/LinkHolderArray.php |
— | — | @@ -254,7 +254,6 @@ |
255 | 255 | global $wgContLang; |
256 | 256 | |
257 | 257 | $colours = array(); |
258 | | - $sk = $this->parent->getOptions()->getSkin( $this->parent->mTitle ); |
259 | 258 | $linkCache = LinkCache::singleton(); |
260 | 259 | $output = $this->parent->getOutput(); |
261 | 260 | |
— | — | @@ -288,7 +287,7 @@ |
289 | 288 | } elseif ( $ns == NS_SPECIAL ) { |
290 | 289 | $colours[$pdbk] = 'new'; |
291 | 290 | } elseif ( ( $id = $linkCache->getGoodLinkID( $pdbk ) ) != 0 ) { |
292 | | - $colours[$pdbk] = $sk->getLinkColour( $title, $threshold ); |
| 291 | + $colours[$pdbk] = Linker::getLinkColour( $title, $threshold ); |
293 | 292 | $output->addLink( $title, $id ); |
294 | 293 | $linkcolour_ids[$id] = $pdbk; |
295 | 294 | } elseif ( $linkCache->isBadLink( $pdbk ) ) { |
— | — | @@ -325,7 +324,7 @@ |
326 | 325 | # FIXME: convoluted data flow |
327 | 326 | # The redirect status and length is passed to getLinkColour via the LinkCache |
328 | 327 | # Use formal parameters instead |
329 | | - $colours[$pdbk] = $sk->getLinkColour( $title, $threshold ); |
| 328 | + $colours[$pdbk] = Linker::getLinkColour( $title, $threshold ); |
330 | 329 | //add id to the extension todolist |
331 | 330 | $linkcolour_ids[$s->page_id] = $pdbk; |
332 | 331 | } |
— | — | @@ -370,7 +369,7 @@ |
371 | 370 | } |
372 | 371 | $type = array( 'known', 'noclasses' ); |
373 | 372 | } |
374 | | - $replacePairs[$searchkey] = $sk->link( $title, $displayText, |
| 373 | + $replacePairs[$searchkey] = Linker::link( $title, $displayText, |
375 | 374 | $attribs, $query, $type ); |
376 | 375 | } |
377 | 376 | } |
— | — | @@ -398,11 +397,10 @@ |
399 | 398 | |
400 | 399 | wfProfileIn( __METHOD__ ); |
401 | 400 | # Make interwiki link HTML |
402 | | - $sk = $this->parent->getOptions()->getSkin( $this->parent->mTitle ); |
403 | 401 | $output = $this->parent->getOutput(); |
404 | 402 | $replacePairs = array(); |
405 | 403 | foreach( $this->interwikis as $key => $link ) { |
406 | | - $replacePairs[$key] = $sk->link( $link['title'], $link['text'] ); |
| 404 | + $replacePairs[$key] = Linker::link( $link['title'], $link['text'] ); |
407 | 405 | $output->addInterwikiLink( $link['title'] ); |
408 | 406 | } |
409 | 407 | $replacer = new HashtableReplacer( $replacePairs, 1 ); |
— | — | @@ -423,7 +421,6 @@ |
424 | 422 | $variantMap = array(); // maps $pdbkey_Variant => $keys (of link holders) |
425 | 423 | $output = $this->parent->getOutput(); |
426 | 424 | $linkCache = LinkCache::singleton(); |
427 | | - $sk = $this->parent->getOptions()->getSkin( $this->parent->mTitle ); |
428 | 425 | $threshold = $this->parent->getOptions()->getStubThreshold(); |
429 | 426 | $titlesToBeConverted = ''; |
430 | 427 | $titlesAttrs = array(); |
— | — | @@ -528,7 +525,7 @@ |
529 | 526 | # FIXME: convoluted data flow |
530 | 527 | # The redirect status and length is passed to getLinkColour via the LinkCache |
531 | 528 | # Use formal parameters instead |
532 | | - $colours[$varPdbk] = $sk->getLinkColour( $variantTitle, $threshold ); |
| 529 | + $colours[$varPdbk] = Linker::getLinkColour( $variantTitle, $threshold ); |
533 | 530 | $linkcolour_ids[$s->page_id] = $pdbk; |
534 | 531 | } |
535 | 532 | } |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -4549,7 +4549,6 @@ |
4550 | 4550 | $ig->setParser( $this ); |
4551 | 4551 | $ig->setHideBadImages(); |
4552 | 4552 | $ig->setAttributes( Sanitizer::validateTagAttributes( $params, 'table' ) ); |
4553 | | - $ig->useSkin( $this->mOptions->getSkin( $this->mTitle ) ); |
4554 | 4553 | |
4555 | 4554 | if ( isset( $params['showfilename'] ) ) { |
4556 | 4555 | $ig->setShowFilename( true ); |
Index: trunk/phase3/includes/parser/ParserOptions.php |
— | — | @@ -17,8 +17,7 @@ |
18 | 18 | var $mInterwikiMagic; # Interlanguage links are removed and returned in an array |
19 | 19 | var $mAllowExternalImages; # Allow external images inline |
20 | 20 | var $mAllowExternalImagesFrom; # If not, any exception? |
21 | | - var $mEnableImageWhitelist; # If not or it doesn't match, should we check an on-wiki whitelist? |
22 | | - var $mSkin = null; # Reference to the preferred skin |
| 21 | + var $mEnableImageWhitelist; # If not or it doesn't match, should we check an on-wiki whitelist? |
23 | 22 | var $mDateFormat = null; # Date format index |
24 | 23 | var $mEditSection = true; # Create "edit section" links |
25 | 24 | var $mAllowSpecialInclusion; # Allow inclusion of special pages |
— | — | @@ -91,18 +90,6 @@ |
92 | 91 | function getUser() { return $this->mUser; } |
93 | 92 | function getPreSaveTransform() { return $this->mPreSaveTransform; } |
94 | 93 | |
95 | | - /** |
96 | | - * @param $title Title |
97 | | - * @return Skin |
98 | | - * @deprecated Use Linker::* instead |
99 | | - */ |
100 | | - function getSkin( $title = null ) { |
101 | | - if ( !isset( $this->mSkin ) ) { |
102 | | - $this->mSkin = $this->mUser->getSkin( $title ); |
103 | | - } |
104 | | - return $this->mSkin; |
105 | | - } |
106 | | - |
107 | 94 | function getDateFormat() { |
108 | 95 | $this->optionUsed('dateformat'); |
109 | 96 | if ( !isset( $this->mDateFormat ) ) { |
— | — | @@ -313,10 +300,6 @@ |
314 | 301 | // FIXME: This is just a way of retrieving the url/user preferred variant |
315 | 302 | $confstr .= $wgContLang->getExtraHashOptions(); |
316 | 303 | |
317 | | - // Since the skin could be overloading link(), it should be |
318 | | - // included here but in practice, none of our skins do that. |
319 | | - // $confstr .= "!" . $this->mSkin->getSkinName(); |
320 | | - |
321 | 304 | $confstr .= $wgRenderHashAppend; |
322 | 305 | |
323 | 306 | if ( !in_array( 'editsection', $forOptions ) ) { |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | * string is passed, which is the default value, defaults to 'external'. |
23 | 23 | * @deprecated Just pass the external class directly to something using Html::expandAttributes |
24 | 24 | */ |
25 | | - function getExternalLinkAttributes( $class = 'external' ) { |
| 25 | + static function getExternalLinkAttributes( $class = 'external' ) { |
26 | 26 | wfDeprecated( __METHOD__ ); |
27 | 27 | return self::getLinkAttributesInternal( '', $class ); |
28 | 28 | } |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | * @param $class String: the contents of the class attribute; if an empty |
38 | 38 | * string is passed, which is the default value, defaults to 'external'. |
39 | 39 | */ |
40 | | - function getInterwikiLinkAttributes( $title, $unused = null, $class = 'external' ) { |
| 40 | + static function getInterwikiLinkAttributes( $title, $unused = null, $class = 'external' ) { |
41 | 41 | global $wgContLang; |
42 | 42 | |
43 | 43 | # FIXME: We have a whole bunch of handling here that doesn't happen in |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | * @param $unused String: unused |
59 | 59 | * @param $class String: the contents of the class attribute, default none |
60 | 60 | */ |
61 | | - function getInternalLinkAttributes( $title, $unused = null, $class = '' ) { |
| 61 | + static function getInternalLinkAttributes( $title, $unused = null, $class = '' ) { |
62 | 62 | $title = urldecode( $title ); |
63 | 63 | $title = str_replace( '_', ' ', $title ); |
64 | 64 | return self::getLinkAttributesInternal( $title, $class ); |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | * @param $title Mixed: optional (unescaped) string to use in the title |
75 | 75 | * attribute; if false, default to the name of the page we're linking to |
76 | 76 | */ |
77 | | - function getInternalLinkAttributesObj( $nt, $unused = null, $class = '', $title = false ) { |
| 77 | + static function getInternalLinkAttributesObj( $nt, $unused = null, $class = '', $title = false ) { |
78 | 78 | if ( $title === false ) { |
79 | 79 | $title = $nt->getPrefixedText(); |
80 | 80 | } |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | /** |
85 | 85 | * Common code for getLinkAttributesX functions |
86 | 86 | */ |
87 | | - private function getLinkAttributesInternal( $title, $class ) { |
| 87 | + private static function getLinkAttributesInternal( $title, $class ) { |
88 | 88 | $title = htmlspecialchars( $title ); |
89 | 89 | $class = htmlspecialchars( $class ); |
90 | 90 | $r = ''; |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | * @param $threshold Integer: user defined threshold |
105 | 105 | * @return String: CSS class |
106 | 106 | */ |
107 | | - function getLinkColour( $t, $threshold ) { |
| 107 | + static function getLinkColour( $t, $threshold ) { |
108 | 108 | $colour = ''; |
109 | 109 | if ( $t->isRedirect() ) { |
110 | 110 | # Page is a redirect |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | * Has compatibility issues on some setups, so avoid wherever possible. |
156 | 156 | * @return string HTML <a> attribute |
157 | 157 | */ |
158 | | - public function link( |
| 158 | + public static function link( |
159 | 159 | $target, $text = null, $customAttribs = array(), $query = array(), $options = array() |
160 | 160 | ) { |
161 | 161 | wfProfileIn( __METHOD__ ); |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | } |
166 | 166 | $options = (array)$options; |
167 | 167 | |
168 | | - $dummy = new Linker; // dummy linker instance for bc on the hooks |
| 168 | + $dummy = new DummyLinker; // dummy linker instance for bc on the hooks |
169 | 169 | |
170 | 170 | $ret = null; |
171 | 171 | if ( !wfRunHooks( 'LinkBegin', array( $dummy, $target, &$text, |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | /** |
221 | 221 | * Identical to link(), except $options defaults to 'known'. |
222 | 222 | */ |
223 | | - public function linkKnown( |
| 223 | + public static function linkKnown( |
224 | 224 | $target, $text = null, $customAttribs = array(), |
225 | 225 | $query = array(), $options = array( 'known', 'noclasses' ) ) |
226 | 226 | { |
— | — | @@ -231,7 +231,7 @@ |
232 | 232 | * |
233 | 233 | * @param $target Title |
234 | 234 | */ |
235 | | - private function linkUrl( $target, $query, $options ) { |
| 235 | + private static function linkUrl( $target, $query, $options ) { |
236 | 236 | wfProfileIn( __METHOD__ ); |
237 | 237 | # We don't want to include fragments for broken links, because they |
238 | 238 | # generally make no sense. |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | * |
260 | 260 | * @param $target Title |
261 | 261 | */ |
262 | | - private function linkAttribs( $target, $attribs, $options, $linkText ) { |
| 262 | + private static function linkAttribs( $target, $attribs, $options, $linkText ) { |
263 | 263 | wfProfileIn( __METHOD__ ); |
264 | 264 | global $wgUser; |
265 | 265 | $defaults = array(); |
— | — | @@ -322,7 +322,7 @@ |
323 | 323 | * |
324 | 324 | * @param $target Title |
325 | 325 | */ |
326 | | - private function linkText( $target ) { |
| 326 | + private static function linkText( $target ) { |
327 | 327 | # We might be passed a non-Title by make*LinkObj(). Fail gracefully. |
328 | 328 | if ( !$target instanceof Title ) { |
329 | 329 | return ''; |
— | — | @@ -349,7 +349,7 @@ |
350 | 350 | * @return string HTML of link |
351 | 351 | * @deprecated since 1.17 |
352 | 352 | */ |
353 | | - function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 353 | + static function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
354 | 354 | global $wgUser; |
355 | 355 | wfDeprecated( __METHOD__ ); |
356 | 356 | |
— | — | @@ -361,12 +361,12 @@ |
362 | 362 | |
363 | 363 | /** |
364 | 364 | * Make appropriate markup for a link to the current article. This is currently rendered |
365 | | - * as the bold link text. The calling sequence is the same as the other make*LinkObj functions, |
| 365 | + * as the bold link text. The calling sequence is the same as the other make*LinkObj static functions, |
366 | 366 | * despite $query not being used. |
367 | 367 | * |
368 | 368 | * @param $nt Title |
369 | 369 | */ |
370 | | - function makeSelfLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 370 | + static function makeSelfLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
371 | 371 | if ( $text == '' ) { |
372 | 372 | $text = htmlspecialchars( $nt->getPrefixedText() ); |
373 | 373 | } |
— | — | @@ -374,7 +374,7 @@ |
375 | 375 | return "<strong class=\"selflink\">{$prefix}{$text}{$inside}</strong>{$trail}"; |
376 | 376 | } |
377 | 377 | |
378 | | - function normaliseSpecialPage( Title $title ) { |
| 378 | + static function normaliseSpecialPage( Title $title ) { |
379 | 379 | if ( $title->getNamespace() == NS_SPECIAL ) { |
380 | 380 | list( $name, $subpage ) = SpecialPage::resolveAliasWithSubpage( $title->getDBkey() ); |
381 | 381 | if ( !$name ) { |
— | — | @@ -392,7 +392,7 @@ |
393 | 393 | * Returns the filename part of an url. |
394 | 394 | * Used as alternative text for external images. |
395 | 395 | */ |
396 | | - function fnamePart( $url ) { |
| 396 | + static function fnamePart( $url ) { |
397 | 397 | $basename = strrchr( $url, '/' ); |
398 | 398 | if ( false === $basename ) { |
399 | 399 | $basename = $url; |
— | — | @@ -406,7 +406,7 @@ |
407 | 407 | * Return the code for images which were added via external links, |
408 | 408 | * via Parser::maybeMakeExternalImage(). |
409 | 409 | */ |
410 | | - function makeExternalImage( $url, $alt = '' ) { |
| 410 | + static function makeExternalImage( $url, $alt = '' ) { |
411 | 411 | if ( $alt == '' ) { |
412 | 412 | $alt = self::fnamePart( $url ); |
413 | 413 | } |
— | — | @@ -455,11 +455,11 @@ |
456 | 456 | * @param $widthOption: Used by the parser to remember the user preference thumbnailsize |
457 | 457 | * @return String: HTML for an image, with links, wrappers, etc. |
458 | 458 | */ |
459 | | - function makeImageLink2( Title $title, $file, $frameParams = array(), |
| 459 | + static function makeImageLink2( Title $title, $file, $frameParams = array(), |
460 | 460 | $handlerParams = array(), $time = false, $query = "", $widthOption = null ) |
461 | 461 | { |
462 | 462 | $res = null; |
463 | | - $dummy = new Linker; |
| 463 | + $dummy = new DummyLinker; |
464 | 464 | if ( !wfRunHooks( 'ImageBeforeProduceHTML', array( &$dummy, &$title, |
465 | 465 | &$file, &$frameParams, &$handlerParams, &$time, &$res ) ) ) { |
466 | 466 | return $res; |
— | — | @@ -575,7 +575,7 @@ |
576 | 576 | * @param $frameParams The frame parameters |
577 | 577 | * @param $query An optional query string to add to description page links |
578 | 578 | */ |
579 | | - function getImageLinkMTOParams( $frameParams, $query = '' ) { |
| 579 | + static function getImageLinkMTOParams( $frameParams, $query = '' ) { |
580 | 580 | $mtoParams = array(); |
581 | 581 | if ( isset( $frameParams['link-url'] ) && $frameParams['link-url'] !== '' ) { |
582 | 582 | $mtoParams['custom-url-link'] = $frameParams['link-url']; |
— | — | @@ -604,7 +604,7 @@ |
605 | 605 | * @param $framed Boolean |
606 | 606 | * @param $manualthumb String |
607 | 607 | */ |
608 | | - function makeThumbLinkObj( Title $title, $file, $label = '', $alt, |
| 608 | + static function makeThumbLinkObj( Title $title, $file, $label = '', $alt, |
609 | 609 | $align = 'right', $params = array(), $framed = false , $manualthumb = "" ) |
610 | 610 | { |
611 | 611 | $frameParams = array( |
— | — | @@ -630,7 +630,7 @@ |
631 | 631 | * @param string $query |
632 | 632 | * @return mixed |
633 | 633 | */ |
634 | | - function makeThumbLink2( Title $title, $file, $frameParams = array(), |
| 634 | + static function makeThumbLink2( Title $title, $file, $frameParams = array(), |
635 | 635 | $handlerParams = array(), $time = false, $query = "" ) |
636 | 636 | { |
637 | 637 | global $wgStylePath; |
— | — | @@ -733,7 +733,7 @@ |
734 | 734 | * @param $time Boolean: a file of a certain timestamp was requested |
735 | 735 | * @return String |
736 | 736 | */ |
737 | | - public function makeBrokenImageLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '', $time = false ) { |
| 737 | + public static function makeBrokenImageLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '', $time = false ) { |
738 | 738 | global $wgEnableUploads, $wgUploadMissingFileUrl; |
739 | 739 | if ( $title instanceof Title ) { |
740 | 740 | wfProfileIn( __METHOD__ ); |
— | — | @@ -774,7 +774,7 @@ |
775 | 775 | * @param $query String: urlencoded query string to prepend |
776 | 776 | * @return String: urlencoded URL |
777 | 777 | */ |
778 | | - protected function getUploadUrl( $destFile, $query = '' ) { |
| 778 | + protected static function getUploadUrl( $destFile, $query = '' ) { |
779 | 779 | global $wgUploadMissingFileUrl; |
780 | 780 | $q = 'wpDestFile=' . $destFile->getPartialUrl(); |
781 | 781 | if ( $query != '' ) |
— | — | @@ -796,7 +796,7 @@ |
797 | 797 | * @param $time string: MW timestamp of file creation time |
798 | 798 | * @return String: HTML |
799 | 799 | */ |
800 | | - public function makeMediaLinkObj( $title, $text = '', $time = false ) { |
| 800 | + public static function makeMediaLinkObj( $title, $text = '', $time = false ) { |
801 | 801 | $img = wfFindFile( $title, array( 'time' => $time ) ); |
802 | 802 | return self::makeMediaLinkFile( $title, $img, $text ); |
803 | 803 | } |
— | — | @@ -812,7 +812,7 @@ |
813 | 813 | * |
814 | 814 | * @todo Handle invalid or missing images better. |
815 | 815 | */ |
816 | | - public function makeMediaLinkFile( Title $title, $file, $text = '' ) { |
| 816 | + public static function makeMediaLinkFile( Title $title, $file, $text = '' ) { |
817 | 817 | if ( $file && $file->exists() ) { |
818 | 818 | $url = $file->getURL(); |
819 | 819 | $class = 'internal'; |
— | — | @@ -833,7 +833,7 @@ |
834 | 834 | * a message key from the link text. |
835 | 835 | * Usage example: $skin->specialLink( 'recentchanges' ) |
836 | 836 | */ |
837 | | - function specialLink( $name, $key = '' ) { |
| 837 | + static function specialLink( $name, $key = '' ) { |
838 | 838 | if ( $key == '' ) { $key = strtolower( $name ); } |
839 | 839 | |
840 | 840 | return self::linkKnown( SpecialPage::getTitleFor( $name ) , wfMsg( $key ) ); |
— | — | @@ -847,7 +847,7 @@ |
848 | 848 | * @param $linktype String: type of external link. Gets added to the classes |
849 | 849 | * @param $attribs Array of extra attributes to <a> |
850 | 850 | */ |
851 | | - function makeExternalLink( $url, $text, $escape = true, $linktype = '', $attribs = array() ) { |
| 851 | + static function makeExternalLink( $url, $text, $escape = true, $linktype = '', $attribs = array() ) { |
852 | 852 | $class = "external"; |
853 | 853 | if ( isset($linktype) && $linktype ) { |
854 | 854 | $class .= " $linktype"; |
— | — | @@ -878,7 +878,7 @@ |
879 | 879 | * @return String: HTML fragment |
880 | 880 | * @private |
881 | 881 | */ |
882 | | - function userLink( $userId, $userText ) { |
| 882 | + static function userLink( $userId, $userText ) { |
883 | 883 | if ( $userId == 0 ) { |
884 | 884 | $page = SpecialPage::getTitleFor( 'Contributions', $userText ); |
885 | 885 | } else { |
— | — | @@ -898,7 +898,7 @@ |
899 | 899 | * @param $edits Integer: user edit count (optional, for performance) |
900 | 900 | * @return String: HTML fragment |
901 | 901 | */ |
902 | | - public function userToolLinks( |
| 902 | + public static function userToolLinks( |
903 | 903 | $userId, $userText, $redContribsWhenNoEdits = false, $flags = 0, $edits = null |
904 | 904 | ) { |
905 | 905 | global $wgUser, $wgDisableAnonTalk, $wgLang; |
— | — | @@ -939,7 +939,7 @@ |
940 | 940 | * @param $userText String: user name or IP address |
941 | 941 | * @param $edits Integer: user edit count (optional, for performance) |
942 | 942 | */ |
943 | | - public function userToolLinksRedContribs( $userId, $userText, $edits = null ) { |
| 943 | + public static function userToolLinksRedContribs( $userId, $userText, $edits = null ) { |
944 | 944 | return self::userToolLinks( $userId, $userText, true, 0, $edits ); |
945 | 945 | } |
946 | 946 | |
— | — | @@ -950,7 +950,7 @@ |
951 | 951 | * @return String: HTML fragment with user talk link |
952 | 952 | * @private |
953 | 953 | */ |
954 | | - function userTalkLink( $userId, $userText ) { |
| 954 | + static function userTalkLink( $userId, $userText ) { |
955 | 955 | $userTalkPage = Title::makeTitle( NS_USER_TALK, $userText ); |
956 | 956 | $userTalkLink = self::link( $userTalkPage, wfMsgHtml( 'talkpagelinktext' ) ); |
957 | 957 | return $userTalkLink; |
— | — | @@ -962,7 +962,7 @@ |
963 | 963 | * @return String: HTML fragment with block link |
964 | 964 | * @private |
965 | 965 | */ |
966 | | - function blockLink( $userId, $userText ) { |
| 966 | + static function blockLink( $userId, $userText ) { |
967 | 967 | $blockPage = SpecialPage::getTitleFor( 'Block', $userText ); |
968 | 968 | $blockLink = self::link( $blockPage, wfMsgHtml( 'blocklink' ) ); |
969 | 969 | return $blockLink; |
— | — | @@ -974,7 +974,7 @@ |
975 | 975 | * @param $isPublic Boolean: show only if all users can see it |
976 | 976 | * @return String: HTML fragment |
977 | 977 | */ |
978 | | - function revUserLink( $rev, $isPublic = false ) { |
| 978 | + static function revUserLink( $rev, $isPublic = false ) { |
979 | 979 | if ( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) { |
980 | 980 | $link = wfMsgHtml( 'rev-deleted-user' ); |
981 | 981 | } else if ( $rev->userCan( Revision::DELETED_USER ) ) { |
— | — | @@ -995,7 +995,7 @@ |
996 | 996 | * @param $isPublic Boolean: show only if all users can see it |
997 | 997 | * @return string HTML |
998 | 998 | */ |
999 | | - function revUserTools( $rev, $isPublic = false ) { |
| 999 | + static function revUserTools( $rev, $isPublic = false ) { |
1000 | 1000 | if ( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) { |
1001 | 1001 | $link = wfMsgHtml( 'rev-deleted-user' ); |
1002 | 1002 | } else if ( $rev->userCan( Revision::DELETED_USER ) ) { |
— | — | @@ -1028,7 +1028,7 @@ |
1029 | 1029 | * @param $title Mixed: Title object (to generate link to the section in autocomment) or null |
1030 | 1030 | * @param $local Boolean: whether section links should refer to local page |
1031 | 1031 | */ |
1032 | | - function formatComment( $comment, $title = null, $local = false ) { |
| 1032 | + static function formatComment( $comment, $title = null, $local = false ) { |
1033 | 1033 | wfProfileIn( __METHOD__ ); |
1034 | 1034 | |
1035 | 1035 | # Sanitize text a bit: |
— | — | @@ -1059,7 +1059,7 @@ |
1060 | 1060 | * @param $local Boolean: whether section links should refer to local page |
1061 | 1061 | * @return String: formatted comment |
1062 | 1062 | */ |
1063 | | - private function formatAutocomments( $comment, $title = null, $local = false ) { |
| 1063 | + private static function formatAutocomments( $comment, $title = null, $local = false ) { |
1064 | 1064 | // Bah! |
1065 | 1065 | self::$autocommentTitle = $title; |
1066 | 1066 | self::$autocommentLocal = $local; |
— | — | @@ -1072,7 +1072,7 @@ |
1073 | 1073 | return $comment; |
1074 | 1074 | } |
1075 | 1075 | |
1076 | | - private function formatAutocommentsCallback( $match ) { |
| 1076 | + private static function formatAutocommentsCallback( $match ) { |
1077 | 1077 | $title = self::$autocommentTitle; |
1078 | 1078 | $local = self::$autocommentLocal; |
1079 | 1079 | |
— | — | @@ -1131,7 +1131,7 @@ |
1132 | 1132 | * @param $local Boolean: whether section links should refer to local page |
1133 | 1133 | * @return String |
1134 | 1134 | */ |
1135 | | - public function formatLinksInComment( $comment, $title = null, $local = false ) { |
| 1135 | + public static function formatLinksInComment( $comment, $title = null, $local = false ) { |
1136 | 1136 | self::$commentContextTitle = $title; |
1137 | 1137 | self::$commentLocal = $local; |
1138 | 1138 | $html = preg_replace_callback( |
— | — | @@ -1143,7 +1143,7 @@ |
1144 | 1144 | return $html; |
1145 | 1145 | } |
1146 | 1146 | |
1147 | | - protected function formatLinksInCommentCallback( $match ) { |
| 1147 | + protected static function formatLinksInCommentCallback( $match ) { |
1148 | 1148 | global $wgContLang; |
1149 | 1149 | |
1150 | 1150 | $medians = '(?:' . preg_quote( MWNamespace::getCanonicalName( NS_MEDIA ), '/' ) . '|'; |
— | — | @@ -1297,7 +1297,7 @@ |
1298 | 1298 | * |
1299 | 1299 | * @return string |
1300 | 1300 | */ |
1301 | | - function commentBlock( $comment, $title = null, $local = false ) { |
| 1301 | + static function commentBlock( $comment, $title = null, $local = false ) { |
1302 | 1302 | // '*' used to be the comment inserted by the software way back |
1303 | 1303 | // in antiquity in case none was provided, here for backwards |
1304 | 1304 | // compatability, acc. to brion -ævar |
— | — | @@ -1318,7 +1318,7 @@ |
1319 | 1319 | * @param $isPublic Boolean: show only if all users can see it |
1320 | 1320 | * @return String: HTML fragment |
1321 | 1321 | */ |
1322 | | - function revComment( Revision $rev, $local = false, $isPublic = false ) { |
| 1322 | + static function revComment( Revision $rev, $local = false, $isPublic = false ) { |
1323 | 1323 | if ( $rev->getRawComment() == "" ) { |
1324 | 1324 | return ""; |
1325 | 1325 | } |
— | — | @@ -1336,7 +1336,7 @@ |
1337 | 1337 | return $block; |
1338 | 1338 | } |
1339 | 1339 | |
1340 | | - public function formatRevisionSize( $size ) { |
| 1340 | + public static function formatRevisionSize( $size ) { |
1341 | 1341 | if ( $size == 0 ) { |
1342 | 1342 | $stxt = wfMsgExt( 'historyempty', 'parsemag' ); |
1343 | 1343 | } else { |
— | — | @@ -1351,21 +1351,21 @@ |
1352 | 1352 | /** |
1353 | 1353 | * Add another level to the Table of Contents |
1354 | 1354 | */ |
1355 | | - function tocIndent() { |
| 1355 | + static function tocIndent() { |
1356 | 1356 | return "\n<ul>"; |
1357 | 1357 | } |
1358 | 1358 | |
1359 | 1359 | /** |
1360 | 1360 | * Finish one or more sublevels on the Table of Contents |
1361 | 1361 | */ |
1362 | | - function tocUnindent( $level ) { |
| 1362 | + static function tocUnindent( $level ) { |
1363 | 1363 | return "</li>\n" . str_repeat( "</ul>\n</li>\n", $level > 0 ? $level : 0 ); |
1364 | 1364 | } |
1365 | 1365 | |
1366 | 1366 | /** |
1367 | 1367 | * parameter level defines if we are on an indentation level |
1368 | 1368 | */ |
1369 | | - function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) { |
| 1369 | + static function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) { |
1370 | 1370 | $classes = "toclevel-$level"; |
1371 | 1371 | if ( $sectionIndex !== false ) |
1372 | 1372 | $classes .= " tocsection-$sectionIndex"; |
— | — | @@ -1380,7 +1380,7 @@ |
1381 | 1381 | * tocUnindent() will be used instead if we're ending a line below |
1382 | 1382 | * the new level. |
1383 | 1383 | */ |
1384 | | - function tocLineEnd() { |
| 1384 | + static function tocLineEnd() { |
1385 | 1385 | return "</li>\n"; |
1386 | 1386 | } |
1387 | 1387 | |
— | — | @@ -1391,7 +1391,7 @@ |
1392 | 1392 | * @param $lang mixed: Language code for the toc title |
1393 | 1393 | * @return String: full html of the TOC |
1394 | 1394 | */ |
1395 | | - function tocList( $toc, $lang = false ) { |
| 1395 | + static function tocList( $toc, $lang = false ) { |
1396 | 1396 | $title = wfMsgExt( 'toc', array( 'language' => $lang, 'escape' ) ); |
1397 | 1397 | return |
1398 | 1398 | '<table id="toc" class="toc"><tr><td>' |
— | — | @@ -1407,7 +1407,7 @@ |
1408 | 1408 | * @param $tree Return value of ParserOutput::getSections() |
1409 | 1409 | * @return String: HTML fragment |
1410 | 1410 | */ |
1411 | | - public function generateTOC( $tree ) { |
| 1411 | + public static function generateTOC( $tree ) { |
1412 | 1412 | $toc = ''; |
1413 | 1413 | $lastLevel = 0; |
1414 | 1414 | foreach ( $tree as $section ) { |
— | — | @@ -1443,7 +1443,7 @@ |
1444 | 1444 | * |
1445 | 1445 | * @return String: HTML headline |
1446 | 1446 | */ |
1447 | | - public function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) { |
| 1447 | + public static function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) { |
1448 | 1448 | $ret = "<h$level$attribs" |
1449 | 1449 | . $link |
1450 | 1450 | . " <span class=\"mw-headline\" id=\"$anchor\">$text</span>" |
— | — | @@ -1488,7 +1488,7 @@ |
1489 | 1489 | * |
1490 | 1490 | * @param $rev Revision object |
1491 | 1491 | */ |
1492 | | - function generateRollback( $rev ) { |
| 1492 | + static function generateRollback( $rev ) { |
1493 | 1493 | return '<span class="mw-rollback-link">[' |
1494 | 1494 | . self::buildRollbackLink( $rev ) |
1495 | 1495 | . ']</span>'; |
— | — | @@ -1500,7 +1500,7 @@ |
1501 | 1501 | * @param $rev Revision object |
1502 | 1502 | * @return String: HTML fragment |
1503 | 1503 | */ |
1504 | | - public function buildRollbackLink( $rev ) { |
| 1504 | + public static function buildRollbackLink( $rev ) { |
1505 | 1505 | global $wgRequest, $wgUser; |
1506 | 1506 | $title = $rev->getTitle(); |
1507 | 1507 | $query = array( |
— | — | @@ -1530,7 +1530,7 @@ |
1531 | 1531 | * @param $section Boolean: whether this is for a section edit |
1532 | 1532 | * @return String: HTML output |
1533 | 1533 | */ |
1534 | | - public function formatTemplates( $templates, $preview = false, $section = false ) { |
| 1534 | + public static function formatTemplates( $templates, $preview = false, $section = false ) { |
1535 | 1535 | wfProfileIn( __METHOD__ ); |
1536 | 1536 | |
1537 | 1537 | $outText = ''; |
— | — | @@ -1593,7 +1593,7 @@ |
1594 | 1594 | * or similar |
1595 | 1595 | * @return String: HTML output |
1596 | 1596 | */ |
1597 | | - public function formatHiddenCategories( $hiddencats ) { |
| 1597 | + public static function formatHiddenCategories( $hiddencats ) { |
1598 | 1598 | global $wgLang; |
1599 | 1599 | wfProfileIn( __METHOD__ ); |
1600 | 1600 | |
— | — | @@ -1620,7 +1620,7 @@ |
1621 | 1621 | * @param $size Size to format |
1622 | 1622 | * @return String |
1623 | 1623 | */ |
1624 | | - public function formatSize( $size ) { |
| 1624 | + public static function formatSize( $size ) { |
1625 | 1625 | global $wgLang; |
1626 | 1626 | return htmlspecialchars( $wgLang->formatSize( $size ) ); |
1627 | 1627 | } |
— | — | @@ -1637,7 +1637,7 @@ |
1638 | 1638 | * @return String: contents of the title attribute (which you must HTML- |
1639 | 1639 | * escape), or false for no title attribute |
1640 | 1640 | */ |
1641 | | - public function titleAttrib( $name, $options = null ) { |
| 1641 | + public static function titleAttrib( $name, $options = null ) { |
1642 | 1642 | wfProfileIn( __METHOD__ ); |
1643 | 1643 | |
1644 | 1644 | $message = wfMessage( "tooltip-$name" ); |
— | — | @@ -1681,7 +1681,7 @@ |
1682 | 1682 | * @return String: contents of the accesskey attribute (which you must HTML- |
1683 | 1683 | * escape), or false for no accesskey attribute |
1684 | 1684 | */ |
1685 | | - public function accesskey( $name ) { |
| 1685 | + public static function accesskey( $name ) { |
1686 | 1686 | if ( isset( self::$accesskeycache[$name] ) ) { |
1687 | 1687 | return self::$accesskeycache[$name]; |
1688 | 1688 | } |
— | — | @@ -1715,7 +1715,7 @@ |
1716 | 1716 | * @return String: HTML <a> link to Special:Revisiondelete, wrapped in a |
1717 | 1717 | * span to allow for customization of appearance with CSS |
1718 | 1718 | */ |
1719 | | - public function revDeleteLink( $query = array(), $restricted = false, $delete = true ) { |
| 1719 | + public static function revDeleteLink( $query = array(), $restricted = false, $delete = true ) { |
1720 | 1720 | $sp = SpecialPage::getTitleFor( 'Revisiondelete' ); |
1721 | 1721 | $text = $delete ? wfMsgHtml( 'rev-delundel' ) : wfMsgHtml( 'rev-showdeleted' ); |
1722 | 1722 | $tag = $restricted ? 'strong' : 'span'; |
— | — | @@ -1731,7 +1731,7 @@ |
1732 | 1732 | * @return string HTML text wrapped in a span to allow for customization |
1733 | 1733 | * of appearance with CSS |
1734 | 1734 | */ |
1735 | | - public function revDeleteLinkDisabled( $delete = true ) { |
| 1735 | + public static function revDeleteLinkDisabled( $delete = true ) { |
1736 | 1736 | $text = $delete ? wfMsgHtml( 'rev-delundel' ) : wfMsgHtml( 'rev-showdeleted' ); |
1737 | 1737 | return Xml::tags( 'span', array( 'class' => 'mw-revdelundel-link' ), "($text)" ); |
1738 | 1738 | } |
— | — | @@ -1751,7 +1751,7 @@ |
1752 | 1752 | * be included in the link text. Other characters will be appended after |
1753 | 1753 | * the end of the link. |
1754 | 1754 | */ |
1755 | | - function makeLink( $title, $text = '', $query = '', $trail = '' ) { |
| 1755 | + static function makeLink( $title, $text = '', $query = '', $trail = '' ) { |
1756 | 1756 | wfProfileIn( __METHOD__ ); |
1757 | 1757 | $nt = Title::newFromText( $title ); |
1758 | 1758 | if ( $nt instanceof Title ) { |
— | — | @@ -1780,7 +1780,7 @@ |
1781 | 1781 | * @param $prefix String: Optional prefix |
1782 | 1782 | * @param $aprops String: extra attributes to the a-element |
1783 | 1783 | */ |
1784 | | - function makeKnownLink( |
| 1784 | + static function makeKnownLink( |
1785 | 1785 | $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = '' |
1786 | 1786 | ) { |
1787 | 1787 | $nt = Title::newFromText( $title ); |
— | — | @@ -1805,7 +1805,7 @@ |
1806 | 1806 | * be included in the link text. Other characters will be appended after |
1807 | 1807 | * the end of the link. |
1808 | 1808 | */ |
1809 | | - function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) { |
| 1809 | + static function makeBrokenLink( $title, $text = '', $query = '', $trail = '' ) { |
1810 | 1810 | $nt = Title::newFromText( $title ); |
1811 | 1811 | if ( $nt instanceof Title ) { |
1812 | 1812 | return self::makeBrokenLinkObj( $nt, $text, $query, $trail ); |
— | — | @@ -1828,7 +1828,7 @@ |
1829 | 1829 | * be included in the link text. Other characters will be appended after |
1830 | 1830 | * the end of the link. |
1831 | 1831 | */ |
1832 | | - function makeStubLink( $title, $text = '', $query = '', $trail = '' ) { |
| 1832 | + static function makeStubLink( $title, $text = '', $query = '', $trail = '' ) { |
1833 | 1833 | wfDeprecated( __METHOD__ ); |
1834 | 1834 | $nt = Title::newFromText( $title ); |
1835 | 1835 | if ( $nt instanceof Title ) { |
— | — | @@ -1855,7 +1855,7 @@ |
1856 | 1856 | * the end of the link. |
1857 | 1857 | * @param $prefix String: optional prefix. As trail, only before instead of after. |
1858 | 1858 | */ |
1859 | | - function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 1859 | + static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
1860 | 1860 | wfProfileIn( __METHOD__ ); |
1861 | 1861 | $query = wfCgiToArray( $query ); |
1862 | 1862 | list( $inside, $trail ) = self::splitTrail( $trail ); |
— | — | @@ -1885,7 +1885,7 @@ |
1886 | 1886 | * @param $style String: style to apply - if empty, use getInternalLinkAttributesObj instead |
1887 | 1887 | * @return the a-element |
1888 | 1888 | */ |
1889 | | - function makeKnownLinkObj( |
| 1889 | + static function makeKnownLinkObj( |
1890 | 1890 | $title, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' |
1891 | 1891 | ) { |
1892 | 1892 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1920,7 +1920,7 @@ |
1921 | 1921 | * the end of the link. |
1922 | 1922 | * @param $prefix String: Optional prefix |
1923 | 1923 | */ |
1924 | | - function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 1924 | + static function makeBrokenLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '' ) { |
1925 | 1925 | wfProfileIn( __METHOD__ ); |
1926 | 1926 | |
1927 | 1927 | list( $inside, $trail ) = self::splitTrail( $trail ); |
— | — | @@ -1948,7 +1948,7 @@ |
1949 | 1949 | * the end of the link. |
1950 | 1950 | * @param $prefix String: Optional prefix |
1951 | 1951 | */ |
1952 | | - function makeStubLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 1952 | + static function makeStubLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
1953 | 1953 | return self::makeColouredLinkObj( $nt, 'stub', $text, $query, $trail, $prefix ); |
1954 | 1954 | } |
1955 | 1955 | |
— | — | @@ -1966,7 +1966,7 @@ |
1967 | 1967 | * the end of the link. |
1968 | 1968 | * @param $prefix String: Optional prefix |
1969 | 1969 | */ |
1970 | | - function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) { |
| 1970 | + static function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) { |
1971 | 1971 | if ( $colour != '' ) { |
1972 | 1972 | $style = self::getInternalLinkAttributesObj( $nt, $text, $colour ); |
1973 | 1973 | } else { |
— | — | @@ -1976,7 +1976,7 @@ |
1977 | 1977 | } |
1978 | 1978 | |
1979 | 1979 | /** Obsolete alias */ |
1980 | | - function makeImage( $url, $alt = '' ) { |
| 1980 | + static function makeImage( $url, $alt = '' ) { |
1981 | 1981 | wfDeprecated( __METHOD__ ); |
1982 | 1982 | return self::makeExternalImage( $url, $alt ); |
1983 | 1983 | } |
— | — | @@ -1997,7 +1997,7 @@ |
1998 | 1998 | * @param $time String: timestamp of the file, set as false for current |
1999 | 1999 | * @return String |
2000 | 2000 | */ |
2001 | | - function makeImageLinkObj( $title, $label, $alt, $align = '', $handlerParams = array(), |
| 2001 | + static function makeImageLinkObj( $title, $label, $alt, $align = '', $handlerParams = array(), |
2002 | 2002 | $framed = false, $thumb = false, $manualthumb = '', $valign = '', $time = false ) |
2003 | 2003 | { |
2004 | 2004 | $frameParams = array( 'alt' => $alt, 'caption' => $label ); |
— | — | @@ -2021,7 +2021,7 @@ |
2022 | 2022 | } |
2023 | 2023 | |
2024 | 2024 | /** @deprecated use Linker::makeMediaLinkObj() */ |
2025 | | - function makeMediaLink( $name, $unused = '', $text = '', $time = false ) { |
| 2025 | + static function makeMediaLink( $name, $unused = '', $text = '', $time = false ) { |
2026 | 2026 | $nt = Title::makeTitleSafe( NS_FILE, $name ); |
2027 | 2027 | return self::makeMediaLinkObj( $nt, $text, $time ); |
2028 | 2028 | } |
— | — | @@ -2029,7 +2029,7 @@ |
2030 | 2030 | /** |
2031 | 2031 | * Returns the attributes for the tooltip and access key. |
2032 | 2032 | */ |
2033 | | - public function tooltipAndAccesskeyAttribs( $name ) { |
| 2033 | + public static function tooltipAndAccesskeyAttribs( $name ) { |
2034 | 2034 | global $wgEnableTooltipsAndAccesskeys; |
2035 | 2035 | if ( !$wgEnableTooltipsAndAccesskeys ) |
2036 | 2036 | return array(); |
— | — | @@ -2053,7 +2053,7 @@ |
2054 | 2054 | * @deprecated since 1.14 |
2055 | 2055 | * Returns raw bits of HTML, use titleAttrib() and accesskey() |
2056 | 2056 | */ |
2057 | | - public function tooltipAndAccesskey( $name ) { |
| 2057 | + public static function tooltipAndAccesskey( $name ) { |
2058 | 2058 | return Xml::expandAttributes( self::tooltipAndAccesskeyAttribs( $name ) ); |
2059 | 2059 | } |
2060 | 2060 | |
— | — | @@ -2061,7 +2061,7 @@ |
2062 | 2062 | * @deprecated since 1.14 |
2063 | 2063 | * Returns raw bits of HTML, use titleAttrib() |
2064 | 2064 | */ |
2065 | | - public function tooltip( $name, $options = null ) { |
| 2065 | + public static function tooltip( $name, $options = null ) { |
2066 | 2066 | global $wgEnableTooltipsAndAccesskeys; |
2067 | 2067 | if ( !$wgEnableTooltipsAndAccesskeys ) |
2068 | 2068 | return ''; |
— | — | @@ -2077,3 +2077,19 @@ |
2078 | 2078 | ) ); |
2079 | 2079 | } |
2080 | 2080 | } |
| 2081 | + |
| 2082 | +class DummyLinker { |
| 2083 | + |
| 2084 | + /** |
| 2085 | + * Use PHP's magic __call handler to transform instance calls to a dummy instance |
| 2086 | + * into static calls to the new Linker for backwards compatibility. |
| 2087 | + * |
| 2088 | + * @param $fname String Name of called method |
| 2089 | + * @param $args Array Arguments to the method |
| 2090 | + */ |
| 2091 | + function __call( $fname, $args ) { |
| 2092 | + return call_user_func_array( array( 'Linker', $fname ), $args ); |
| 2093 | + } |
| 2094 | + |
| 2095 | +} |
| 2096 | + |
Index: trunk/phase3/includes/ImageGallery.php |
— | — | @@ -13,7 +13,6 @@ |
14 | 14 | { |
15 | 15 | var $mImages, $mShowBytes, $mShowFilename; |
16 | 16 | var $mCaption = false; |
17 | | - var $mSkin = false; |
18 | 17 | |
19 | 18 | /** |
20 | 19 | * Hide blacklisted images? |
— | — | @@ -127,27 +126,13 @@ |
128 | 127 | * Instruct the class to use a specific skin for rendering |
129 | 128 | * |
130 | 129 | * @param $skin Skin object |
| 130 | + * @deprecated Not used anymore |
131 | 131 | */ |
132 | 132 | function useSkin( $skin ) { |
133 | | - $this->mSkin = $skin; |
| 133 | + /* no op */ |
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
137 | | - * Return the skin that should be used |
138 | | - * |
139 | | - * @return Skin object |
140 | | - */ |
141 | | - function getSkin() { |
142 | | - if( !$this->mSkin ) { |
143 | | - global $wgUser; |
144 | | - $skin = $wgUser->getSkin(); |
145 | | - } else { |
146 | | - $skin = $this->mSkin; |
147 | | - } |
148 | | - return $skin; |
149 | | - } |
150 | | - |
151 | | - /** |
152 | 137 | * Add an image to the gallery. |
153 | 138 | * |
154 | 139 | * @param $title Title object of the image that is added to the gallery |
— | — | @@ -230,8 +215,6 @@ |
231 | 216 | function toHTML() { |
232 | 217 | global $wgLang; |
233 | 218 | |
234 | | - $sk = $this->getSkin(); |
235 | | - |
236 | 219 | if ( $this->mPerRow > 0 ) { |
237 | 220 | $maxwidth = $this->mPerRow * ( $this->mWidths + self::THUMB_PADDING + self::GB_PADDING + self::GB_BORDERS ); |
238 | 221 | $oldStyle = isset( $this->mAttribs['style'] ) ? $this->mAttribs['style'] : ""; |
— | — | @@ -276,7 +259,7 @@ |
277 | 260 | } elseif( $this->mHideBadImages && wfIsBadImage( $nt->getDBkey(), $this->getContextTitle() ) ) { |
278 | 261 | # The image is blacklisted, just show it as a text link. |
279 | 262 | $thumbhtml = "\n\t\t\t".'<div style="height: '.(self::THUMB_PADDING + $this->mHeights).'px;">' . |
280 | | - $sk->link( |
| 263 | + Linker::link( |
281 | 264 | $nt, |
282 | 265 | htmlspecialchars( $nt->getText() ), |
283 | 266 | array(), |
— | — | @@ -321,7 +304,7 @@ |
322 | 305 | |
323 | 306 | //TODO |
324 | 307 | // $linkTarget = Title::newFromText( $wgContLang->getNsText( MWNamespace::getUser() ) . ":{$ut}" ); |
325 | | - // $ul = $sk->link( $linkTarget, $ut ); |
| 308 | + // $ul = Linker::link( $linkTarget, $ut ); |
326 | 309 | |
327 | 310 | if( $this->mShowBytes ) { |
328 | 311 | if( $img ) { |
— | — | @@ -336,7 +319,7 @@ |
337 | 320 | } |
338 | 321 | |
339 | 322 | $textlink = $this->mShowFilename ? |
340 | | - $sk->link( |
| 323 | + Linker::link( |
341 | 324 | $nt, |
342 | 325 | htmlspecialchars( $wgLang->truncate( $nt->getText(), $this->mCaptionLength ) ), |
343 | 326 | array(), |