/**
* SQL clause to skip forbidden log types for this user
* @param $db Database
+ * @param $audience string, public/user
* @return mixed (string or false)
*/
- public static function getExcludeClause( $db ) {
+ public static function getExcludeClause( $db, $audience = 'public' ) {
global $wgLogRestrictions, $wgUser;
// Reset the array, clears extra "where" clauses when $par is used
$hiddenLogs = array();
// Don't show private logs to unprivileged users
foreach( $wgLogRestrictions as $logType => $right ) {
- if( !$wgUser->isAllowed($right) ) {
+ if( $audience == 'public' || !$wgUser->isAllowed($right) ) {
$safeType = $db->strencode( $logType );
$hiddenLogs[] = $safeType;
}
if( isset($wgLogRestrictions[$type]) && !$wgUser->isAllowed($wgLogRestrictions[$type]) ) {
$type = '';
}
- // Don't show private logs to unpriviledged users
- $hideLogs = LogEventsList::getExcludeClause( $this->mDb );
+ // Don't show private logs to unpriviledged users.
+ // Also, only show them upon specific request to avoid suprises.
+ $audience = $type ? 'user' : 'public';
+ $hideLogs = LogEventsList::getExcludeClause( $this->mDb, $audience );
if( $hideLogs !== false ) {
$this->mConds[] = $hideLogs;
}
- if( !$type ) {
- return false;
+ if( $type ) {
+ $this->type = $type;
+ $this->mConds['log_type'] = $type;
}
- $this->type = $type;
- $this->mConds['log_type'] = $type;
}
/**
# Suppression log
'suppressionlog' => 'Suppression log',
'suppressionlogtext' => 'Below is a list of deletions and blocks involving content hidden from administrators.
-See the [[Special:IPBlockList|IP block list]] for the list of currently operational bans and blocks.',
+See the [[Special:IPBlockList|IP block list]] for the list of currently operational bans and blocks.
+Releasing this information can result in \'\'permanent\'\' loss of Suppression privileges. ',
# History merging
'mergehistory' => 'Merge page histories',
'specialloguserlabel' => 'User:',
'speciallogtitlelabel' => 'Title:',
'log' => 'Logs',
-'all-logs-page' => 'All logs',
+'all-logs-page' => 'All public logs',
'alllogstext' => 'Combined display of all available logs of {{SITENAME}}.
You can narrow down the view by selecting a log type, the user name (case-sensitive), or the affected page (also case-sensitive).',
'logempty' => 'No matching items in log.',