* Only show private logs on specific request
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 3 Mar 2009 23:47:16 +0000 (23:47 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 3 Mar 2009 23:47:16 +0000 (23:47 +0000)
* Tweak suppress log header to be more like oversight

includes/LogEventsList.php
languages/messages/MessagesEn.php

index e8d4379..c1ed5e0 100644 (file)
@@ -447,15 +447,16 @@ class LogEventsList {
        /**
         * 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;
                        }
@@ -540,16 +541,17 @@ class LogPager extends ReverseChronologicalPager {
                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;
        }
 
        /**
index 3937df8..2ecd0d1 100644 (file)
@@ -1346,7 +1346,8 @@ Please confirm that you intend to do this, that you understand the consequences,
 # 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',
@@ -2202,7 +2203,7 @@ Each row contains links to the first and second redirect, as well as the target
 '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.',