* @since 1.21
*/
protected function getContentObject( $def_content = null ) {
+ global $wgDisableAnonTalk;
+
$content = false;
$user = $this->context->getUser();
$undo
)->inContentLanguage()->text();
} else {
+ $undoMessage = ( $undorev->getUser() === 0 && $wgDisableAnonTalk ) ?
+ 'undo-summary-anon' :
+ 'undo-summary';
$undoSummary = $this->context->msg(
- 'undo-summary',
+ $undoMessage,
$undo,
$userText
)->inContentLanguage()->text();
} elseif ( !$status->isOK() ) {
# ...or the hook could be expecting us to produce an error
// FIXME this sucks, we should just use the Status object throughout
+ if ( !$status->getErrors() ) {
+ // Provide a fallback error message if none was set
+ $status->fatal( 'hookaborted' );
+ }
$this->hookError = $this->formatStatusErrors( $status );
- $status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR_EXPECTED;
return false;
}