jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339390 )

Change subject: Add 'source' tag to InsertMagic
......................................................................


Add 'source' tag to InsertMagic

Needs cherry-picking to REL1_27

Change-Id: I094573c6f7ebafaa3503e89e2ff6e7f33592cf48
---
M CSyntaxHighlight/CSyntaxHighlight.class.php
M CSyntaxHighlight/extension.json
M CSyntaxHighlight/i18n/en.json
M CSyntaxHighlight/i18n/qqq.json
4 files changed, 29 insertions(+), 3 deletions(-)

Approvals:
  Robert Vogel: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CSyntaxHighlight/CSyntaxHighlight.class.php 
b/CSyntaxHighlight/CSyntaxHighlight.class.php
index c9d2195..97b2d57 100644
--- a/CSyntaxHighlight/CSyntaxHighlight.class.php
+++ b/CSyntaxHighlight/CSyntaxHighlight.class.php
@@ -155,4 +155,25 @@
                return true;
        }
 
-}
\ No newline at end of file
+       /**
+        * Hook-Handler for Hook 'BSInsertMagicAjaxGetData'
+        * @param object $oResponse
+        * @param string $sType
+        * @return boolean Always true to keep hook running
+        */
+       public function onBSInsertMagicAjaxGetData( $oResponse, $sType ) {
+               if( $sType !== "tags" ) return true;
+
+               $oDescriptor = new stdClass();
+               $oDescriptor->id = "<pre></pre>";
+               $oDescriptor->type = 'tag';
+               $oDescriptor->name = "source";
+               $oDescriptor->desc = wfMessage( 'bs-csyntaxhighlight-tag-desc' 
)->text();
+               $oDescriptor->helplink = 
'https://help.bluespice.com/index.php/CSyntaxHighlight';
+               $oDescriptor->code = "<pre brush:{lang}></pre>";
+               $oDescriptor->previewable = true;
+
+               $oResponse->result[] = $oDescriptor;
+               return true;
+       }
+}
diff --git a/CSyntaxHighlight/extension.json b/CSyntaxHighlight/extension.json
index 1758e06..34a16cd 100644
--- a/CSyntaxHighlight/extension.json
+++ b/CSyntaxHighlight/extension.json
@@ -21,5 +21,8 @@
     "AutoloadClasses": {
             "CSyntaxHighlight": "CSyntaxHighlight.class.php"
     },
+       "Hooks": {
+                       "BSInsertMagicAjaxGetData": 
"CSyntaxHighlight::onBSInsertMagicAjaxGetData"
+       },
     "manifest_version": 1
 }
diff --git a/CSyntaxHighlight/i18n/en.json b/CSyntaxHighlight/i18n/en.json
index d56a634..02accd4 100644
--- a/CSyntaxHighlight/i18n/en.json
+++ b/CSyntaxHighlight/i18n/en.json
@@ -9,5 +9,6 @@
        "bs-csyntaxhighlight-pref-theme": "Theme:",
        "bs-csyntaxhighlight-pref-gutter": "Show line numbers",
        "bs-csyntaxhighlight-pref-autolinks": "Link URLs",
-       "bs-csyntaxhighlight-pref-toolbar": "Show toolbar"
+       "bs-csyntaxhighlight-pref-toolbar": "Show toolbar",
+       "bs-csyntaxhighlight-tag-desc": "Inserts CSyntaxHighlight tag, used to 
display formatted code snippets"
 }
diff --git a/CSyntaxHighlight/i18n/qqq.json b/CSyntaxHighlight/i18n/qqq.json
index 01de864..6cea8fc 100644
--- a/CSyntaxHighlight/i18n/qqq.json
+++ b/CSyntaxHighlight/i18n/qqq.json
@@ -10,5 +10,6 @@
        "bs-csyntaxhighlight-pref-theme": "Option in 
[[Special:Wiki_Admin&mode=Preferences]], label for theme:\n{{Identical|Theme}}",
        "bs-csyntaxhighlight-pref-gutter": "Option in 
[[Special:Wiki_Admin&mode=Preferences]], checkbox label for show line numbers",
        "bs-csyntaxhighlight-pref-autolinks": "Option in 
[[Special:Wiki_Admin&mode=Preferences]], checkbox label for link URLs",
-       "bs-csyntaxhighlight-pref-toolbar": "Option in 
[[Special:Wiki_Admin&mode=Preferences]], checkbox label for show toolbar"
+       "bs-csyntaxhighlight-pref-toolbar": "Option in 
[[Special:Wiki_Admin&mode=Preferences]], checkbox label for show toolbar",
+       "bs-csyntaxhighlight-tag-desc": "Used in InsertMagic extension, 
description of the tag that displays formatted code snippets."
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/339390
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I094573c6f7ebafaa3503e89e2ff6e7f33592cf48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: ItSpiderman <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to