* Update title protection to be more consistent with regular protection

* Make protection log output somewhat more consistent.
This commit is contained in:
Alex Z 2008-09-14 03:02:02 +00:00
parent 3a4183931c
commit 121aad8d60
2 changed files with 8 additions and 2 deletions

View file

@ -204,10 +204,15 @@ class LogPage {
$params[2] = isset( $params[2] ) ?
self::formatBlockFlags( $params[2], is_null( $skin ) ) : '';
} else if ( $type == 'protect' && count($params) == 3 ) {
$details .= " {$params[1]}"; // restrictions and expiries
$details .= "{$params[1]}"; // restrictions and expiries
if( $params[2] ) {
$details .= ' ['.wfMsg('protect-summary-cascade').']';
}
# If this is going to be displayed, make it somewhat consistent with page history
# and older log entries where everything is treated as a comment
if (!is_null($skin)) {
$details = $skin->commentBlock($details);
}
}
$rv = wfMsgReal( $wgLogActions[$key], $params, true, !$skin ) . $details;
}

View file

@ -1403,7 +1403,8 @@ class Title {
$log = new LogPage( 'protect' );
if( $create_perm ) {
$log->addEntry( $this->mRestrictions['create'] ? 'modify' : 'protect', $this, trim( $reason . " [create=$create_perm] $expiry_description" ) );
$params = array("[create=$create_perm] $expiry_description",'');
$log->addEntry( $this->mRestrictions['create'] ? 'modify' : 'protect', $this, trim( $reason ), $params );
} else {
$log->addEntry( 'unprotect', $this, $reason );
}