1 | <?php |
||
15 | class StatsFastCloses extends StatisticsPage |
||
16 | { |
||
17 | protected function execute() |
||
18 | { |
||
19 | $query = <<<SQL |
||
20 | SELECT |
||
21 | log_closed.objectid AS Request, |
||
22 | user.username AS User, |
||
23 | log_closed.user AS UserID, |
||
24 | TIMEDIFF(log_closed.timestamp, log_reserved.timestamp) AS 'Time Taken', |
||
25 | closes.mail_desc AS 'Close Type', |
||
26 | log_closed.timestamp AS 'Date' |
||
27 | |||
28 | FROM log log_closed |
||
29 | INNER JOIN log log_reserved ON log_closed.objectid = log_reserved.objectid |
||
30 | AND log_closed.objecttype = log_reserved.objecttype |
||
31 | INNER JOIN closes ON closes.`closes` = log_closed.action |
||
32 | LEFT JOIN user ON log_closed.user = user.id |
||
33 | |||
34 | WHERE log_closed.action LIKE 'Closed%' |
||
35 | AND log_reserved.action = 'Reserved' |
||
36 | AND TIMEDIFF(log_closed.timestamp, log_reserved.timestamp) < '00:00:30' |
||
37 | AND log_closed.user = log_reserved.user |
||
38 | AND TIMEDIFF(log_closed.timestamp, log_reserved.timestamp) > '00:00:00' |
||
39 | AND DATE(log_closed.timestamp) > DATE(NOW()-INTERVAL 3 MONTH) |
||
40 | |||
41 | ORDER BY TIMEDIFF(log_closed.timestamp, log_reserved.timestamp) ASC |
||
42 | ; |
||
43 | SQL; |
||
44 | |||
45 | $qb = new QueryBrowser(); |
||
46 | $qb->tableCallbackFunction = "statsFastClosesRowCallback"; |
||
|
|||
47 | $qb->overrideTableTitles = |
||
48 | array("Request", "User", "Time Taken", "Close Type", "Date"); |
||
49 | $qb->rowFetchMode = PDO::FETCH_NUM; |
||
50 | $r = $qb->executeQueryToTable($query); |
||
51 | |||
52 | return $r; |
||
53 | } |
||
54 | |||
55 | public function getPageName() |
||
56 | { |
||
57 | return "FastCloses"; |
||
58 | } |
||
59 | |||
60 | public function getPageTitle() |
||
63 | } |
||
64 | |||
65 | public function isProtected() |
||
66 | { |
||
67 | return true; |
||
68 | } |
||
69 | |||
70 | public function requiresWikiDatabase() |
||
73 | } |
||
74 | } |
||
75 | |||
76 | function statsFastClosesRowCallback($row, $currentreq) |
||
109 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..