}
}
+ protected function postText() {
+ $text = '';
+ if ( $this->title ) {
+ $contentModelLogPage = new LogPage( 'contentmodel' );
+ $text = Xml::element( 'h2', null, $contentModelLogPage->getName()->text() );
+ $out = '';
+ LogEventsList::showLogExtract( $out, 'contentmodel', $this->title );
+ $text .= $out;
+ }
+ return $text;
+ }
+
protected function getDisplayFormat() {
return 'ooui';
}
'reason' => [
'type' => 'text',
'name' => 'reason',
- 'validation-callback' => function( $reason ) {
+ 'validation-callback' => function ( $reason ) {
$match = EditPage::matchSummarySpamRegex( $reason );
if ( $match ) {
return $this->msg( 'spamprotectionmatch', $match )->parse();
}
public function onSubmit( array $data ) {
- global $wgContLang;
-
if ( $data['pagetitle'] === '' ) {
// Initial form view of special page, pass
return false;
$oldContent = $this->oldRevision->getContent();
try {
$newContent = ContentHandler::makeContent(
- $oldContent->getNativeData(), $this->title, $data['model']
+ $oldContent->serialize(), $this->title, $data['model']
);
} catch ( MWException $e ) {
return Status::newFatal(
if ( $data['reason'] !== '' ) {
$reason .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $data['reason'];
}
- # Truncate for whole multibyte characters.
- $reason = $wgContLang->truncate( $reason, 255 );
// Run edit filters
$derivativeContext = new DerivativeContext( $this->getContext() );