Completed
Pull Request — master (#526)
by Michael
16:45 queued 06:57
created

StatsInactiveUsers::getPageName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
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 StatsInactiveUsers extends StatisticsPage
16
{
17
	protected function execute()
18
	{
19
		global $smarty;
20
21
		// this is horrible.
22
		// yes, there is business logic in the templates
23
		// yes, there was some there before
24
		// yes, I have just added to it.
25
		//
26
		// I'm sorry.
27
		//
28
		// newinternal will fix this.
29
		$date = new DateTime();
30
		$date->modify("-90 days");
31
32
		$smarty->assign('datelimit', $date);
33
34
		$showImmune = false;
35
		if (isset($_GET['showimmune'])) {
36
			$showImmune = true;
37
		}
38
		$smarty->assign("showImmune", $showImmune);
39
40
		$inactiveUsers = User::getAllInactive(gGetDb());
41
42
		$smarty->assign("inactiveUsers", $inactiveUsers);
43
44
		return $smarty->fetch("statistics/inactiveusers.tpl");
45
	}
46
47
	public function getPageName()
48
	{
49
		return "InactiveUsers";
50
	}
51
52
	public function getPageTitle()
53
	{
54
		return "Inactive tool users";
55
	}
56
57
	public function isProtected()
58
	{
59
		return true;
60
	}
61
62
	public function requiresWikiDatabase()
63
	{
64
		return false;
65
	}
66
}
67