Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php |
— | — | @@ -80,12 +80,12 @@ |
81 | 81 | $pager = new UnreviewedPagesPager( $this, $live, $namespace, |
82 | 82 | !$hideRedirs, $category, $level ); |
83 | 83 | if ( $pager->getNumRows() ) { |
84 | | - $wgOut->addHTML( wfMsgExt( 'unreviewed-list', array( 'parse' ) ) ); |
| 84 | + $wgOut->addWikiMsg( 'unreviewed-list' ); |
85 | 85 | $wgOut->addHTML( $pager->getNavigationBar() ); |
86 | 86 | $wgOut->addHTML( $pager->getBody() ); |
87 | 87 | $wgOut->addHTML( $pager->getNavigationBar() ); |
88 | 88 | } else { |
89 | | - $wgOut->addHTML( wfMsgExt( 'unreviewed-none', array( 'parse' ) ) ); |
| 89 | + $wgOut->addWikiMsg( 'unreviewed-none' ); |
90 | 90 | } |
91 | 91 | } |
92 | 92 | |
— | — | @@ -110,11 +110,11 @@ |
111 | 111 | $hours = ( $currentTime - $firstPendingTime ) / 3600; |
112 | 112 | // After three days, just use days |
113 | 113 | if ( $hours > ( 3 * 24 ) ) { |
114 | | - $days = round( $hours / 24, 0 ); |
| 114 | + $days = $wgLang->formatNum( round( $hours / 24, 0 ) ); |
115 | 115 | $age = ' ' . wfMsgExt( 'unreviewed-days', array( 'parsemag' ), $wgLang->formatNum( $days ) ); |
116 | 116 | // If one or more hours, use hours |
117 | 117 | } elseif ( $hours >= 1 ) { |
118 | | - $hours = round( $hours, 0 ); |
| 118 | + $hours = $wgLang->formatNum( round( $hours, 0 ) ); |
119 | 119 | $age = ' ' . wfMsgExt( 'unreviewed-hours', array( 'parsemag' ), $wgLang->formatNum( $hours ) ); |
120 | 120 | } else { |
121 | 121 | $age = ' ' . wfMsg( 'unreviewed-recent' ); // hot off the press :) |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | if ( $wgUser->isAllowed( 'unwatchedpages' ) ) { |
124 | 124 | $uw = self::usersWatching( $title ); |
125 | 125 | $watching = $uw |
126 | | - ? wfMsgExt( 'unreviewed-watched', array( 'parsemag' ), $wgLang->formatNum( $uw ) ) |
| 126 | + ? wfMsgExt( 'unreviewed-watched', 'parsemag', $wgLang->formatNum( $uw ) ) |
127 | 127 | : wfMsgHtml( 'unreviewed-unwatched' ); |
128 | 128 | $watching = " $watching"; // Oh-noes! |
129 | 129 | } else { |
— | — | @@ -130,7 +130,8 @@ |
131 | 131 | } |
132 | 132 | $css = self::getLineClass( $hours, $uw ); |
133 | 133 | $css = $css ? " class='$css'" : ""; |
134 | | - $pageId = isset( $row->page_id ) ? $row->page_id : $row->qc_value; |
| 134 | + $pageId = isset( $row->page_id ) ? |
| 135 | + $row->page_id : $row->qc_value; |
135 | 136 | $key = wfMemcKey( 'unreviewedPages', 'underReview', $pageId ); |
136 | 137 | $val = $wgMemc->get( $key ); |
137 | 138 | # Show if a user is looking at this page |
— | — | @@ -146,9 +147,10 @@ |
147 | 148 | /** |
148 | 149 | * Get number of users watching a page. Max is 5. |
149 | 150 | * @param Title $title |
| 151 | + * @return int |
150 | 152 | */ |
151 | | - public static function usersWatching( $title ) { |
152 | | - global $wgMiserMode; |
| 153 | + public static function usersWatching( Title $title ) { |
| 154 | + global $wgMiserMode, $wgCookieExpiration; |
153 | 155 | $dbr = wfGetDB( DB_SLAVE ); |
154 | 156 | $count = - 1; |
155 | 157 | if ( $wgMiserMode ) { |
— | — | @@ -160,7 +162,6 @@ |
161 | 163 | } |
162 | 164 | # If it is small, just COUNT() it, otherwise, stick with estimate... |
163 | 165 | if ( $count == - 1 || $count <= 100 ) { |
164 | | - global $wgCookieExpiration; |
165 | 166 | # Get number of active editors watchling this |
166 | 167 | $cutoff = $dbr->timestamp( wfTimestamp( TS_UNIX ) - 2 * $wgCookieExpiration ); |
167 | 168 | $res = $dbr->select( array( 'watchlist', 'user' ), '1', |
— | — | @@ -174,7 +175,7 @@ |
175 | 176 | ); |
176 | 177 | $count = $dbr->numRows( $res ); |
177 | 178 | } |
178 | | - return $count; |
| 179 | + return (int)$count; |
179 | 180 | } |
180 | 181 | |
181 | 182 | protected static function getLineClass( $hours, $uw ) { |
Index: trunk/extensions/FlaggedRevs/specialpages/ReviewedVersions_body.php |
— | — | @@ -31,18 +31,17 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | protected function showStableList() { |
35 | | - global $wgOut, $wgUser; |
| 35 | + global $wgOut, $wgUser, $wgLang; |
36 | 36 | # Must be a content page |
37 | 37 | if ( !FlaggedRevs::inReviewNamespace( $this->page ) ) { |
38 | | - $wgOut->addHTML( wfMsgExt( 'reviewedversions-none', array( 'parse' ), |
39 | | - $this->page->getPrefixedText() ) ); |
| 38 | + $wgOut->addWikiMsg( 'reviewedversions-none', $this->page->getPrefixedText() ); |
40 | 39 | return; |
41 | 40 | } |
42 | 41 | $pager = new ReviewedVersionsPager( $this, array(), $this->page ); |
43 | 42 | $num = $pager->getNumRows(); |
44 | 43 | if ( $num ) { |
45 | | - $wgOut->addHTML( wfMsgExt( 'reviewedversions-list', array( 'parse' ), |
46 | | - $this->page->getPrefixedText(), $num ) ); |
| 44 | + $wgOut->addWikiMsg( 'reviewedversions-list', |
| 45 | + $this->page->getPrefixedText(), $wgLang->formatNum( $num ) ); |
47 | 46 | $wgOut->addHTML( $pager->getNavigationBar() ); |
48 | 47 | $wgOut->addHTML( "<ul>" . $pager->getBody() . "</ul>" ); |
49 | 48 | $wgOut->addHTML( $pager->getNavigationBar() ); |
Index: trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php |
— | — | @@ -79,14 +79,14 @@ |
80 | 80 | $wgOut->addHTML( $pager->getBody() ); |
81 | 81 | $wgOut->addHTML( $pager->getNavigationBar() ); |
82 | 82 | } else { |
83 | | - $wgOut->addHTML( wfMsgExt( 'problemchanges-none', array( 'parse' ) ) ); |
| 83 | + $wgOut->addWikiMsg( 'problemchanges-none' ); |
84 | 84 | } |
85 | 85 | // If this page is transcluded... |
86 | 86 | } else { |
87 | 87 | if ( $pager->getNumRows() ) { |
88 | 88 | $wgOut->addHTML( $pager->getBody() ); |
89 | 89 | } else { |
90 | | - $wgOut->addHTML( wfMsgExt( 'problemchanges-none', array( 'parse' ) ) ); |
| 90 | + $wgOut->addWikiMsg( 'problemchanges-none' ); |
91 | 91 | } |
92 | 92 | } |
93 | 93 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/ReviewedPages_body.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | if ( $num ) { |
73 | 73 | // Text to explain level select (if there are several levels) |
74 | 74 | if ( FlaggedRevs::qualityVersions() ) { |
75 | | - $wgOut->addHTML( wfMsgExt( 'reviewedpages-list', array( 'parse' ), $wgLang->formatNum( $num ) ) ); |
| 75 | + $wgOut->addWikiMsg( 'reviewedpages-list', $wgLang->formatNum( $num ) ); |
76 | 76 | } |
77 | 77 | $wgOut->addHTML( $pager->getNavigationBar() ); |
78 | 78 | $wgOut->addHTML( $pager->getBody() ); |