Physikerwelt has uploaded a new change for review.

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

Change subject: Don't print links to FormulaInfo on SpecialPages
......................................................................

Don't print links to FormulaInfo on SpecialPages

Change-Id: I0866758a5168cd174c2d7f7de0e875813849e786
---
M MathSearch.hooks.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php
index 91894fd..af37f6f 100644
--- a/MathSearch.hooks.php
+++ b/MathSearch.hooks.php
@@ -184,7 +184,9 @@
        static function addLinkToFormulaInfoPage( Parser $parser, MathRenderer 
$renderer,
                &$Result = null ) {
                $revId = $parser->getRevisionId();
-               self::setMathId( $eid, $renderer, $revId );
+               if ( $revId == 0 || self::setMathId( $eid, $renderer, $revId ) 
=== false ) {
+                       return true;
+               }
                $url = SpecialPage::getTitleFor( 'FormulaInfo' )->getLocalUrl( 
array(
                        'pid' => $revId,
                        'eid' => $eid

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0866758a5168cd174c2d7f7de0e875813849e786
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <w...@physikerwelt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to