Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -350,8 +350,9 @@ |
351 | 351 | |
352 | 352 | if( $restoreText ) { |
353 | 353 | $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_* |
355 | 355 | return false; |
| 356 | + } |
356 | 357 | } else { |
357 | 358 | $textRestored = 0; |
358 | 359 | } |
— | — | @@ -1249,7 +1250,7 @@ |
1250 | 1251 | $comment = $sk->revComment( $rev ); |
1251 | 1252 | // Revision delete links |
1252 | 1253 | $canHide = $wgUser->isAllowed( 'deleterevision' ); |
1253 | | - if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) { |
| 1254 | + if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed( 'deletedhistory' )) ) { |
1254 | 1255 | if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
1255 | 1256 | $revdlink = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops |
1256 | 1257 | } else { |
— | — | @@ -1293,8 +1294,8 @@ |
1294 | 1295 | $comment = $this->getFileComment( $file, $sk ); |
1295 | 1296 | // Add show/hide deletion links if available |
1296 | 1297 | $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 ) ) { |
1299 | 1300 | $revdlink = $sk->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops |
1300 | 1301 | } else { |
1301 | 1302 | $query = array( |
— | — | @@ -1323,7 +1324,7 @@ |
1324 | 1325 | |
1325 | 1326 | $time = htmlspecialchars( $wgLang->timeanddate( $ts, true ) ); |
1326 | 1327 | |
1327 | | - if( !$rev->userCan(Revision::DELETED_TEXT) ) { |
| 1328 | + if( !$rev->userCan( Revision::DELETED_TEXT ) ) { |
1328 | 1329 | return '<span class="history-deleted">' . $time . '</span>'; |
1329 | 1330 | } else { |
1330 | 1331 | $link = $sk->linkKnown( |
— | — | @@ -1351,7 +1352,7 @@ |
1352 | 1353 | function getFileLink( $file, $titleObj, $ts, $key, $sk ) { |
1353 | 1354 | global $wgLang, $wgUser; |
1354 | 1355 | |
1355 | | - if( !$file->userCan(File::DELETED_FILE) ) { |
| 1356 | + if( !$file->userCan( File::DELETED_FILE ) ) { |
1356 | 1357 | return '<span class="history-deleted">' . $wgLang->timeanddate( $ts, true ) . '</span>'; |
1357 | 1358 | } else { |
1358 | 1359 | $link = $sk->linkKnown( |
— | — | @@ -1378,12 +1379,12 @@ |
1379 | 1380 | * @return String: HTML fragment |
1380 | 1381 | */ |
1381 | 1382 | function getFileUser( $file, $sk ) { |
1382 | | - if( !$file->userCan(File::DELETED_USER) ) { |
| 1383 | + if( !$file->userCan( File::DELETED_USER ) ) { |
1383 | 1384 | return '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>'; |
1384 | 1385 | } else { |
1385 | 1386 | $link = $sk->userLink( $file->getRawUser(), $file->getRawUserText() ) . |
1386 | 1387 | $sk->userToolLinks( $file->getRawUser(), $file->getRawUserText() ); |
1387 | | - if( $file->isDeleted(File::DELETED_USER) ) |
| 1388 | + if( $file->isDeleted( File::DELETED_USER ) ) |
1388 | 1389 | $link = '<span class="history-deleted">' . $link . '</span>'; |
1389 | 1390 | return $link; |
1390 | 1391 | } |
— | — | @@ -1397,7 +1398,7 @@ |
1398 | 1399 | * @return String: HTML fragment |
1399 | 1400 | */ |
1400 | 1401 | function getFileComment( $file, $sk ) { |
1401 | | - if( !$file->userCan(File::DELETED_COMMENT) ) { |
| 1402 | + if( !$file->userCan( File::DELETED_COMMENT ) ) { |
1402 | 1403 | return '<span class="history-deleted"><span class="comment">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span></span>'; |
1403 | 1404 | } else { |
1404 | 1405 | $link = $sk->commentBlock( $file->getRawDescription() ); |