->inContentLanguage()->text();
}
- $protectDescription .= ') ';
+ if ( $protectDescription !== '' ) {
+ $protectDescription .= wfMessage( 'word-separator' )->inContentLanguage()->text();
+ }
+ $protectDescription .= wfMessage( 'protect-summary-desc' )
+ ->params( $actionText, $restrictionsText, $expiryText )
+ ->inContentLanguage()->text();
}
}
- $protectDescription = trim( $protectDescription );
- if ( $id ) { # Protection of existing page
+ if ( $id ) { // Protection of existing page
if ( !wfRunHooks( 'ArticleProtect', array( &$this, &$user, $limit, $reason ) ) ) {
return Status::newGood();
}
$editComment .= ": $reason";
}
if ( $protectDescription ) {
- $editComment .= " ($protectDescription)";
+ $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text();
+ $editComment .= wfMessage( 'parentheses' )->params( $protectDescription )->inContentLanguage()->text();
}
if ( $cascade ) {
- // FIXME: Should use 'brackets' message.
- $editComment .= ' [' . wfMessage( 'protect-summary-cascade' )
- ->inContentLanguage()->text() . ']';
+ $editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text();
+ $editComment .= wfMessage( 'brackets' )->params(
+ wfMessage( 'protect-summary-cascade' )->inContentLanguage()->text()
+ )->inContentLanguage()->text();
}
- # Insert a null revision
+ // Insert a null revision
$nullRevision = Revision::newNullRevision( $dbw, $id, $editComment, true );
$nullRevId = $nullRevision->insertOn( $dbw );