Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/233665
Change subject: Use CodeEditor for HTML templates on Meta-Wiki
......................................................................
Use CodeEditor for HTML templates on Meta-Wiki
Set the CodeEditor language for the portal and API listing templates to
'html' through the 'CodeEditorGetPageLanguage' hook.
Bug: T105625
Change-Id: I2c2f363d39f4cdc2dcfc3439d44dba0c9cf5db48
---
M wmf-config/CommonSettings.php
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/65/233665/1
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 946c407..c58ffcc 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2505,6 +2505,16 @@
if ( $wmgUseCodeEditorForCore || $wmgUseScribunto || $wmgZeroPortal ) {
include_once( "$IP/extensions/CodeEditor/CodeEditor.php" );
$wgCodeEditorEnableCore = $wmgUseCodeEditorForCore;
+ if ( $wgDBname === 'metawiki' ) {
+ $wgHooks['CodeEditorGetPageLanguage'][] = function ( Title
$title, &$lang ) {
+ if ( preg_match(
+ '/(API
listing|Www\.wik(imedia|ipedia|inews|tionary|iquote|iversity|ibooks|ivoyage)\.org)
template(\/temp)?/',
+ $title->getPrefixedText()
+ ) ) {
+ $lang = 'html';
+ }
+ };
+ }
}
if ( $wmgUseScribunto ) {
--
To view, visit https://gerrit.wikimedia.org/r/233665
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c2f363d39f4cdc2dcfc3439d44dba0c9cf5db48
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits