Skip to content

Commit

Permalink
Fix $wgMatomo* and $wgPiwik* parameters
Browse files Browse the repository at this point in the history
$wgMatomo* were mispelled (as $wgMamoto*).

The code, as written, never reached $wgPiwik* because $wgMatomo*
had precedence and are defined in extension.json, hence they had
always de facto precedence.

Issue: #25
  • Loading branch information
Seb35 committed Feb 28, 2019
1 parent 04d2406 commit c722fab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Matomo.hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public static function MatomoSetup ($skin, &$text = '')
*/
public static function getParameter( $name ) {
$config = \MediaWiki\MediaWikiServices::getInstance()->getMainConfig();
if ( $config->has( "Mamoto$name" ) ) {
return $config->get( "Mamoto$name" );
} elseif ( $config->has( "Piwik$name" ) ) {
if ( $config->has( "Piwik$name" ) ) {
return $config->get( "Piwik$name" );
} elseif ( $config->has( "Matomo$name" ) ) {
return $config->get( "Matomo$name" );
}
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Mamoto extension for MediaWiki
==============================
Version 4.0.0
- Last update: 15 February 2019
Version 4.0.1
- Last update: 28 February 2019

This the Mamoto (ex-Piwik) integration extension for MediaWiki
software. The extension is only useful if you've got a MediaWiki
Expand Down

0 comments on commit c722fab

Please sign in to comment.