r89175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89174‎ | r89175 | r89176 >
Date:16:01, 30 May 2011
Author:ialex
Status:deferred
Tags:
Comment:
Follow-up r89159:
* removed now unused variable
* completely break b/c since we now require Linker::link() to be static

Also renamed some variables to be more explicit
Modified paths:
  • /trunk/extensions/BreadCrumbs/BreadCrumbsFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BreadCrumbs/BreadCrumbsFunctions.php
@@ -14,7 +14,7 @@
1515 die();
1616 }
1717
18 -function fnBreadCrumbsShowHook( &$m_pageObj ) {
 18+function fnBreadCrumbsShowHook( &$article ) {
1919 global $wgOut, $wgUser;
2020 global $wgBreadCrumbsDelimiter, $wgBreadCrumbsCount, $wgBreadCrumbsShowAnons;
2121
@@ -27,7 +27,7 @@
2828 # cache index of last element:
2929 $m_count = count( $m_BreadCrumbs ) - 1;
3030 # Title object for the page we're viewing
31 - $title = $m_pageObj->getTitle();
 31+ $title = $article->getTitle();
3232
3333 # check for doubles:
3434 if ( $m_count < 1 || $m_BreadCrumbs[ $m_count ] != $title->getPrefixedText() ) {
@@ -43,8 +43,6 @@
4444 # update cache:
4545 $m_count = count( $m_BreadCrumbs ) - 1;
4646
47 - # acquire a skin object:
48 - $m_skin = $wgUser->getSkin();
4947 # build the breadcrumbs trail:
5048 $m_trail = '<div id="BreadCrumbsTrail">';
5149 for ( $i = 0; $i <= $m_count; $i++ ) {
@@ -64,11 +62,11 @@
6563 }
6664
6765 # Entry point for the hook for printing the CSS:
68 -function fnBreadCrumbsOutputHook( &$m_pageObj, $m_parserOutput ) {
69 - global $wgBreadCrumbsShowAnons, $wgUser;
 66+function fnBreadCrumbsOutputHook( &$outputPage, $parserOutput ) {
 67+ global $wgBreadCrumbsShowAnons;
7068
71 - if ( $wgBreadCrumbsShowAnons || $wgUser->isLoggedIn() ) {
72 - $m_pageObj->addModules( 'ext.breadCrumbs' );
 69+ if ( $wgBreadCrumbsShowAnons || $outputPage->getUser()->isLoggedIn() ) {
 70+ $outputPage->addModules( 'ext.breadCrumbs' );
7371 }
7472
7573 # Be nice:

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89159Restore compatibility with trunk. Skin::makeLink() was removed.siebrand08:19, 30 May 2011

Status & tagging log