Index: trunk/phase3/includes/Namespace.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | * @return true |
38 | 38 | */ |
39 | 39 | private static function isMethodValidFor( $index, $method ) { |
40 | | - if( $index < NS_MAIN ) { |
| 40 | + if ( $index < NS_MAIN ) { |
41 | 41 | throw new MWException( "$method does not make any sense for given namespace $index" ); |
42 | 42 | } |
43 | 43 | return true; |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | */ |
52 | 52 | public static function isMovable( $index ) { |
53 | 53 | global $wgAllowImageMoving; |
54 | | - return !( $index < NS_MAIN || ($index == NS_FILE && !$wgAllowImageMoving) || $index == NS_CATEGORY ); |
| 54 | + return !( $index < NS_MAIN || ( $index == NS_FILE && !$wgAllowImageMoving ) || $index == NS_CATEGORY ); |
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | */ |
108 | 108 | public static function getSubject( $index ) { |
109 | 109 | # Handle special namespaces |
110 | | - if( $index < NS_MAIN ) { |
| 110 | + if ( $index < NS_MAIN ) { |
111 | 111 | return $index; |
112 | 112 | } |
113 | 113 | |
— | — | @@ -126,9 +126,9 @@ |
127 | 127 | public static function getAssociated( $index ) { |
128 | 128 | self::isMethodValidFor( $index, __METHOD__ ); |
129 | 129 | |
130 | | - if( self::isSubject( $index ) ) { |
| 130 | + if ( self::isSubject( $index ) ) { |
131 | 131 | return self::getTalk( $index ); |
132 | | - } elseif( self::isTalk( $index ) ) { |
| 132 | + } elseif ( self::isTalk( $index ) ) { |
133 | 133 | return self::getSubject( $index ); |
134 | 134 | } else { |
135 | 135 | return null; |
— | — | @@ -209,7 +209,7 @@ |
210 | 210 | */ |
211 | 211 | public static function getCanonicalName( $index ) { |
212 | 212 | $nslist = self::getCanonicalNamespaces(); |
213 | | - if( isset( $nslist[$index] ) ) { |
| 213 | + if ( isset( $nslist[$index] ) ) { |
214 | 214 | return $nslist[$index]; |
215 | 215 | } else { |
216 | 216 | return false; |
— | — | @@ -228,7 +228,7 @@ |
229 | 229 | if ( $xNamespaces === false ) { |
230 | 230 | $xNamespaces = array(); |
231 | 231 | foreach ( self::getCanonicalNamespaces() as $i => $text ) { |
232 | | - $xNamespaces[strtolower($text)] = $i; |
| 232 | + $xNamespaces[strtolower( $text )] = $i; |
233 | 233 | } |
234 | 234 | } |
235 | 235 | if ( array_key_exists( $name, $xNamespaces ) ) { |
— | — | @@ -306,7 +306,7 @@ |
307 | 307 | */ |
308 | 308 | public static function getContentNamespaces() { |
309 | 309 | global $wgContentNamespaces; |
310 | | - if( !is_array( $wgContentNamespaces ) || $wgContentNamespaces === array() ) { |
| 310 | + if ( !is_array( $wgContentNamespaces ) || $wgContentNamespaces === array() ) { |
311 | 311 | return NS_MAIN; |
312 | 312 | } elseif ( !in_array( NS_MAIN, $wgContentNamespaces ) ) { |
313 | 313 | // always force NS_MAIN to be part of array (to match the algorithm used by isContent) |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -44,17 +44,17 @@ |
45 | 45 | $this->opts = array(); |
46 | 46 | $request = $this->getRequest(); |
47 | 47 | |
48 | | - if( $par == 'newbies' ) { |
| 48 | + if ( $par == 'newbies' ) { |
49 | 49 | $target = 'newbies'; |
50 | 50 | $this->opts['contribs'] = 'newbie'; |
51 | | - } elseif( $par !== null ) { |
| 51 | + } elseif ( $par !== null ) { |
52 | 52 | $target = $par; |
53 | 53 | } else { |
54 | 54 | $target = $request->getVal( 'target' ); |
55 | 55 | } |
56 | 56 | |
57 | 57 | // check for radiobox |
58 | | - if( $request->getVal( 'contribs' ) == 'newbie' ) { |
| 58 | + if ( $request->getVal( 'contribs' ) == 'newbie' ) { |
59 | 59 | $target = 'newbies'; |
60 | 60 | $this->opts['contribs'] = 'newbie'; |
61 | 61 | } else { |
— | — | @@ -63,36 +63,36 @@ |
64 | 64 | |
65 | 65 | $this->opts['deletedOnly'] = $request->getBool( 'deletedOnly' ); |
66 | 66 | |
67 | | - if( !strlen( $target ) ) { |
| 67 | + if ( !strlen( $target ) ) { |
68 | 68 | $out->addHTML( $this->getForm() ); |
69 | 69 | return; |
70 | 70 | } |
71 | 71 | |
72 | 72 | $user = $this->getUser(); |
73 | 73 | |
74 | | - $this->opts['limit'] = $request->getInt( 'limit', $user->getOption('rclimit') ); |
| 74 | + $this->opts['limit'] = $request->getInt( 'limit', $user->getOption( 'rclimit' ) ); |
75 | 75 | $this->opts['target'] = $target; |
76 | 76 | $this->opts['topOnly'] = $request->getBool( 'topOnly' ); |
77 | 77 | |
78 | 78 | $userObj = User::newFromName( $target, false ); |
79 | | - if( !$userObj ) { |
| 79 | + if ( !$userObj ) { |
80 | 80 | $out->addHTML( $this->getForm() ); |
81 | 81 | return; |
82 | 82 | } |
83 | 83 | $nt = $userObj->getUserPage(); |
84 | 84 | $id = $userObj->getID(); |
85 | 85 | |
86 | | - if( $this->opts['contribs'] != 'newbie' ) { |
| 86 | + if ( $this->opts['contribs'] != 'newbie' ) { |
87 | 87 | $target = $nt->getText(); |
88 | 88 | $out->addSubtitle( $this->contributionsSub( $userObj ) ); |
89 | 89 | $out->setHTMLTitle( $this->msg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ), $target ) ) ); |
90 | 90 | $this->getSkin()->setRelevantUser( $userObj ); |
91 | 91 | } else { |
92 | | - $out->addSubtitle( $this->msg( 'sp-contributions-newbies-sub') ); |
| 92 | + $out->addSubtitle( $this->msg( 'sp-contributions-newbies-sub' ) ); |
93 | 93 | $out->setHTMLTitle( $this->msg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) ); |
94 | 94 | } |
95 | 95 | |
96 | | - if( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) { |
| 96 | + if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) { |
97 | 97 | $this->opts['namespace'] = intval( $ns ); |
98 | 98 | } else { |
99 | 99 | $this->opts['namespace'] = ''; |
— | — | @@ -106,13 +106,13 @@ |
107 | 107 | |
108 | 108 | // Allows reverts to have the bot flag in recent changes. It is just here to |
109 | 109 | // be passed in the form at the top of the page |
110 | | - if( $user->isAllowed( 'markbotedits' ) && $request->getBool( 'bot' ) ) { |
| 110 | + if ( $user->isAllowed( 'markbotedits' ) && $request->getBool( 'bot' ) ) { |
111 | 111 | $this->opts['bot'] = '1'; |
112 | 112 | } |
113 | 113 | |
114 | 114 | $skip = $request->getText( 'offset' ) || $request->getText( 'dir' ) == 'prev'; |
115 | 115 | # Offset overrides year/month selection |
116 | | - if( $skip ) { |
| 116 | + if ( $skip ) { |
117 | 117 | $this->opts['year'] = ''; |
118 | 118 | $this->opts['month'] = ''; |
119 | 119 | } else { |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | } |
123 | 123 | |
124 | 124 | $feedType = $request->getVal( 'feed' ); |
125 | | - if( $feedType ) { |
| 125 | + if ( $feedType ) { |
126 | 126 | // Maintain some level of backwards compatability |
127 | 127 | // If people request feeds using the old parameters, redirect to API |
128 | 128 | $apiParams = array( |
— | — | @@ -172,12 +172,12 @@ |
173 | 173 | 'nsInvert' => $this->opts['nsInvert'], |
174 | 174 | 'associated' => $this->opts['associated'], |
175 | 175 | ) ); |
176 | | - if( !$pager->getNumRows() ) { |
| 176 | + if ( !$pager->getNumRows() ) { |
177 | 177 | $out->addWikiMsg( 'nocontribs', $target ); |
178 | 178 | } else { |
179 | 179 | # Show a message about slave lag, if applicable |
180 | 180 | $lag = wfGetLB()->safeGetLag( $pager->getDatabase() ); |
181 | | - if( $lag > 0 ) |
| 181 | + if ( $lag > 0 ) |
182 | 182 | $out->showLagWarning( $lag ); |
183 | 183 | |
184 | 184 | $out->addHTML( |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | $out->preventClickjacking( $pager->getPreventClickjacking() ); |
191 | 191 | |
192 | 192 | # Show the appropriate "footer" message - WHOIS tools, etc. |
193 | | - if( $this->opts['contribs'] != 'newbie' ) { |
| 193 | + if ( $this->opts['contribs'] != 'newbie' ) { |
194 | 194 | $message = 'sp-contributions-footer'; |
195 | 195 | if ( IP::isIPAddress( $target ) ) { |
196 | 196 | $message = 'sp-contributions-footer-anon'; |
— | — | @@ -200,7 +200,7 @@ |
201 | 201 | } |
202 | 202 | } |
203 | 203 | |
204 | | - if( !wfMessage( $message, $target )->isDisabled() ) { |
| 204 | + if ( !wfMessage( $message, $target )->isDisabled() ) { |
205 | 205 | $out->wrapWikiMsg( |
206 | 206 | "<div class='mw-contributions-footer'>\n$1\n</div>", |
207 | 207 | array( $message, $target ) ); |
— | — | @@ -223,7 +223,7 @@ |
224 | 224 | } |
225 | 225 | $nt = $userObj->getUserPage(); |
226 | 226 | $talk = $userObj->getTalkPage(); |
227 | | - if( $talk ) { |
| 227 | + if ( $talk ) { |
228 | 228 | $tools = self::getUserLinks( $nt, $talk, $userObj, $this->getUser() ); |
229 | 229 | $links = $this->getLanguage()->pipeList( $tools ); |
230 | 230 | |
— | — | @@ -276,8 +276,8 @@ |
277 | 277 | |
278 | 278 | $tools[] = Linker::link( $talkpage, wfMsgHtml( 'sp-contributions-talk' ) ); |
279 | 279 | |
280 | | - if( ( $id !== null ) || ( $id === null && IP::isIPAddress( $username ) ) ) { |
281 | | - if( $subject->isAllowed( 'block' ) ) { # Block / Change block / Unblock links |
| 280 | + if ( ( $id !== null ) || ( $id === null && IP::isIPAddress( $username ) ) ) { |
| 281 | + if ( $subject->isAllowed( 'block' ) ) { # Block / Change block / Unblock links |
282 | 282 | if ( $target->isBlocked() ) { |
283 | 283 | $tools[] = Linker::linkKnown( # Change block link |
284 | 284 | SpecialPage::getTitleFor( 'Block', $username ), |
— | — | @@ -317,7 +317,7 @@ |
318 | 318 | ); |
319 | 319 | |
320 | 320 | # Add link to deleted user contributions for priviledged users |
321 | | - if( $subject->isAllowed( 'deletedhistory' ) ) { |
| 321 | + if ( $subject->isAllowed( 'deletedhistory' ) ) { |
322 | 322 | $tools[] = Linker::linkKnown( |
323 | 323 | SpecialPage::getTitleFor( 'DeletedContributions', $username ), |
324 | 324 | wfMsgHtml( 'sp-contributions-deleted' ) |
— | — | @@ -327,7 +327,7 @@ |
328 | 328 | # Add a link to change user rights for privileged users |
329 | 329 | $userrightsPage = new UserrightsPage(); |
330 | 330 | $userrightsPage->getContext()->setUser( $subject ); |
331 | | - if( $id !== null && $userrightsPage->userCanChangeRights( $target ) ) { |
| 331 | + if ( $id !== null && $userrightsPage->userCanChangeRights( $target ) ) { |
332 | 332 | $tools[] = Linker::linkKnown( |
333 | 333 | SpecialPage::getTitleFor( 'Userrights', $username ), |
334 | 334 | wfMsgHtml( 'sp-contributions-userrights' ) |
— | — | @@ -346,45 +346,45 @@ |
347 | 347 | global $wgScript; |
348 | 348 | |
349 | 349 | $this->opts['title'] = $this->getTitle()->getPrefixedText(); |
350 | | - if( !isset( $this->opts['target'] ) ) { |
| 350 | + if ( !isset( $this->opts['target'] ) ) { |
351 | 351 | $this->opts['target'] = ''; |
352 | 352 | } else { |
353 | 353 | $this->opts['target'] = str_replace( '_' , ' ' , $this->opts['target'] ); |
354 | 354 | } |
355 | 355 | |
356 | | - if( !isset( $this->opts['namespace'] ) ) { |
| 356 | + if ( !isset( $this->opts['namespace'] ) ) { |
357 | 357 | $this->opts['namespace'] = ''; |
358 | 358 | } |
359 | 359 | |
360 | | - if( !isset( $this->opts['nsInvert'] ) ) { |
| 360 | + if ( !isset( $this->opts['nsInvert'] ) ) { |
361 | 361 | $this->opts['nsInvert'] = ''; |
362 | 362 | } |
363 | 363 | |
364 | | - if( !isset( $this->opts['associated'] ) ) { |
| 364 | + if ( !isset( $this->opts['associated'] ) ) { |
365 | 365 | $this->opts['associated'] = false; |
366 | 366 | } |
367 | 367 | |
368 | | - if( !isset( $this->opts['contribs'] ) ) { |
| 368 | + if ( !isset( $this->opts['contribs'] ) ) { |
369 | 369 | $this->opts['contribs'] = 'user'; |
370 | 370 | } |
371 | 371 | |
372 | | - if( !isset( $this->opts['year'] ) ) { |
| 372 | + if ( !isset( $this->opts['year'] ) ) { |
373 | 373 | $this->opts['year'] = ''; |
374 | 374 | } |
375 | 375 | |
376 | | - if( !isset( $this->opts['month'] ) ) { |
| 376 | + if ( !isset( $this->opts['month'] ) ) { |
377 | 377 | $this->opts['month'] = ''; |
378 | 378 | } |
379 | 379 | |
380 | | - if( $this->opts['contribs'] == 'newbie' ) { |
| 380 | + if ( $this->opts['contribs'] == 'newbie' ) { |
381 | 381 | $this->opts['target'] = ''; |
382 | 382 | } |
383 | 383 | |
384 | | - if( !isset( $this->opts['tagfilter'] ) ) { |
| 384 | + if ( !isset( $this->opts['tagfilter'] ) ) { |
385 | 385 | $this->opts['tagfilter'] = ''; |
386 | 386 | } |
387 | 387 | |
388 | | - if( !isset( $this->opts['topOnly'] ) ) { |
| 388 | + if ( !isset( $this->opts['topOnly'] ) ) { |
389 | 389 | $this->opts['topOnly'] = false; |
390 | 390 | } |
391 | 391 | |
— | — | @@ -393,7 +393,7 @@ |
394 | 394 | # Add hidden params for tracking except for parameters in $skipParameters |
395 | 395 | $skipParameters = array( 'namespace', 'nsInvert', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly', 'associated' ); |
396 | 396 | foreach ( $this->opts as $name => $value ) { |
397 | | - if( in_array( $name, $skipParameters ) ) { |
| 397 | + if ( in_array( $name, $skipParameters ) ) { |
398 | 398 | continue; |
399 | 399 | } |
400 | 400 | $form .= "\t" . Html::hidden( $name, $value ) . "\n"; |
— | — | @@ -401,7 +401,7 @@ |
402 | 402 | |
403 | 403 | $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] ); |
404 | 404 | |
405 | | - if ($tagFilter) { |
| 405 | + if ( $tagFilter ) { |
406 | 406 | $filterSelection = |
407 | 407 | Xml::tags( 'td', array( 'class' => 'mw-label' ), array_shift( $tagFilter ) ) . |
408 | 408 | Xml::tags( 'td', array( 'class' => 'mw-input' ), implode( ' ', $tagFilter ) ); |
— | — | @@ -448,7 +448,7 @@ |
449 | 449 | Xml::namespaceSelector( $this->opts['namespace'], '' ) . ' ' . |
450 | 450 | Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), |
451 | 451 | Xml::checkLabel( |
452 | | - wfMsg('invert'), |
| 452 | + wfMsg( 'invert' ), |
453 | 453 | 'nsInvert', |
454 | 454 | 'nsInvert', |
455 | 455 | $this->opts['nsInvert'], |
— | — | @@ -457,7 +457,7 @@ |
458 | 458 | ) . |
459 | 459 | Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), |
460 | 460 | Xml::checkLabel( |
461 | | - wfMsg('namespace_association'), |
| 461 | + wfMsg( 'namespace_association' ), |
462 | 462 | 'associated', |
463 | 463 | 'associated', |
464 | 464 | $this->opts['associated'], |
— | — | @@ -522,7 +522,7 @@ |
523 | 523 | if ( $explain->exists() ) { |
524 | 524 | $form .= "<p id='mw-sp-contributions-explain'>{$explain}</p>"; |
525 | 525 | } |
526 | | - $form .= Xml::closeElement('fieldset' ) . |
| 526 | + $form .= Xml::closeElement( 'fieldset' ) . |
527 | 527 | Xml::closeElement( 'form' ); |
528 | 528 | return $form; |
529 | 529 | } |
— | — | @@ -543,7 +543,7 @@ |
544 | 544 | |
545 | 545 | $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' ); |
546 | 546 | |
547 | | - foreach( $msgs as $msg ) { |
| 547 | + foreach ( $msgs as $msg ) { |
548 | 548 | $this->messages[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) ); |
549 | 549 | } |
550 | 550 | |
— | — | @@ -577,10 +577,10 @@ |
578 | 578 | $conds = array_merge( $userCond, $this->getNamespaceCond() ); |
579 | 579 | |
580 | 580 | // Paranoia: avoid brute force searches (bug 17342) |
581 | | - if( !$user->isAllowed( 'deletedhistory' ) ) { |
582 | | - $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::DELETED_USER) . ' = 0'; |
583 | | - } elseif( !$user->isAllowed( 'suppressrevision' ) ) { |
584 | | - $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::SUPPRESSED_USER) . |
| 581 | + if ( !$user->isAllowed( 'deletedhistory' ) ) { |
| 582 | + $conds[] = $this->mDb->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0'; |
| 583 | + } elseif ( !$user->isAllowed( 'suppressrevision' ) ) { |
| 584 | + $conds[] = $this->mDb->bitAnd( 'rev_deleted', Revision::SUPPRESSED_USER ) . |
585 | 585 | ' != ' . Revision::SUPPRESSED_USER; |
586 | 586 | } |
587 | 587 | |
— | — | @@ -619,10 +619,10 @@ |
620 | 620 | $condition = array(); |
621 | 621 | $join_conds = array(); |
622 | 622 | $tables = array( 'revision', 'page', 'user' ); |
623 | | - if( $this->contribs == 'newbie' ) { |
| 623 | + if ( $this->contribs == 'newbie' ) { |
624 | 624 | $tables[] = 'user_groups'; |
625 | 625 | $max = $this->mDb->selectField( 'user', 'max(user_id)', false, __METHOD__ ); |
626 | | - $condition[] = 'rev_user >' . (int)($max - $max / 100); |
| 626 | + $condition[] = 'rev_user >' . (int)( $max - $max / 100 ); |
627 | 627 | $condition[] = 'ug_group IS NULL'; |
628 | 628 | $index = 'user_timestamp'; |
629 | 629 | # @todo FIXME: Other groups may have 'bot' rights |
— | — | @@ -636,22 +636,22 @@ |
637 | 637 | $index = 'user_timestamp'; |
638 | 638 | } |
639 | 639 | } |
640 | | - if( $this->deletedOnly ) { |
| 640 | + if ( $this->deletedOnly ) { |
641 | 641 | $condition[] = "rev_deleted != '0'"; |
642 | 642 | } |
643 | | - if( $this->topOnly ) { |
| 643 | + if ( $this->topOnly ) { |
644 | 644 | $condition[] = "rev_id = page_latest"; |
645 | 645 | } |
646 | 646 | return array( $tables, $index, $condition, $join_conds ); |
647 | 647 | } |
648 | 648 | |
649 | 649 | function getNamespaceCond() { |
650 | | - if( $this->namespace !== '' ) { |
| 650 | + if ( $this->namespace !== '' ) { |
651 | 651 | $selectedNS = $this->mDb->addQuotes( $this->namespace ); |
652 | 652 | $eq_op = $this->nsInvert ? '!=' : '='; |
653 | 653 | $bool_op = $this->nsInvert ? 'AND' : 'OR'; |
654 | 654 | |
655 | | - if( !$this->associated ) { |
| 655 | + if ( !$this->associated ) { |
656 | 656 | return array( "page_namespace $eq_op $selectedNS" ); |
657 | 657 | } else { |
658 | 658 | $associatedNS = $this->mDb->addQuotes ( |
— | — | @@ -709,7 +709,7 @@ |
710 | 710 | array( 'rev_id', 'rev_len' ), |
711 | 711 | array( 'rev_id' => $revIds ), |
712 | 712 | __METHOD__ ); |
713 | | - foreach( $res as $row ) { |
| 713 | + foreach ( $res as $row ) { |
714 | 714 | $revLens[$row->rev_id] = $row->rev_len; |
715 | 715 | } |
716 | 716 | wfProfileOut( __METHOD__ ); |
— | — | @@ -749,19 +749,19 @@ |
750 | 750 | ); |
751 | 751 | # Mark current revisions |
752 | 752 | $topmarktext = ''; |
753 | | - if( $row->rev_id == $row->page_latest ) { |
| 753 | + if ( $row->rev_id == $row->page_latest ) { |
754 | 754 | $topmarktext .= '<span class="mw-uctop">' . $this->messages['uctop'] . '</span>'; |
755 | 755 | # Add rollback link |
756 | | - if( !$row->page_is_new && $page->quickUserCan( 'rollback' ) |
| 756 | + if ( !$row->page_is_new && $page->quickUserCan( 'rollback' ) |
757 | 757 | && $page->quickUserCan( 'edit' ) ) |
758 | 758 | { |
759 | 759 | $this->preventClickjacking(); |
760 | | - $topmarktext .= ' '.Linker::generateRollback( $rev ); |
| 760 | + $topmarktext .= ' ' . Linker::generateRollback( $rev ); |
761 | 761 | } |
762 | 762 | } |
763 | 763 | $user = $this->getUser(); |
764 | 764 | # Is there a visible previous revision? |
765 | | - if( $rev->userCan( Revision::DELETED_TEXT, $user ) && $rev->getParentId() !== 0 ) { |
| 765 | + if ( $rev->userCan( Revision::DELETED_TEXT, $user ) && $rev->getParentId() !== 0 ) { |
766 | 766 | $difftext = Linker::linkKnown( |
767 | 767 | $page, |
768 | 768 | $this->messages['diff'], |
— | — | @@ -790,23 +790,23 @@ |
791 | 791 | |
792 | 792 | $comment = $this->getLanguage()->getDirMark() . Linker::revComment( $rev, false, true ); |
793 | 793 | $date = $this->getLanguage()->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true ); |
794 | | - if( $rev->userCan( Revision::DELETED_TEXT, $user ) ) { |
| 794 | + if ( $rev->userCan( Revision::DELETED_TEXT, $user ) ) { |
795 | 795 | $d = Linker::linkKnown( |
796 | 796 | $page, |
797 | | - htmlspecialchars($date), |
| 797 | + htmlspecialchars( $date ), |
798 | 798 | array(), |
799 | 799 | array( 'oldid' => intval( $row->rev_id ) ) |
800 | 800 | ); |
801 | 801 | } else { |
802 | 802 | $d = htmlspecialchars( $date ); |
803 | 803 | } |
804 | | - if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { |
| 804 | + if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) { |
805 | 805 | $d = '<span class="history-deleted">' . $d . '</span>'; |
806 | 806 | } |
807 | 807 | |
808 | 808 | # Show user names for /newbies as there may be different users. |
809 | 809 | # Note that we already excluded rows with hidden user names. |
810 | | - if( $this->contribs == 'newbie' ) { |
| 810 | + if ( $this->contribs == 'newbie' ) { |
811 | 811 | $userlink = ' . . ' . Linker::userLink( $rev->getUser(), $rev->getUserText() ); |
812 | 812 | $userlink .= ' ' . wfMsg( 'parentheses', |
813 | 813 | Linker::userTalkLink( $rev->getUser(), $rev->getUserText() ) ) . ' '; |
— | — | @@ -814,13 +814,13 @@ |
815 | 815 | $userlink = ''; |
816 | 816 | } |
817 | 817 | |
818 | | - if( $rev->getParentId() === 0 ) { |
| 818 | + if ( $rev->getParentId() === 0 ) { |
819 | 819 | $nflag = ChangesList::flag( 'newpage' ); |
820 | 820 | } else { |
821 | 821 | $nflag = ''; |
822 | 822 | } |
823 | 823 | |
824 | | - if( $rev->isMinor() ) { |
| 824 | + if ( $rev->isMinor() ) { |
825 | 825 | $mflag = ChangesList::flag( 'minor' ); |
826 | 826 | } else { |
827 | 827 | $mflag = ''; |
— | — | @@ -828,8 +828,8 @@ |
829 | 829 | |
830 | 830 | // Don't show useless link to people who cannot hide revisions |
831 | 831 | $canHide = $user->isAllowed( 'deleterevision' ); |
832 | | - if( $canHide || ($rev->getVisibility() && $user->isAllowed('deletedhistory')) ) { |
833 | | - if( !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) { |
| 832 | + if ( $canHide || ( $rev->getVisibility() && $user->isAllowed( 'deletedhistory' ) ) ) { |
| 833 | + if ( !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) { |
834 | 834 | $del = Linker::revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops |
835 | 835 | } else { |
836 | 836 | $query = array( |
— | — | @@ -849,12 +849,12 @@ |
850 | 850 | $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}"; |
851 | 851 | |
852 | 852 | # Denote if username is redacted for this edit |
853 | | - if( $rev->isDeleted( Revision::DELETED_USER ) ) { |
854 | | - $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>"; |
| 853 | + if ( $rev->isDeleted( Revision::DELETED_USER ) ) { |
| 854 | + $ret .= " <strong>" . wfMsgHtml( 'rev-deleted-user-contribs' ) . "</strong>"; |
855 | 855 | } |
856 | 856 | |
857 | 857 | # Tags, if any. |
858 | | - list($tagSummary, $newClasses) = ChangeTags::formatSummaryRow( $row->ts_tags, 'contributions' ); |
| 858 | + list( $tagSummary, $newClasses ) = ChangeTags::formatSummaryRow( $row->ts_tags, 'contributions' ); |
859 | 859 | $classes = array_merge( $classes, $newClasses ); |
860 | 860 | $ret .= " $tagSummary"; |
861 | 861 | |