r84130 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84129‎ | r84130 | r84131 >
Date:22:42, 16 March 2011
Author:platonides
Status:ok
Tags:
Comment:
Add a couple of braces and spacing
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -350,8 +350,9 @@
351351
352352 if( $restoreText ) {
353353 $textRestored = $this->undeleteRevisions( $timestamps, $unsuppress, $comment );
354 - if($textRestored === false) // It must be one of UNDELETE_*
 354+ if( $textRestored === false ) { // It must be one of UNDELETE_*
355355 return false;
 356+ }
356357 } else {
357358 $textRestored = 0;
358359 }
@@ -1249,7 +1250,7 @@
12501251 $comment = $sk->revComment( $rev );
12511252 // Revision delete links
12521253 $canHide = $wgUser->isAllowed( 'deleterevision' );
1253 - if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
 1254+ if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed( 'deletedhistory' )) ) {
12541255 if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
12551256 $revdlink = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
12561257 } else {
@@ -1293,8 +1294,8 @@
12941295 $comment = $this->getFileComment( $file, $sk );
12951296 // Add show/hide deletion links if available
12961297 $canHide = $wgUser->isAllowed( 'deleterevision' );
1297 - if( $canHide || ($file->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
1298 - if( !$file->userCan(File::DELETED_RESTRICTED ) ) {
 1298+ if( $canHide || ( $file->getVisibility() && $wgUser->isAllowed( 'deletedhistory' ) ) ) {
 1299+ if( !$file->userCan( File::DELETED_RESTRICTED ) ) {
12991300 $revdlink = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
13001301 } else {
13011302 $query = array(
@@ -1323,7 +1324,7 @@
13241325
13251326 $time = htmlspecialchars( $wgLang->timeanddate( $ts, true ) );
13261327
1327 - if( !$rev->userCan(Revision::DELETED_TEXT) ) {
 1328+ if( !$rev->userCan( Revision::DELETED_TEXT ) ) {
13281329 return '<span class="history-deleted">' . $time . '</span>';
13291330 } else {
13301331 $link = $sk->linkKnown(
@@ -1351,7 +1352,7 @@
13521353 function getFileLink( $file, $titleObj, $ts, $key, $sk ) {
13531354 global $wgLang, $wgUser;
13541355
1355 - if( !$file->userCan(File::DELETED_FILE) ) {
 1356+ if( !$file->userCan( File::DELETED_FILE ) ) {
13561357 return '<span class="history-deleted">' . $wgLang->timeanddate( $ts, true ) . '</span>';
13571358 } else {
13581359 $link = $sk->linkKnown(
@@ -1378,12 +1379,12 @@
13791380 * @return String: HTML fragment
13801381 */
13811382 function getFileUser( $file, $sk ) {
1382 - if( !$file->userCan(File::DELETED_USER) ) {
 1383+ if( !$file->userCan( File::DELETED_USER ) ) {
13831384 return '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
13841385 } else {
13851386 $link = $sk->userLink( $file->getRawUser(), $file->getRawUserText() ) .
13861387 $sk->userToolLinks( $file->getRawUser(), $file->getRawUserText() );
1387 - if( $file->isDeleted(File::DELETED_USER) )
 1388+ if( $file->isDeleted( File::DELETED_USER ) )
13881389 $link = '<span class="history-deleted">' . $link . '</span>';
13891390 return $link;
13901391 }
@@ -1397,7 +1398,7 @@
13981399 * @return String: HTML fragment
13991400 */
14001401 function getFileComment( $file, $sk ) {
1401 - if( !$file->userCan(File::DELETED_COMMENT) ) {
 1402+ if( !$file->userCan( File::DELETED_COMMENT ) ) {
14021403 return '<span class="history-deleted"><span class="comment">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span></span>';
14031404 } else {
14041405 $link = $sk->commentBlock( $file->getRawDescription() );

Status & tagging log