Index: trunk/extensions/FlaggedRevs/specialpages/PendingChanges_body.php |
— | — | @@ -62,9 +62,10 @@ |
63 | 63 | } |
64 | 64 | |
65 | 65 | public function showForm() { |
66 | | - global $wgUser, $wgOut, $wgScript; |
| 66 | + global $wgUser, $wgOut, $wgScript, $wgLang; |
67 | 67 | # Explanatory text |
68 | | - $wgOut->addWikiMsg( 'pendingchanges-list', $this->pager->getNumRows() ); |
| 68 | + $wgOut->addWikiMsg( 'pendingchanges-list', |
| 69 | + $wgLang->formatNum( $this->pager->getNumRows() ) ); |
69 | 70 | |
70 | 71 | $form = Html::openElement( 'form', array( 'name' => 'pendingchanges', |
71 | 72 | 'action' => $wgScript, 'method' => 'get' ) ) . "\n"; |
Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | protected function showForm() { |
46 | 46 | global $wgOut, $wgLang, $wgScript; |
47 | 47 | # Add explanatory text |
48 | | - $wgOut->addWikiMsg( 'unreviewedpages-list', $this->pager->getNumRows() ); |
| 48 | + $wgOut->addWikiMsg( 'unreviewedpages-list', $wgLang->formatNum( $this->pager->getNumRows() ) ); |
49 | 49 | |
50 | 50 | # show/hide links |
51 | 51 | $showhide = array( wfMsgHtml( 'show' ), wfMsgHtml( 'hide' ) ); |
Index: trunk/extensions/FlaggedRevs/specialpages/QualityOversight_body.php |
— | — | @@ -11,10 +11,9 @@ |
12 | 12 | } |
13 | 13 | |
14 | 14 | public function execute( $par ) { |
15 | | - global $wgOut, $wgUser, $wgRequest, $wgFlaggedRevsOversightAge; |
| 15 | + global $wgOut, $wgUser, $wgRequest, $wgLang, $wgFlaggedRevsOversightAge; |
16 | 16 | |
17 | 17 | $this->setHeaders(); |
18 | | - $wgOut->addHTML( wfMsgExt( 'qualityoversight-list', array( 'parse' ) ) ); |
19 | 18 | |
20 | 19 | $this->namespace = $wgRequest->getInt( 'namespace' ); |
21 | 20 | $this->level = $wgRequest->getIntOrNull( 'level' ); |
— | — | @@ -24,28 +23,35 @@ |
25 | 24 | # Check if the user exists |
26 | 25 | $usertitle = Title::makeTitleSafe( NS_USER, $this->user ); |
27 | 26 | $u = $usertitle ? User::idFromName( $this->user ) : false; |
28 | | - |
29 | | - # Show options |
30 | | - $this->showForm(); |
31 | | - |
| 27 | + |
| 28 | + # Are the dropdown params given even valid? |
32 | 29 | $actions = $this->getActions(); |
33 | 30 | if ( empty( $actions ) ) { |
| 31 | + $wgOut->addWikiMsg( 'qualityoversight-list', 0 ); |
34 | 32 | $wgOut->addWikiMsg( 'logempty' ); |
35 | 33 | return; |
36 | 34 | } |
37 | | - |
38 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 35 | + |
39 | 36 | # Get extra query conds |
40 | 37 | $conds = array( 'log_namespace' => $this->namespace, 'log_action' => $actions ); |
41 | 38 | # Get cutoff time (mainly for performance) |
42 | 39 | if ( !$u ) { |
| 40 | + $dbr = wfGetDB( DB_SLAVE ); |
43 | 41 | $cutoff_unixtime = time() - $wgFlaggedRevsOversightAge; |
44 | 42 | $cutoff = $dbr->addQuotes( $dbr->timestamp( $cutoff_unixtime ) ); |
45 | 43 | $conds[] = "log_timestamp >= $cutoff"; |
46 | 44 | } |
| 45 | + |
47 | 46 | # Create a LogPager item to get the results and a LogEventsList item to format them... |
48 | 47 | $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 ); |
49 | 48 | $pager = new LogPager( $loglist, 'review', $this->user, '', '', $conds ); |
| 49 | + |
| 50 | + # Explanatory text |
| 51 | + $wgOut->addWikiMsg( 'qualityoversight-list', |
| 52 | + $wgLang->formatNum( $pager->getNumRows() ) ); |
| 53 | + # Show form options |
| 54 | + $this->showForm(); |
| 55 | + |
50 | 56 | # Insert list |
51 | 57 | $logBody = $pager->getBody(); |
52 | 58 | if ( $logBody ) { |
Index: trunk/extensions/FlaggedRevs/specialpages/ConfiguredPages_body.php |
— | — | @@ -31,9 +31,10 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | protected function showForm() { |
35 | | - global $wgOut, $wgScript; |
| 35 | + global $wgOut, $wgScript, $wgLang; |
36 | 36 | # Explanatory text |
37 | | - $wgOut->addWikiMsg( 'configuredpages-list', $this->pager->getNumRows() ); |
| 37 | + $wgOut->addWikiMsg( 'configuredpages-list', |
| 38 | + $wgLang->formatNum( $this->pager->getNumRows() ) ); |
38 | 39 | |
39 | 40 | $fields = array(); |
40 | 41 | # Namespace selector |
Index: trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php |
— | — | @@ -57,9 +57,10 @@ |
58 | 58 | } |
59 | 59 | |
60 | 60 | public function showForm() { |
61 | | - global $wgOut, $wgScript; |
| 61 | + global $wgOut, $wgScript, $wgLang; |
62 | 62 | // Add explanatory text |
63 | | - $wgOut->addWikiMsg( 'problemchanges-list', $this->pager->getNumRows() ); |
| 63 | + $wgOut->addWikiMsg( 'problemchanges-list', |
| 64 | + $wgLang->formatNum( $this->pager->getNumRows() ) ); |
64 | 65 | |
65 | 66 | $form = Html::openElement( 'form', array( 'name' => 'problemchanges', |
66 | 67 | 'action' => $wgScript, 'method' => 'get' ) ) . "\n"; |
Index: trunk/extensions/FlaggedRevs/specialpages/ReviewedPages_body.php |
— | — | @@ -34,11 +34,12 @@ |
35 | 35 | } |
36 | 36 | |
37 | 37 | public function showForm() { |
38 | | - global $wgOut, $wgScript; |
| 38 | + global $wgOut, $wgScript, $wgLang; |
39 | 39 | |
40 | 40 | // Text to explain level select (if there are several levels) |
41 | 41 | if ( FlaggedRevs::qualityVersions() ) { |
42 | | - $wgOut->addWikiMsg( 'reviewedpages-list', $this->pager->getNumRows() ); |
| 42 | + $wgOut->addWikiMsg( 'reviewedpages-list', |
| 43 | + $wgLang->formatNum( $this->pager->getNumRows() ) ); |
43 | 44 | } |
44 | 45 | $form = Html::openElement( 'form', |
45 | 46 | array( 'name' => 'reviewedpages', 'action' => $wgScript, 'method' => 'get' ) ); |
Index: trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php |
— | — | @@ -31,8 +31,9 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | protected function showForm() { |
35 | | - global $wgOut, $wgScript; |
36 | | - $wgOut->addWikiMsg( 'stablepages-list', $this->pager->getNumRows() ); |
| 35 | + global $wgOut, $wgScript, $wgLang; |
| 36 | + $wgOut->addWikiMsg( 'stablepages-list', |
| 37 | + $wgLang->formatNum( $this->pager->getNumRows() ) ); |
37 | 38 | $fields = array(); |
38 | 39 | # Namespace selector |
39 | 40 | if ( count( FlaggedRevs::getReviewNamespaces() ) > 1 ) { |