1
|
|
|
<?php |
2
|
|
|
/************************************************************************** |
3
|
|
|
********** English Wikipedia Account Request Interface ********** |
4
|
|
|
*************************************************************************** |
5
|
|
|
** Wikipedia Account Request Graphic Design by Charles Melbye, ** |
6
|
|
|
** which is licensed under a Creative Commons ** |
7
|
|
|
** Attribution-Noncommercial-Share Alike 3.0 United States License. ** |
8
|
|
|
** ** |
9
|
|
|
** All other code are released under the Public Domain ** |
10
|
|
|
** by the ACC Development Team. ** |
11
|
|
|
** ** |
12
|
|
|
** See CREDITS for the list of developers. ** |
13
|
|
|
***************************************************************************/ |
14
|
|
|
|
15
|
|
|
class StatsPasswordConversion extends StatisticsPage |
16
|
|
|
{ |
17
|
|
|
protected function execute() |
18
|
|
|
{ |
19
|
|
|
$query = <<<sql |
20
|
|
|
SELECT '0' AS 'Version', 'Active' AS 'Type', COUNT(*) AS 'Count' FROM user WHERE password NOT LIKE ':%' AND (status = 'User' OR status = 'Admin') |
21
|
|
|
UNION |
22
|
|
|
SELECT '0', 'Inactive', COUNT(*) FROM user WHERE password NOT LIKE ':%' AND NOT (status = 'User' OR status = 'Admin') |
23
|
|
|
UNION |
24
|
|
|
SELECT SUBSTRING(password FROM 2 FOR 1), 'Active', COUNT(*) FROM user WHERE password LIKE ':%' AND (status = 'User' OR status = 'Admin') GROUP BY SUBSTRING(password FROM 2 FOR 1) |
25
|
|
|
UNION |
26
|
|
|
SELECT SUBSTRING(password FROM 2 FOR 1), 'Inactive', COUNT(*) FROM user WHERE password LIKE ':%' AND NOT (status = 'User' OR status = 'Admin') GROUP BY SUBSTRING(password FROM 2 FOR 1) |
27
|
|
|
ORDER BY `Version` ASC, 'Type' ASC |
28
|
|
|
; |
29
|
|
|
sql; |
30
|
|
|
|
31
|
|
|
$qb = new QueryBrowser(); |
32
|
|
|
$qb->rowFetchMode = PDO::FETCH_NUM; |
33
|
|
|
$r = $qb->executeQueryToTable($query); |
34
|
|
|
|
35
|
|
|
return $r; |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
public function getPageTitle() |
39
|
|
|
{ |
40
|
|
|
return "Password conversion status"; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
public function getPageName() |
44
|
|
|
{ |
45
|
|
|
return "PasswordConversion"; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
public function isProtected() |
49
|
|
|
{ |
50
|
|
|
return true; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
public function requiresWikiDatabase() |
54
|
|
|
{ |
55
|
|
|
return false; |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|