public function doPurge() {
global $wgUseSquid;
- if( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ){
+ if( !wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
return false;
}
public function prepareTextForEdit( $text, $revid = null, User $user = null ) {
ContentHandler::deprecated( __METHOD__, '1.21' );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
- return $this->prepareContentForEdit( $content, $revid , $user );
+ return $this->prepareContentForEdit( $content, $revid, $user );
}
/**
ContentHandler::deprecated( __METHOD__, "1.21" );
$content = ContentHandler::makeContent( $text, $this->getTitle() );
- return $this->doQuickEditContent( $content, $user, $comment , $minor );
+ return $this->doQuickEditContent( $content, $user, $comment, $minor );
}
/**
$encodedExpiry = array();
$protectDescription = '';
+ # Some bots may parse IRC lines, which are generated from log entries which contain plain
+ # protect description text. Keep them in old format to avoid breaking compatibility.
+ # TODO: Fix protection log to store structured description and format it on-the-fly.
+ $protectDescriptionLog = '';
foreach ( $limit as $action => $restrictions ) {
$encodedExpiry[$action] = $dbw->encodeExpiry( $expiry[$action] );
if ( $restrictions != '' ) {
+ $protectDescriptionLog .= $wgContLang->getDirMark() . "[$action=$restrictions] (";
# $action is one of $wgRestrictionTypes = array( 'create', 'edit', 'move', 'upload' ).
# All possible message keys are listed here for easier grepping:
# * restriction-create
if ( $encodedExpiry[$action] != 'infinity' ) {
$expiryText = wfMessage(
'protect-expiring',
- $wgContLang->timeanddate( $expiry[$action], false, false ) ,
- $wgContLang->date( $expiry[$action], false, false ) ,
+ $wgContLang->timeanddate( $expiry[$action], false, false ),
+ $wgContLang->date( $expiry[$action], false, false ),
$wgContLang->time( $expiry[$action], false, false )
)->inContentLanguage()->text();
} else {
$protectDescription .= wfMessage( 'protect-summary-desc' )
->params( $actionText, $restrictionsText, $expiryText )
->inContentLanguage()->text();
+ $protectDescriptionLog .= $expiryText . ') ';
}
}
+ $protectDescriptionLog = trim( $protectDescriptionLog );
if ( $id ) { // Protection of existing page
if ( !wfRunHooks( 'ArticleProtect', array( &$this, &$user, $limit, $reason ) ) ) {
)->inContentLanguage()->text()
);
if ( $reason ) {
- $editComment .= ": $reason";
+ $editComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() . $reason;
}
if ( $protectDescription ) {
$editComment .= wfMessage( 'word-separator' )->inContentLanguage()->text();
if ( $logAction == 'unprotect' ) {
$logParams = array();
} else {
- $logParams = array( $protectDescription, $cascade ? 'cascade' : '' );
+ $logParams = array( $protectDescriptionLog, $cascade ? 'cascade' : '' );
}
// Update the protection log
return false;
}
}
-