}
$fields['pagetitle']['readonly'] = true;
$fields += [
+ 'currentmodel' => [
+ 'type' => 'text',
+ 'name' => 'currentcontentmodel',
+ 'default' => $this->title->getContentModel(),
+ 'label-message' => 'changecontentmodel-current-label',
+ 'readonly' => true
+ ],
'model' => [
'type' => 'select',
'name' => 'model',
}
public function onSubmit( array $data ) {
- global $wgContLang;
-
if ( $data['pagetitle'] === '' ) {
// Initial form view of special page, pass
return false;
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() );