X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=blobdiff_plain;f=includes%2FProtectionForm.php;h=3e639b92a2e8e21bf3e58bdb9e8b45801610ab13;hb=4bfbf2c225d7f45aff167613f35d7d9153abe252;hp=8b5d9956abd444bd7b0619c54247d3f17b9fcd0f;hpb=54c93f1d384cd5accd2db2ebbb911e4d627c2980;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 8b5d9956ab..3e639b92a2 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -58,6 +58,18 @@ class ProtectionForm { /** @var array Map of action to the expiry time of the existing protection */ protected $mExistingExpiry = []; + /** @var Article */ + protected $mArticle; + + /** @var Title */ + protected $mTitle; + + /** @var bool */ + protected $disabled; + + /** @var array */ + protected $disabledAttrib; + /** @var IContextSource */ private $mContext; @@ -78,7 +90,7 @@ class ProtectionForm { if ( wfReadOnly() ) { $this->mPermErrors[] = [ 'readonlytext', wfReadOnlyReason() ]; } - $this->disabled = $this->mPermErrors != []; + $this->disabled = $this->mPermErrors !== []; $this->disabledAttrib = $this->disabled ? [ 'disabled' => 'disabled' ] : []; @@ -321,7 +333,9 @@ class ProtectionForm { ); if ( !$status->isOK() ) { - $this->show( $out->parseInlineAsInterface( $status->getWikiText() ) ); + $this->show( $out->parseInlineAsInterface( + $status->getWikiText( false, false, $this->mContext->getLanguage() ) + ) ); return false; }