Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -447,15 +447,16 @@ |
448 | 448 | /** |
449 | 449 | * SQL clause to skip forbidden log types for this user |
450 | 450 | * @param $db Database |
| 451 | + * @param $audience string, public/user |
451 | 452 | * @return mixed (string or false) |
452 | 453 | */ |
453 | | - public static function getExcludeClause( $db ) { |
| 454 | + public static function getExcludeClause( $db, $audience = 'public' ) { |
454 | 455 | global $wgLogRestrictions, $wgUser; |
455 | 456 | // Reset the array, clears extra "where" clauses when $par is used |
456 | 457 | $hiddenLogs = array(); |
457 | 458 | // Don't show private logs to unprivileged users |
458 | 459 | foreach( $wgLogRestrictions as $logType => $right ) { |
459 | | - if( !$wgUser->isAllowed($right) ) { |
| 460 | + if( $audience == 'public' || !$wgUser->isAllowed($right) ) { |
460 | 461 | $safeType = $db->strencode( $logType ); |
461 | 462 | $hiddenLogs[] = $safeType; |
462 | 463 | } |
— | — | @@ -540,16 +541,17 @@ |
541 | 542 | if( isset($wgLogRestrictions[$type]) && !$wgUser->isAllowed($wgLogRestrictions[$type]) ) { |
542 | 543 | $type = ''; |
543 | 544 | } |
544 | | - // Don't show private logs to unpriviledged users |
545 | | - $hideLogs = LogEventsList::getExcludeClause( $this->mDb ); |
| 545 | + // Don't show private logs to unpriviledged users. |
| 546 | + // Also, only show them upon specific request to avoid suprises. |
| 547 | + $audience = $type ? 'user' : 'public'; |
| 548 | + $hideLogs = LogEventsList::getExcludeClause( $this->mDb, $audience ); |
546 | 549 | if( $hideLogs !== false ) { |
547 | 550 | $this->mConds[] = $hideLogs; |
548 | 551 | } |
549 | | - if( !$type ) { |
550 | | - return false; |
| 552 | + if( $type ) { |
| 553 | + $this->type = $type; |
| 554 | + $this->mConds['log_type'] = $type; |
551 | 555 | } |
552 | | - $this->type = $type; |
553 | | - $this->mConds['log_type'] = $type; |
554 | 556 | } |
555 | 557 | |
556 | 558 | /** |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1346,7 +1346,8 @@ |
1347 | 1347 | # Suppression log |
1348 | 1348 | 'suppressionlog' => 'Suppression log', |
1349 | 1349 | 'suppressionlogtext' => 'Below is a list of deletions and blocks involving content hidden from administrators. |
1350 | | -See the [[Special:IPBlockList|IP block list]] for the list of currently operational bans and blocks.', |
| 1350 | +See the [[Special:IPBlockList|IP block list]] for the list of currently operational bans and blocks. |
| 1351 | +Releasing this information can result in \'\'permanent\'\' loss of Suppression privileges. ', |
1351 | 1352 | |
1352 | 1353 | # History merging |
1353 | 1354 | 'mergehistory' => 'Merge page histories', |
— | — | @@ -2202,7 +2203,7 @@ |
2203 | 2204 | 'specialloguserlabel' => 'User:', |
2204 | 2205 | 'speciallogtitlelabel' => 'Title:', |
2205 | 2206 | 'log' => 'Logs', |
2206 | | -'all-logs-page' => 'All logs', |
| 2207 | +'all-logs-page' => 'All public logs', |
2207 | 2208 | 'alllogstext' => 'Combined display of all available logs of {{SITENAME}}. |
2208 | 2209 | You can narrow down the view by selecting a log type, the user name (case-sensitive), or the affected page (also case-sensitive).', |
2209 | 2210 | 'logempty' => 'No matching items in log.', |