Index: trunk/phase3/includes/Linker.php |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | * @param $threshold Integer: user defined threshold |
111 | 111 | * @return String: CSS class |
112 | 112 | */ |
113 | | - static function getLinkColour( $t, $threshold ) { |
| 113 | + public static function getLinkColour( $t, $threshold ) { |
114 | 114 | $colour = ''; |
115 | 115 | if ( $t->isRedirect() ) { |
116 | 116 | # Page is a redirect |
— | — | @@ -376,7 +376,7 @@ |
377 | 377 | * |
378 | 378 | * @return string |
379 | 379 | */ |
380 | | - static function makeSelfLinkObj( $nt, $html = '', $query = '', $trail = '', $prefix = '' ) { |
| 380 | + public static function makeSelfLinkObj( $nt, $html = '', $query = '', $trail = '', $prefix = '' ) { |
381 | 381 | if ( $html == '' ) { |
382 | 382 | $html = htmlspecialchars( $nt->getPrefixedText() ); |
383 | 383 | } |
— | — | @@ -410,7 +410,7 @@ |
411 | 411 | * |
412 | 412 | * @return string |
413 | 413 | */ |
414 | | - static function fnamePart( $url ) { |
| 414 | + private static function fnamePart( $url ) { |
415 | 415 | $basename = strrchr( $url, '/' ); |
416 | 416 | if ( false === $basename ) { |
417 | 417 | $basename = $url; |
— | — | @@ -429,7 +429,7 @@ |
430 | 430 | * |
431 | 431 | * @return string |
432 | 432 | */ |
433 | | - static function makeExternalImage( $url, $alt = '' ) { |
| 433 | + public static function makeExternalImage( $url, $alt = '' ) { |
434 | 434 | if ( $alt == '' ) { |
435 | 435 | $alt = self::fnamePart( $url ); |
436 | 436 | } |
— | — | @@ -478,7 +478,7 @@ |
479 | 479 | * @param $widthOption: Used by the parser to remember the user preference thumbnailsize |
480 | 480 | * @return String: HTML for an image, with links, wrappers, etc. |
481 | 481 | */ |
482 | | - static function makeImageLink2( Title $title, $file, $frameParams = array(), |
| 482 | + public static function makeImageLink2( Title $title, $file, $frameParams = array(), |
483 | 483 | $handlerParams = array(), $time = false, $query = "", $widthOption = null ) |
484 | 484 | { |
485 | 485 | $res = null; |
— | — | @@ -605,7 +605,7 @@ |
606 | 606 | * @param $frameParams The frame parameters |
607 | 607 | * @param $query An optional query string to add to description page links |
608 | 608 | */ |
609 | | - static function getImageLinkMTOParams( $frameParams, $query = '' ) { |
| 609 | + private static function getImageLinkMTOParams( $frameParams, $query = '' ) { |
610 | 610 | $mtoParams = array(); |
611 | 611 | if ( isset( $frameParams['link-url'] ) && $frameParams['link-url'] !== '' ) { |
612 | 612 | $mtoParams['custom-url-link'] = $frameParams['link-url']; |
— | — | @@ -634,7 +634,7 @@ |
635 | 635 | * @param $framed Boolean |
636 | 636 | * @param $manualthumb String |
637 | 637 | */ |
638 | | - static function makeThumbLinkObj( Title $title, $file, $label = '', $alt, |
| 638 | + public static function makeThumbLinkObj( Title $title, $file, $label = '', $alt, |
639 | 639 | $align = 'right', $params = array(), $framed = false , $manualthumb = "" ) |
640 | 640 | { |
641 | 641 | $frameParams = array( |
— | — | @@ -660,7 +660,7 @@ |
661 | 661 | * @param string $query |
662 | 662 | * @return mixed |
663 | 663 | */ |
664 | | - static function makeThumbLink2( Title $title, $file, $frameParams = array(), |
| 664 | + public static function makeThumbLink2( Title $title, $file, $frameParams = array(), |
665 | 665 | $handlerParams = array(), $time = false, $query = "" ) |
666 | 666 | { |
667 | 667 | global $wgStylePath, $wgContLang; |
— | — | @@ -870,7 +870,7 @@ |
871 | 871 | * |
872 | 872 | * @return string |
873 | 873 | */ |
874 | | - static function specialLink( $name, $key = '' ) { |
| 874 | + public static function specialLink( $name, $key = '' ) { |
875 | 875 | if ( $key == '' ) { |
876 | 876 | $key = strtolower( $name ); |
877 | 877 | } |
— | — | @@ -886,7 +886,7 @@ |
887 | 887 | * @param $linktype String: type of external link. Gets added to the classes |
888 | 888 | * @param $attribs Array of extra attributes to <a> |
889 | 889 | */ |
890 | | - static function makeExternalLink( $url, $text, $escape = true, $linktype = '', $attribs = array() ) { |
| 890 | + public static function makeExternalLink( $url, $text, $escape = true, $linktype = '', $attribs = array() ) { |
891 | 891 | $class = "external"; |
892 | 892 | if ( isset($linktype) && $linktype ) { |
893 | 893 | $class .= " $linktype"; |
— | — | @@ -1026,7 +1026,7 @@ |
1027 | 1027 | * @param $isPublic Boolean: show only if all users can see it |
1028 | 1028 | * @return String: HTML fragment |
1029 | 1029 | */ |
1030 | | - static function revUserLink( $rev, $isPublic = false ) { |
| 1030 | + public static function revUserLink( $rev, $isPublic = false ) { |
1031 | 1031 | if ( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) { |
1032 | 1032 | $link = wfMsgHtml( 'rev-deleted-user' ); |
1033 | 1033 | } elseif ( $rev->userCan( Revision::DELETED_USER ) ) { |
— | — | @@ -1047,7 +1047,7 @@ |
1048 | 1048 | * @param $isPublic Boolean: show only if all users can see it |
1049 | 1049 | * @return string HTML |
1050 | 1050 | */ |
1051 | | - static function revUserTools( $rev, $isPublic = false ) { |
| 1051 | + public static function revUserTools( $rev, $isPublic = false ) { |
1052 | 1052 | if ( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) { |
1053 | 1053 | $link = wfMsgHtml( 'rev-deleted-user' ); |
1054 | 1054 | } elseif ( $rev->userCan( Revision::DELETED_USER ) ) { |
— | — | @@ -1080,7 +1080,7 @@ |
1081 | 1081 | * @param $title Mixed: Title object (to generate link to the section in autocomment) or null |
1082 | 1082 | * @param $local Boolean: whether section links should refer to local page |
1083 | 1083 | */ |
1084 | | - static function formatComment( $comment, $title = null, $local = false ) { |
| 1084 | + public static function formatComment( $comment, $title = null, $local = false ) { |
1085 | 1085 | wfProfileIn( __METHOD__ ); |
1086 | 1086 | |
1087 | 1087 | # Sanitize text a bit: |
— | — | @@ -1280,7 +1280,7 @@ |
1281 | 1281 | * @param $text |
1282 | 1282 | * @return string |
1283 | 1283 | */ |
1284 | | - static function normalizeSubpageLink( $contextTitle, $target, &$text ) { |
| 1284 | + public static function normalizeSubpageLink( $contextTitle, $target, &$text ) { |
1285 | 1285 | # Valid link forms: |
1286 | 1286 | # Foobar -- normal |
1287 | 1287 | # :Foobar -- override special treatment of prefix (images, language links) |
— | — | @@ -1362,7 +1362,7 @@ |
1363 | 1363 | * |
1364 | 1364 | * @return string |
1365 | 1365 | */ |
1366 | | - static function commentBlock( $comment, $title = null, $local = false ) { |
| 1366 | + public static function commentBlock( $comment, $title = null, $local = false ) { |
1367 | 1367 | // '*' used to be the comment inserted by the software way back |
1368 | 1368 | // in antiquity in case none was provided, here for backwards |
1369 | 1369 | // compatability, acc. to brion -ævar |
— | — | @@ -1383,7 +1383,7 @@ |
1384 | 1384 | * @param $isPublic Boolean: show only if all users can see it |
1385 | 1385 | * @return String: HTML fragment |
1386 | 1386 | */ |
1387 | | - static function revComment( Revision $rev, $local = false, $isPublic = false ) { |
| 1387 | + public static function revComment( Revision $rev, $local = false, $isPublic = false ) { |
1388 | 1388 | if ( $rev->getRawComment() == "" ) { |
1389 | 1389 | return ""; |
1390 | 1390 | } |
— | — | @@ -1422,7 +1422,7 @@ |
1423 | 1423 | * |
1424 | 1424 | * @return string |
1425 | 1425 | */ |
1426 | | - static function tocIndent() { |
| 1426 | + public static function tocIndent() { |
1427 | 1427 | return "\n<ul>"; |
1428 | 1428 | } |
1429 | 1429 | |
— | — | @@ -1431,7 +1431,7 @@ |
1432 | 1432 | * |
1433 | 1433 | * @return string |
1434 | 1434 | */ |
1435 | | - static function tocUnindent( $level ) { |
| 1435 | + public static function tocUnindent( $level ) { |
1436 | 1436 | return "</li>\n" . str_repeat( "</ul>\n</li>\n", $level > 0 ? $level : 0 ); |
1437 | 1437 | } |
1438 | 1438 | |
— | — | @@ -1440,7 +1440,7 @@ |
1441 | 1441 | * |
1442 | 1442 | * @return string |
1443 | 1443 | */ |
1444 | | - static function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) { |
| 1444 | + public static function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) { |
1445 | 1445 | $classes = "toclevel-$level"; |
1446 | 1446 | if ( $sectionIndex !== false ) { |
1447 | 1447 | $classes .= " tocsection-$sectionIndex"; |
— | — | @@ -1456,7 +1456,7 @@ |
1457 | 1457 | * tocUnindent() will be used instead if we're ending a line below |
1458 | 1458 | * the new level. |
1459 | 1459 | */ |
1460 | | - static function tocLineEnd() { |
| 1460 | + public static function tocLineEnd() { |
1461 | 1461 | return "</li>\n"; |
1462 | 1462 | } |
1463 | 1463 | |
— | — | @@ -1467,7 +1467,7 @@ |
1468 | 1468 | * @param $lang mixed: Language code for the toc title |
1469 | 1469 | * @return String: full html of the TOC |
1470 | 1470 | */ |
1471 | | - static function tocList( $toc, $lang = false ) { |
| 1471 | + public static function tocList( $toc, $lang = false ) { |
1472 | 1472 | $title = wfMsgExt( 'toc', array( 'language' => $lang, 'escape' ) ); |
1473 | 1473 | return |
1474 | 1474 | '<table id="toc" class="toc"><tr><td>' |
— | — | @@ -1561,7 +1561,7 @@ |
1562 | 1562 | * |
1563 | 1563 | * @param $rev Revision object |
1564 | 1564 | */ |
1565 | | - static function generateRollback( $rev ) { |
| 1565 | + public static function generateRollback( $rev ) { |
1566 | 1566 | return '<span class="mw-rollback-link">[' |
1567 | 1567 | . self::buildRollbackLink( $rev ) |
1568 | 1568 | . ']</span>'; |