Index: trunk/extensions/BreadCrumbs/BreadCrumbsFunctions.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | die(); |
16 | 16 | } |
17 | 17 | |
18 | | -function fnBreadCrumbsShowHook( &$m_pageObj ) { |
| 18 | +function fnBreadCrumbsShowHook( &$article ) { |
19 | 19 | global $wgOut, $wgUser; |
20 | 20 | global $wgBreadCrumbsDelimiter, $wgBreadCrumbsCount, $wgBreadCrumbsShowAnons; |
21 | 21 | |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | # cache index of last element: |
29 | 29 | $m_count = count( $m_BreadCrumbs ) - 1; |
30 | 30 | # Title object for the page we're viewing |
31 | | - $title = $m_pageObj->getTitle(); |
| 31 | + $title = $article->getTitle(); |
32 | 32 | |
33 | 33 | # check for doubles: |
34 | 34 | if ( $m_count < 1 || $m_BreadCrumbs[ $m_count ] != $title->getPrefixedText() ) { |
— | — | @@ -43,8 +43,6 @@ |
44 | 44 | # update cache: |
45 | 45 | $m_count = count( $m_BreadCrumbs ) - 1; |
46 | 46 | |
47 | | - # acquire a skin object: |
48 | | - $m_skin = $wgUser->getSkin(); |
49 | 47 | # build the breadcrumbs trail: |
50 | 48 | $m_trail = '<div id="BreadCrumbsTrail">'; |
51 | 49 | for ( $i = 0; $i <= $m_count; $i++ ) { |
— | — | @@ -64,11 +62,11 @@ |
65 | 63 | } |
66 | 64 | |
67 | 65 | # 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; |
70 | 68 | |
71 | | - if ( $wgBreadCrumbsShowAnons || $wgUser->isLoggedIn() ) { |
72 | | - $m_pageObj->addModules( 'ext.breadCrumbs' ); |
| 69 | + if ( $wgBreadCrumbsShowAnons || $outputPage->getUser()->isLoggedIn() ) { |
| 70 | + $outputPage->addModules( 'ext.breadCrumbs' ); |
73 | 71 | } |
74 | 72 | |
75 | 73 | # Be nice: |