Index: trunk/phase3/includes/SpecialContributions.php |
— | — | @@ -5,124 +5,139 @@ |
6 | 6 | */ |
7 | 7 | |
8 | 8 | /** @package MediaWiki */ |
9 | | -class contribs_finder { |
| 9 | +class ContribsFinder { |
10 | 10 | var $username, $offset, $limit, $namespace; |
11 | 11 | var $dbr; |
12 | 12 | |
13 | | - function contribs_finder($username) { |
| 13 | + function ContribsFinder( $username ) { |
14 | 14 | $this->username = $username; |
15 | 15 | $this->namespace = false; |
16 | | - $this->dbr =& wfGetDB(DB_SLAVE); |
| 16 | + $this->dbr =& wfGetDB( DB_SLAVE ); |
17 | 17 | } |
18 | 18 | |
19 | | - function set_namespace($ns) { |
| 19 | + function setNamespace( $ns ) { |
20 | 20 | $this->namespace = $ns; |
21 | 21 | } |
22 | 22 | |
23 | | - function set_limit($limit) { |
| 23 | + function setLimit( $limit ) { |
24 | 24 | $this->limit = $limit; |
25 | 25 | } |
26 | 26 | |
27 | | - function set_offset($offset) { |
| 27 | + function setOffset( $offset ) { |
28 | 28 | $this->offset = $offset; |
29 | 29 | } |
30 | 30 | |
31 | | - function get_edit_limit($dir) { |
32 | | - list($index, $usercond) = $this->get_user_cond(); |
33 | | - $nscond = $this->get_namespace_cond(); |
34 | | - $use_index = $this->dbr->useIndexClause($index); |
35 | | - extract($this->dbr->tableNames('revision', 'page')); |
| 31 | + function getEditLimit( $dir ) { |
| 32 | + list( $index, $usercond ) = $this->getUserCond(); |
| 33 | + $nscond = $this->getNamespaceCond(); |
| 34 | + $use_index = $this->dbr->useIndexClause( $index ); |
| 35 | + extract( $this->dbr->tableNames( 'revision', 'page' ) ); |
36 | 36 | $sql = "SELECT rev_timestamp " . |
37 | 37 | " FROM $page,$revision $use_index " . |
38 | 38 | " WHERE rev_page=page_id AND $usercond $nscond" . |
39 | 39 | " ORDER BY rev_timestamp $dir LIMIT 1"; |
40 | 40 | |
41 | | - $res = $this->dbr->query($sql, "contribs_finder::get_edit_limit"); |
42 | | - while ($o = $this->dbr->fetchObject($res)) |
43 | | - $row = $o; |
44 | | - return $row->rev_timestamp; |
| 41 | + $res = $this->dbr->query( $sql, __METHOD__ ); |
| 42 | + $row = $this->dbr->fetchObject( $res ); |
| 43 | + if ( $row ) { |
| 44 | + return $row->rev_timestamp; |
| 45 | + } else { |
| 46 | + return false; |
| 47 | + } |
45 | 48 | } |
46 | 49 | |
47 | | - function get_edit_limits() { |
| 50 | + function getEditLimits() { |
48 | 51 | return array( |
49 | | - $this->get_edit_limit("ASC"), |
50 | | - $this->get_edit_limit("DESC") |
| 52 | + $this->getEditLimit( "ASC" ), |
| 53 | + $this->getEditLimit( "DESC" ) |
51 | 54 | ); |
52 | 55 | } |
53 | 56 | |
54 | | - function get_user_cond() { |
| 57 | + function getUserCond() { |
55 | 58 | $condition = ''; |
56 | 59 | |
57 | | - if ($this->username == 'newbies') { |
58 | | - $max = $this->dbr->selectField('user', 'max(user_id)', false, 'make_sql'); |
| 60 | + if ( $this->username == 'newbies' ) { |
| 61 | + $max = $this->dbr->selectField( 'user', 'max(user_id)', false, 'make_sql' ); |
59 | 62 | $condition = '>' . (int)($max - $max / 100); |
60 | 63 | } |
61 | 64 | |
62 | | - if ($condition == '') { |
63 | | - $condition = ' rev_user_text=' . $this->dbr->addQuotes($this->username); |
| 65 | + if ( $condition == '' ) { |
| 66 | + $condition = ' rev_user_text=' . $this->dbr->addQuotes( $this->username ); |
64 | 67 | $index = 'usertext_timestamp'; |
65 | 68 | } else { |
66 | 69 | $condition = ' rev_user '.$condition ; |
67 | 70 | $index = 'user_timestamp'; |
68 | 71 | } |
69 | | - return array($index, $condition); |
| 72 | + return array( $index, $condition ); |
70 | 73 | } |
71 | 74 | |
72 | | - function get_namespace_cond() { |
73 | | - if ($this->namespace !== false) |
| 75 | + function getNamespaceCond() { |
| 76 | + if ( $this->namespace !== false ) |
74 | 77 | return ' AND page_namespace = ' . (int)$this->namespace; |
75 | 78 | return ''; |
76 | 79 | } |
77 | 80 | |
78 | | - function get_previous_offset_for_paging() { |
79 | | - list($index, $usercond) = $this->get_user_cond(); |
80 | | - $nscond = $this->get_namespace_cond(); |
| 81 | + function getPreviousOffsetForPaging() { |
| 82 | + list( $index, $usercond ) = $this->getUserCond(); |
| 83 | + $nscond = $this->getNamespace_cond(); |
81 | 84 | |
82 | | - $use_index = $this->dbr->useIndexClause($index); |
83 | | - extract($this->dbr->tableNames('page', 'revision')); |
| 85 | + $use_index = $this->dbr->useIndexClause( $index ); |
| 86 | + extract( $this->dbr->tableNames( 'page', 'revision' ) ); |
84 | 87 | |
85 | 88 | $sql = "SELECT rev_timestamp FROM $page, $revision $use_index " . |
86 | 89 | "WHERE page_id = rev_page AND rev_timestamp > '" . $this->offset . "' AND " . |
87 | 90 | $usercond . $nscond; |
88 | 91 | $sql .= " ORDER BY rev_timestamp ASC"; |
89 | | - $sql = $this->dbr->limitResult($sql, $this->limit, 0); |
90 | | - $res = $this->dbr->query($sql); |
91 | | - $rows = array(); |
92 | | - while ($obj = $this->dbr->fetchObject($res)) |
93 | | - $rows[] = $obj; |
94 | | - $this->dbr->freeResult($res); |
95 | | - return $rows[count($rows) - 1]->rev_timestamp; |
| 92 | + $sql = $this->dbr->limitResult( $sql, $this->limit, 0 ); |
| 93 | + $res = $this->dbr->query( $sql ); |
| 94 | + |
| 95 | + $numRows = $this->dbr->numRows( $res ); |
| 96 | + if ( $numRows ) { |
| 97 | + $this->dbr->dataSeek( $res, $numRows - 1 ); |
| 98 | + $row = $this->dbr->fetchObject( $res ); |
| 99 | + $offset = $row->rev_timestamp; |
| 100 | + } else { |
| 101 | + $offset = false; |
| 102 | + } |
| 103 | + $this->dbr->freeResult( $res ); |
| 104 | + return $offset; |
96 | 105 | } |
97 | 106 | |
98 | | - function get_first_offset_for_paging() { |
99 | | - list($index, $usercond) = $this->get_user_cond(); |
100 | | - $use_index = $this->dbr->useIndexClause($index); |
101 | | - extract($this->dbr->tableNames('page', 'revision')); |
102 | | - $nscond = $this->get_namespace_cond(); |
| 107 | + function getFirstOffsetForPaging() { |
| 108 | + list( $index, $usercond ) = $this->getUserCond(); |
| 109 | + $use_index = $this->dbr->useIndexClause( $index ); |
| 110 | + extract( $this->dbr->tableNames( 'page', 'revision' ) ); |
| 111 | + $nscond = $this->getNamespaceCond(); |
103 | 112 | $sql = "SELECT rev_timestamp FROM $page, $revision $use_index " . |
104 | 113 | "WHERE page_id = rev_page AND " . |
105 | 114 | $usercond . $nscond; |
106 | 115 | $sql .= " ORDER BY rev_timestamp ASC"; |
107 | | - $sql = $this->dbr->limitResult($sql, $this->limit, 0); |
108 | | - $res = $this->dbr->query($sql); |
109 | | - $rows = array(); |
110 | | - while ($obj = $this->dbr->fetchObject($res)) |
111 | | - $rows[] = $obj; |
112 | | - $this->dbr->freeResult($res); |
113 | | - return $rows[count($rows) - 1]->rev_timestamp; |
| 116 | + $sql = $this->dbr->limitResult( $sql, $this->limit, 0 ); |
| 117 | + $res = $this->dbr->query( $sql ); |
| 118 | + |
| 119 | + $numRows = $this->dbr->numRows( $res ); |
| 120 | + if ( $numRows ) { |
| 121 | + $this->dbr->dataSeek( $res, $numRows - 1 ); |
| 122 | + $row = $this->dbr->fetchObject( $res ); |
| 123 | + $offset = $row->rev_timestamp; |
| 124 | + } else { |
| 125 | + $offset = false; |
| 126 | + } |
| 127 | + $this->dbr->freeResult( $res ); |
| 128 | + return $offset; |
114 | 129 | } |
115 | 130 | |
116 | | - /* private */ function make_sql() { |
| 131 | + /* private */ function makeSql() { |
117 | 132 | $userCond = $condition = $index = $offsetQuery = ''; |
118 | 133 | |
119 | | - extract($this->dbr->tableNames('page', 'revision')); |
120 | | - list($index, $userCond) = $this->get_user_cond(); |
| 134 | + extract( $this->dbr->tableNames( 'page', 'revision' ) ); |
| 135 | + list( $index, $userCond ) = $this->getUserCond(); |
121 | 136 | |
122 | | - if ($this->offset) |
| 137 | + if ( $this->offset ) |
123 | 138 | $offsetQuery = "AND rev_timestamp <= '{$this->offset}'"; |
124 | 139 | |
125 | | - $nscond = $this->get_namespace_cond(); |
126 | | - $use_index = $this->dbr->useIndexClause($index); |
| 140 | + $nscond = $this->getNamespaceCond(); |
| 141 | + $use_index = $this->dbr->useIndexClause( $index ); |
127 | 142 | $sql = "SELECT |
128 | 143 | page_namespace,page_title,page_is_new,page_latest, |
129 | 144 | rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_minor_edit,rev_user,rev_user_text, |
— | — | @@ -130,16 +145,16 @@ |
131 | 146 | FROM $page,$revision $use_index |
132 | 147 | WHERE page_id=rev_page AND $userCond $nscond $offsetQuery |
133 | 148 | ORDER BY rev_timestamp DESC"; |
134 | | - $sql = $this->dbr->limitResult($sql, $this->limit, 0); |
| 149 | + $sql = $this->dbr->limitResult( $sql, $this->limit, 0 ); |
135 | 150 | return $sql; |
136 | 151 | } |
137 | 152 | |
138 | 153 | function find() { |
139 | 154 | $contribs = array(); |
140 | | - $res = $this->dbr->query($this->make_sql(), 'contribs_finder::find'); |
141 | | - while ($c = $this->dbr->fetchObject($res)) |
| 155 | + $res = $this->dbr->query( $this->makeSql(), __METHOD__ ); |
| 156 | + while ( $c = $this->dbr->fetchObject( $res ) ) |
142 | 157 | $contribs[] = $c; |
143 | | - $this->dbr->freeResult($res); |
| 158 | + $this->dbr->freeResult( $res ); |
144 | 159 | return $contribs; |
145 | 160 | } |
146 | 161 | }; |
— | — | @@ -155,14 +170,14 @@ |
156 | 171 | global $wgUser, $wgOut, $wgLang, $wgRequest; |
157 | 172 | $fname = 'wfSpecialContributions'; |
158 | 173 | |
159 | | - $target = isset($par) ? $par : $wgRequest->getVal( 'target' ); |
160 | | - if (!strlen($target)) { |
161 | | - $wgOut->showErrorPage('notargettitle', 'notargettext'); |
| 174 | + $target = isset( $par ) ? $par : $wgRequest->getVal( 'target' ); |
| 175 | + if ( !strlen( $target ) ) { |
| 176 | + $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
162 | 177 | return; |
163 | 178 | } |
164 | 179 | |
165 | 180 | $nt = Title::newFromURL( $target ); |
166 | | - if (!$nt) { |
| 181 | + if ( !$nt ) { |
167 | 182 | $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
168 | 183 | return; |
169 | 184 | } |
— | — | @@ -170,112 +185,118 @@ |
171 | 186 | $options = array(); |
172 | 187 | |
173 | 188 | list( $options['limit'], $options['offset']) = wfCheckLimits(); |
174 | | - $options['offset'] = $wgRequest->getVal('offset'); |
| 189 | + $options['offset'] = $wgRequest->getVal( 'offset' ); |
175 | 190 | /* Offset must be an integral. */ |
176 | | - if (!strlen($options['offset']) || !preg_match('/^[0-9]+$/', $options['offset'])) |
| 191 | + if ( !strlen( $options['offset'] ) || !preg_match( '/^[0-9]+$/', $options['offset'] ) ) |
177 | 192 | $options['offset'] = ''; |
178 | 193 | |
179 | | - $title = Title::makeTitle(NS_SPECIAL, 'Contributions'); |
| 194 | + $title = Title::makeTitle( NS_SPECIAL, 'Contributions' ); |
180 | 195 | $options['target'] = $target; |
181 | 196 | |
182 | | - $nt =& Title::makeTitle(NS_USER, $nt->getDBkey()); |
183 | | - $finder = new contribs_finder(($target == 'newbies') ? 'newbies' : $nt->getText()); |
184 | | - $finder->set_limit($options['limit']); |
185 | | - $finder->set_offset($options['offset']); |
| 197 | + $nt =& Title::makeTitle( NS_USER, $nt->getDBkey() ); |
| 198 | + $finder = new ContribsFinder( ( $target == 'newbies' ) ? 'newbies' : $nt->getText() ); |
| 199 | + $finder->setLimit( $options['limit'] ); |
| 200 | + $finder->setOffset( $options['offset'] ); |
186 | 201 | |
187 | | - if (($ns = $wgRequest->getVal('namespace', null)) !== null && $ns !== '') { |
| 202 | + if ( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) { |
188 | 203 | #$options['namespace'] = intval( $ns ); |
189 | | - $finder->set_namespace($options['namespace']); |
| 204 | + $finder->setNamespace( $options['namespace'] ); |
190 | 205 | } else { |
191 | 206 | $options['namespace'] = ''; |
192 | 207 | } |
193 | 208 | |
194 | | - if ($wgUser->isAllowed('rollback') && $wgRequest->getBool( 'bot' )) { |
| 209 | + if ( $wgUser->isAllowed( 'rollback' ) && $wgRequest->getBool( 'bot' ) ) { |
195 | 210 | $options['bot'] = '1'; |
196 | 211 | } |
197 | 212 | |
198 | | - if ($wgRequest->getText('go') == 'prev') { |
199 | | - $options['offset'] = $finder->get_previous_offset_for_paging(); |
200 | | - $prevurl = $title->getLocalURL(wfArrayToCGI( $options )); |
201 | | - $wgOut->redirect($prevurl); |
202 | | - return; |
| 213 | + if ( $wgRequest->getText( 'go' ) == 'prev' ) { |
| 214 | + $offset = $finder->getPreviousOffsetForPaging(); |
| 215 | + if ( $offset !== false ) { |
| 216 | + $options['offset'] = $offset; |
| 217 | + $prevurl = $title->getLocalURL( wfArrayToCGI( $options ) ); |
| 218 | + $wgOut->redirect( $prevurl ); |
| 219 | + return; |
| 220 | + } |
203 | 221 | } |
204 | 222 | |
205 | | - if ($wgRequest->getText('go') == 'first' && $target != 'newbies') { |
206 | | - $options['offset'] = $finder->get_first_offset_for_paging(); |
207 | | - $prevurl = $title->getLocalURL(wfArrayToCGI( $options )); |
208 | | - $wgOut->redirect($prevurl); |
209 | | - return; |
| 223 | + if ( $wgRequest->getText( 'go' ) == 'first' && $target != 'newbies') { |
| 224 | + $offset = $finder->getFirstOffsetForPaging(); |
| 225 | + if ( $offset !== false ) { |
| 226 | + $options['offset'] = $offset; |
| 227 | + $prevurl = $title->getLocalURL( wfArrayToCGI( $options ) ); |
| 228 | + $wgOut->redirect( $prevurl ); |
| 229 | + return; |
| 230 | + } |
210 | 231 | } |
211 | 232 | |
212 | | - if ($target == 'newbies') { |
| 233 | + if ( $target == 'newbies' ) { |
213 | 234 | $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') ); |
214 | 235 | } else { |
215 | | - $wgOut->setSubtitle( wfMsgHtml( 'contribsub', contributionsSub($nt) ) ); |
| 236 | + $wgOut->setSubtitle( wfMsgHtml( 'contribsub', contributionsSub( $nt ) ) ); |
216 | 237 | } |
217 | 238 | |
218 | | - $id = User::idFromName($nt->getText()); |
219 | | - wfRunHooks('SpecialContributionsBeforeMainOutput', $id ); |
| 239 | + $id = User::idFromName( $nt->getText() ); |
| 240 | + wfRunHooks( 'SpecialContributionsBeforeMainOutput', $id ); |
220 | 241 | |
221 | | - $wgOut->addHTML(contributionsForm($options)); |
| 242 | + $wgOut->addHTML( contributionsForm( $options) ); |
222 | 243 | |
223 | 244 | $contribs = $finder->find(); |
224 | 245 | |
225 | | - if (count($contribs) == 0) { |
| 246 | + if ( count( $contribs ) == 0) { |
226 | 247 | $wgOut->addWikiText( wfMsg( 'nocontribs' ) ); |
227 | 248 | return; |
228 | 249 | } |
229 | 250 | |
230 | | - list($early, $late) = $finder->get_edit_limits(); |
231 | | - $lastts = count($contribs) ? $contribs[count($contribs) - 1]->rev_timestamp : 0; |
232 | | - $atstart = (!count($contribs) || $late == $contribs[0]->rev_timestamp); |
233 | | - $atend = (!count($contribs) || $early == $lastts); |
| 251 | + list( $early, $late ) = $finder->getEditLimits(); |
| 252 | + $lastts = count( $contribs ) ? $contribs[count( $contribs ) - 1]->rev_timestamp : 0; |
| 253 | + $atstart = ( !count( $contribs ) || $late == $contribs[0]->rev_timestamp ); |
| 254 | + $atend = ( !count( $contribs ) || $early == $lastts ); |
234 | 255 | |
235 | 256 | // These four are defaults |
236 | | - $newestlink = wfMsgHtml('sp-contributions-newest'); |
237 | | - $oldestlink = wfMsgHtml('sp-contributions-oldest'); |
238 | | - $newerlink = wfMsgHtml('sp-contributions-newer', $options['limit']); |
239 | | - $olderlink = wfMsgHtml('sp-contributions-older', $options['limit']); |
| 257 | + $newestlink = wfMsgHtml( 'sp-contributions-newest' ); |
| 258 | + $oldestlink = wfMsgHtml( 'sp-contributions-oldest' ); |
| 259 | + $newerlink = wfMsgHtml( 'sp-contributions-newer', $options['limit'] ); |
| 260 | + $olderlink = wfMsgHtml( 'sp-contributions-older', $options['limit'] ); |
240 | 261 | |
241 | | - if (!$atstart) { |
242 | | - $stuff = $title->escapeLocalURL(wfArrayToCGI(array('offset' => ''), $options)); |
| 262 | + if ( !$atstart ) { |
| 263 | + $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'offset' => '' ), $options ) ); |
243 | 264 | $newestlink = "<a href=\"$stuff\">$newestlink</a>"; |
244 | | - $stuff = $title->escapeLocalURL(wfArrayToCGI(array('go' => 'prev'), $options)); |
| 265 | + $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'go' => 'prev' ), $options ) ); |
245 | 266 | $newerlink = "<a href=\"$stuff\">$newerlink</a>"; |
246 | 267 | } |
247 | 268 | |
248 | | - if (!$atend) { |
249 | | - $stuff = $title->escapeLocalURL(wfArrayToCGI(array('go' => 'first'), $options)); |
| 269 | + if ( !$atend ) { |
| 270 | + $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'go' => 'first' ), $options ) ); |
250 | 271 | $oldestlink = "<a href=\"$stuff\">$oldestlink</a>"; |
251 | | - $stuff = $title->escapeLocalURL(wfArrayToCGI(array('offset' => $lastts), $options)); |
| 272 | + $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'offset' => $lastts ), $options ) ); |
252 | 273 | $olderlink = "<a href=\"$stuff\">$olderlink</a>"; |
253 | 274 | } |
254 | 275 | |
255 | | - if ($target == 'newbies') { |
| 276 | + if ( $target == 'newbies' ) { |
256 | 277 | $firstlast ="($newestlink)"; |
257 | 278 | } else { |
258 | 279 | $firstlast = "($newestlink | $oldestlink)"; |
259 | 280 | } |
260 | 281 | |
261 | 282 | $urls = array(); |
262 | | - foreach (array(20, 50, 100, 250, 500) as $num) { |
263 | | - $stuff = $title->escapeLocalURL(wfArrayToCGI(array('limit' => $num), $options)); |
264 | | - $urls[] = "<a href=\"$stuff\">".$wgLang->formatNum($num)."</a>"; |
| 283 | + foreach ( array( 20, 50, 100, 250, 500 ) as $num ) { |
| 284 | + $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'limit' => $num ), $options ) ); |
| 285 | + $urls[] = "<a href=\"$stuff\">".$wgLang->formatNum( $num )."</a>"; |
265 | 286 | } |
266 | | - $bits = implode($urls, ' | '); |
| 287 | + $bits = implode( $urls, ' | ' ); |
267 | 288 | |
268 | | - $prevnextbits = $firstlast .' '. wfMsgHtml('viewprevnext', $newerlink, $olderlink, $bits); |
| 289 | + $prevnextbits = $firstlast .' '. wfMsgHtml( 'viewprevnext', $newerlink, $olderlink, $bits ); |
269 | 290 | |
270 | | - $wgOut->addHTML( "<p>{$prevnextbits}</p>\n"); |
| 291 | + $wgOut->addHTML( "<p>{$prevnextbits}</p>\n" ); |
271 | 292 | |
272 | 293 | $wgOut->addHTML( "<ul>\n" ); |
273 | 294 | |
274 | 295 | $sk = $wgUser->getSkin(); |
275 | | - foreach ($contribs as $contrib) |
276 | | - $wgOut->addHTML(ucListEdit($sk, $contrib)); |
| 296 | + foreach ( $contribs as $contrib ) |
| 297 | + $wgOut->addHTML( ucListEdit( $sk, $contrib ) ); |
277 | 298 | |
278 | 299 | $wgOut->addHTML( "</ul>\n" ); |
279 | | - $wgOut->addHTML( "<p>{$prevnextbits}</p>\n"); |
| 300 | + $wgOut->addHTML( "<p>{$prevnextbits}</p>\n" ); |
280 | 301 | } |
281 | 302 | |
282 | 303 | /** |
— | — | @@ -286,7 +307,7 @@ |
287 | 308 | global $wgSysopUserBans, $wgLang, $wgUser; |
288 | 309 | |
289 | 310 | $sk = $wgUser->getSkin(); |
290 | | - $id = User::idFromName($nt->getText()); |
| 311 | + $id = User::idFromName( $nt->getText() ); |
291 | 312 | |
292 | 313 | if ( 0 == $id ) { |
293 | 314 | $ul = $nt->getText(); |
— | — | @@ -323,17 +344,17 @@ |
324 | 345 | $f = "<form method='get' action=\"$wgScript\">\n"; |
325 | 346 | foreach ( $options as $name => $value ) { |
326 | 347 | if( $name === 'namespace') continue; |
327 | | - $f .= "\t" . wfElement('input', array( |
| 348 | + $f .= "\t" . wfElement( 'input', array( |
328 | 349 | 'name' => $name, |
329 | 350 | 'type' => 'hidden', |
330 | | - 'value' => $value)) . "\n"; |
| 351 | + 'value' => $value ) ) . "\n"; |
331 | 352 | } |
332 | 353 | |
333 | | - $f .= '<p>' . wfMsgHtml('namespace') . ' ' . |
| 354 | + $f .= '<p>' . wfMsgHtml( 'namespace' ) . ' ' . |
334 | 355 | HTMLnamespaceselector( $options['namespace'], '' ) . |
335 | | - wfElement('input', array( |
| 356 | + wfElement( 'input', array( |
336 | 357 | 'type' => 'submit', |
337 | | - 'value' => wfMsg('allpagessubmit')) |
| 358 | + 'value' => wfMsg( 'allpagessubmit' ) ) |
338 | 359 | ) . |
339 | 360 | "</p></form>\n"; |
340 | 361 | |
— | — | @@ -381,7 +402,7 @@ |
382 | 403 | $difftext .= $messages['newarticle']; |
383 | 404 | } |
384 | 405 | |
385 | | - if( $wgUser->isAllowed('rollback') ) { |
| 406 | + if( $wgUser->isAllowed( 'rollback' ) ) { |
386 | 407 | $extraRollback = $wgRequest->getBool( 'bot' ) ? '&bot=1' : ''; |
387 | 408 | $extraRollback .= '&token=' . urlencode( |
388 | 409 | $wgUser->editToken( array( $page->getPrefixedText(), $row->rev_user_text ) ) ); |
— | — | @@ -399,7 +420,7 @@ |
400 | 421 | $histlink='('.$sk->makeKnownLinkObj( $page, $messages['hist'], 'action=history' ) . ')'; |
401 | 422 | |
402 | 423 | $comment = $sk->revComment( $rev ); |
403 | | - $d = $wgLang->timeanddate( wfTimestamp(TS_MW, $row->rev_timestamp), true ); |
| 424 | + $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true ); |
404 | 425 | |
405 | 426 | if( $rev->isDeleted( Revision::MW_REV_DELETED_TEXT ) ) { |
406 | 427 | $d = '<span class="history-deleted">' . $d . '</span>'; |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | 'BrokenRedirectsPage' => 'SpecialBrokenRedirects.php', |
152 | 152 | 'CategoriesPage' => 'SpecialCategories.php', |
153 | 153 | 'EmailConfirmation' => 'SpecialConfirmemail.php', |
154 | | - 'contribs_finder' => 'SpecialContributions.php', |
| 154 | + 'ContribsFinder' => 'SpecialContributions.php', |
155 | 155 | 'DeadendPagesPage' => 'SpecialDeadendpages.php', |
156 | 156 | 'DisambiguationsPage' => 'SpecialDisambiguations.php', |
157 | 157 | 'DoubleRedirectsPage' => 'SpecialDoubleRedirects.php', |