jenkins-bot has submitted this change and it was merged.

Change subject: New Hook MathSearchGenerateAnchorString
......................................................................


New Hook MathSearchGenerateAnchorString

* Allows for customization of formula Ids
  that are not set explicitly by the user.

Bug: T88945
Change-Id: I6bb19e3cccf43d3b51d8187b22e925cfc78c2173
---
M MathSearch.hooks.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php
index b68c4d5..6be7e91 100644
--- a/MathSearch.hooks.php
+++ b/MathSearch.hooks.php
@@ -209,8 +209,10 @@
                return true;
        }
 
-       static function generateMathAnchorString($pageID, $anchorID, $prefix = 
"#"){
-               return "{$prefix}math.$pageID.$anchorID";
+       static function generateMathAnchorString($revId, $anchorID, $prefix = 
"#"){
+               $result = "{$prefix}math.$revId.$anchorID";
+               Hooks::run( "MathSearchGenerateAnchorString" , array( $revId, 
$anchorID, $prefix, &$result ) );
+               return $result;
        }
 
        /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6bb19e3cccf43d3b51d8187b22e925cfc78c2173
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to