Index: trunk/phase3/includes/Skin.php |
— | — | @@ -53,6 +53,15 @@ |
54 | 54 | |
55 | 55 | require_once( 'RecentChange.php' ); |
56 | 56 | |
| 57 | +global $wgLinkHolders; |
| 58 | +$wgLinkHolders = array( |
| 59 | + 'namespaces' => array(), |
| 60 | + 'dbkeys' => array(), |
| 61 | + 'queries' => array(), |
| 62 | + 'texts' => array(), |
| 63 | + 'titles' => array() |
| 64 | +); |
| 65 | + |
57 | 66 | /** |
58 | 67 | * @todo document |
59 | 68 | * @package MediaWiki |
— | — | @@ -1497,7 +1506,7 @@ |
1498 | 1507 | * Pass a title object, not a title string |
1499 | 1508 | */ |
1500 | 1509 | function makeLinkObj( &$nt, $text= '', $query = '', $trail = '', $prefix = '' ) { |
1501 | | - global $wgOut, $wgUser; |
| 1510 | + global $wgOut, $wgUser, $wgLinkHolders; |
1502 | 1511 | $fname = 'Skin::makeLinkObj'; |
1503 | 1512 | |
1504 | 1513 | # Fail gracefully |
— | — | @@ -1534,8 +1543,13 @@ |
1535 | 1544 | } |
1536 | 1545 | |
1537 | 1546 | # Allows wiki to bypass using linkcache, see OutputPage::parseLinkHolders() |
1538 | | - $retVal = '<!--LINK ' . implode( ' ', array( $nt->getNamespace(), $nt->getDBkey(), |
1539 | | - $query, $prefix . $text . $inside ) ) . "-->{$trail}"; |
| 1547 | + $nr = array_push( $wgLinkHolders['namespaces'], $nt->getNamespace() ); |
| 1548 | + $wgLinkHolders['dbkeys'][] = $nt->getDBkey(); |
| 1549 | + $wgLinkHolders['queries'][] = $query; |
| 1550 | + $wgLinkHolders['texts'][] = $prefix.$text.$inside; |
| 1551 | + $wgLinkHolders['titles'][] = $nt; |
| 1552 | + |
| 1553 | + $retVal = '<!--LINK '. ($nr-1) ."-->{$trail}"; |
1540 | 1554 | } else { |
1541 | 1555 | # Work out link colour immediately |
1542 | 1556 | $aid = $nt->getArticleID() ; |