r48931 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48930‎ | r48931 | r48932 >
Date:20:34, 27 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Don't show unclickable show/hide links for suppression log
Modified paths:
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogEventsList.php
@@ -359,16 +359,15 @@
360360 $revdel = SpecialPage::getTitleFor( 'Revisiondelete' );
361361 // If event was hidden from sysops
362362 if( !self::userCan( $row, LogPage::DELETED_RESTRICTED ) ) {
363 - $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), '('.$this->message['rev-delundel'].')' );
 363+ $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ),
 364+ '('.$this->message['rev-delundel'].')' );
364365 } else if( $row->log_type == 'suppress' ) {
365 - // No one should be hiding from the oversight log
366 - $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), '('.$this->message['rev-delundel'].')' );
 366+ $del = ''; // No one should be hiding from the oversight log
367367 } else {
368368 $target = SpecialPage::getTitleFor( 'Log', $row->log_type );
369 - $query = array( 'target' => $target->getPrefixedDBkey(),
370 - 'logid' => $row->log_id
371 - );
372 - $del = $this->skin->revDeleteLink( $query, self::isDeleted( $row, LogPage::DELETED_RESTRICTED ) );
 369+ $query = array( 'target' => $target->getPrefixedDBkey(), 'logid' => $row->log_id );
 370+ $del = $this->skin->revDeleteLink( $query,
 371+ self::isDeleted( $row, LogPage::DELETED_RESTRICTED ) );
373372 }
374373 return $del;
375374 }
@@ -381,7 +380,8 @@
382381 * @return bool
383382 */
384383 public static function typeAction( $row, $type, $action, $right='' ) {
385 - $match = is_array($type) ? in_array($row->log_type,$type) : $row->log_type == $type;
 384+ $match = is_array($type) ?
 385+ in_array($row->log_type,$type) : $row->log_type == $type;
386386 if( $match ) {
387387 $match = is_array($action) ?
388388 in_array($row->log_action,$action) : $row->log_action == $action;

Status & tagging log