mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
Always use the strict equality flag when using in_array
Change-Id: Ieb7dc53cbd5b45b6064e05fe5df0401918bbb36d
This commit is contained in:
parent
9e9a38d6fc
commit
5b69b2380c
|
@ -38,14 +38,14 @@ class Hooks implements
|
|||
private function isCodeMirrorOnPage( OutputPage $out ) {
|
||||
// Disable CodeMirror when CodeEditor is active on this page
|
||||
// Depends on ext.codeEditor being added by \MediaWiki\EditPage\EditPage::showEditForm:initial
|
||||
if ( in_array( 'ext.codeEditor', $out->getModules() ) ) {
|
||||
if ( in_array( 'ext.codeEditor', $out->getModules(), true ) ) {
|
||||
return false;
|
||||
}
|
||||
// Disable CodeMirror when the WikiEditor toolbar is not enabled in preferences
|
||||
if ( !$this->userOptionsLookup->getOption( $out->getUser(), 'usebetatoolbar' ) ) {
|
||||
return false;
|
||||
}
|
||||
return in_array( $out->getActionName(), [ 'edit', 'submit' ] ) &&
|
||||
return in_array( $out->getActionName(), [ 'edit', 'submit' ], true ) &&
|
||||
// CodeMirror on textarea wikitext editors doesn't support RTL (T170001)
|
||||
!$out->getTitle()->getPageLanguage()->isRTL();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue