* Update title protection to be more consistent with regular protection
* Make protection log output somewhat more consistent.
This commit is contained in:
parent
3a4183931c
commit
121aad8d60
2 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue