Physikerwelt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/189413

Change subject: Add Hook  MathSearchGenerateAnchorString
......................................................................

Add Hook  MathSearchGenerateAnchorString

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

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch 
refs/changes/13/189413/1

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: newchange
Gerrit-Change-Id: I6bb19e3cccf43d3b51d8187b22e925cfc78c2173
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>

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

Reply via email to