From 134411e5ff851d993ab8ea4ca9f6d61492f0375c Mon Sep 17 00:00:00 2001 From: designburo Date: Thu, 23 Dec 2021 09:59:08 +0100 Subject: [PATCH] v1.0.6 Fixed path to sql tables --- README.md | 1 + src/WSStatsHooks.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cb0dad4..abdbe60 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # WSStats This MediaWiki extension counts pageviews by user +* Version 1.0.6 : Fixed path to sql tables * Version 1.0.5 : Rewrote database queries to use MW database abstraction layer. * Version 1.0.4 : Security fix! Unhandled user input. Update to 1.0.4 as soon as possible. * Version 1.0.3 : Top X list changed as it no longer shows deleted pages diff --git a/src/WSStatsHooks.php b/src/WSStatsHooks.php index 0bffe7a..4f24cca 100644 --- a/src/WSStatsHooks.php +++ b/src/WSStatsHooks.php @@ -145,7 +145,7 @@ public static function addTables( $updater ) { if ( $dbt === 'sqlite' ) { $dbt = 'sql'; } - $tables = __DIR__ . "/sql/WSStats.$dbt"; + $tables = __DIR__ . "/../sql/WSStats.$dbt"; if ( file_exists( $tables ) ) { $updater->addExtensionUpdate( array( @@ -155,7 +155,7 @@ public static function addTables( $updater ) { true ) ); } else { - throw new MWException( "WSStats does not support $dbt." ); + throw new \MWException( "WSStats does not support $dbt." ); } return true;