Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# WSStats
This MediaWiki 1.39.x extension counts pageviews by user

* Version 2.0.1 : Fixed sql table https://github.com/WikibaseSolutions/WSStats/pull/8 add indexing to user and page https://github.com/WikibaseSolutions/WSStats/pull/9
* Version 2.0.0 : REL 1.39 only. Added statistics for Special Pages. Lua equivalent functions for statistics. Special Page added.
* Version 1.0.8 : Removed global references
* Version 1.0.7 : Added statistics over time for pages
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "WSStats",
"version": "2.0.0",
"version": "2.0.1",
"author": [
"Sen-Sai"
],
Expand Down
4 changes: 2 additions & 2 deletions sql/WSStats.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CREATE TABLE /*_*/WSPS (
`id` int(11) NOT NULL PRIMARY KEY auto_increment,
`page_id` int(11) NOT NULL default '0',
`user_id` int(11) NOT NULL default '0',
`added` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
`title` varchar(250) NOT NULL DEFAULT ''
`added` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`title` varchar(250) NOT NULL DEFAULT '',
`isSpecialPage` INT(1) NOT NULL DEFAULT '0'
) /*$wgDBTableOptions*/;
2 changes: 2 additions & 0 deletions sql/WSStatsAddIndexPageId.mysql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Alter table WSPS
ADD INDEX idx_wsps_page_id (page_id);
2 changes: 2 additions & 0 deletions sql/WSStatsAddIndexUserId.mysql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Alter table WSPS
ADD INDEX idx_wsps_user_id (user_id);
2 changes: 2 additions & 0 deletions src/WSStatsHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ public static function addTables( $updater ) {

$updater->addExtensionField( self::DBTABLE, 'title', __DIR__ . "/../sql/WSStatsAddTitle.$dbt" );
$updater->addExtensionField( self::DBTABLE, 'isSpecialPage', __DIR__ . "/../sql/WSStatsAddSpecialBool.$dbt" );
$updater->addExtensionIndex(self::DBTABLE, 'idx_wsps_page_id', __DIR__ . "/../sql/WSStatsAddIndexPageId.$dbt" );
$updater->addExtensionIndex(self::DBTABLE, 'idx_wsps_user_id', __DIR__ . "/../sql/WSStatsAddIndexUserId.$dbt" );


return true;
Expand Down