X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialChangeContentModel.php;h=46fa17e054d4ec815250c108b5e371b0b4f8c638;hb=31f66267ae9763dcecd44c1e749fe0e91b5a3a01;hp=87c899f4e042e022acdc23bdbc7cc7004f52fccb;hpb=587d08c5a626f8195def9f82ee83e17c85824db8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialChangeContentModel.php b/includes/specials/SpecialChangeContentModel.php index 87c899f4e0..46fa17e054 100644 --- a/includes/specials/SpecialChangeContentModel.php +++ b/includes/specials/SpecialChangeContentModel.php @@ -1,5 +1,7 @@ title->getPrefixedText() + [ $this->title->getPrefixedText() ] ); } $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', @@ -219,7 +228,10 @@ class SpecialChangeContentModel extends FormSpecialPage { $flags = $this->oldRevision ? EDIT_UPDATE : EDIT_NEW; $flags |= EDIT_INTERNAL; - if ( $user->isAllowed( 'bot' ) ) { + if ( MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $user, 'bot' ) + ) { $flags |= EDIT_FORCE_BOT; }