Index: trunk/extensions/Piwik/Piwik.php |
— | — | @@ -34,17 +34,17 @@ |
35 | 35 | $wgPiwikSpecialPageDate = 'yesterday'; |
36 | 36 | |
37 | 37 | function efPiwikHookText( $skin, &$text = '' ) { |
38 | | - $text .= efAddPiwik(); |
| 38 | + $text .= efAddPiwik( $skin->getTitle() ); |
39 | 39 | return true; |
40 | 40 | } |
41 | 41 | |
42 | | -function efAddPiwik() { |
43 | | - global $wgPiwikIDSite, $wgPiwikURL, $wgPiwikIgnoreSysops, $wgPiwikIgnoreBots, $wgUser, $wgScriptPath, $wgPiwikCustomJS, $wgPiwikActionName, $wgTitle, $wgPiwikUsePageTitle; |
| 42 | +function efAddPiwik( $title ) { |
| 43 | + global $wgPiwikIDSite, $wgPiwikURL, $wgPiwikIgnoreSysops, $wgPiwikIgnoreBots, $wgUser, $wgScriptPath, $wgPiwikCustomJS, $wgPiwikActionName, $wgPiwikUsePageTitle; |
44 | 44 | if ( !$wgUser->isAllowed( 'bot' ) || !$wgPiwikIgnoreBots ) { |
45 | 45 | if ( !$wgUser->isAllowed( 'protect' ) || !$wgPiwikIgnoreSysops ) { |
46 | 46 | if ( !empty( $wgPiwikIDSite ) AND !empty( $wgPiwikURL ) ) { |
47 | | - if ( $wgPiwikUsePageTitle == true ) { |
48 | | - $wgPiwikPageTitle = $wgTitle->getPrefixedText(); |
| 47 | + if ( $wgPiwikUsePageTitle ) { |
| 48 | + $wgPiwikPageTitle = $title->getPrefixedText(); |
49 | 49 | |
50 | 50 | $wgPiwikFinalActionName = $wgPiwikActionName; |
51 | 51 | $wgPiwikFinalActionName .= $wgPiwikPageTitle; |
— | — | @@ -94,6 +94,3 @@ |
95 | 95 | $wgExtensionMessagesFiles['Piwik'] = $dir . 'Piwik.i18n.php'; |
96 | 96 | $wgExtensionAliasesFiles['Piwik'] = $dir . 'Piwik.alias.php'; |
97 | 97 | $wgSpecialPages['Piwik'] = 'Piwik'; # Let MediaWiki know about your new special page. |
98 | | - |
99 | | -// /Alias for efAddPiwik - backwards compatibility. |
100 | | -function addPiwik() { return efAddPiwik(); } |