Index: trunk/extensions/GoogleMaps/GoogleMaps.body.php |
— | — | @@ -556,6 +556,16 @@ |
557 | 557 | global $wgUser; |
558 | 558 | $parsed = self::parseWikiText($pParser, $pLocalParser, preg_replace('/\r\n/', '<br />', $pCaption), $pParser->mTitle, $pParser->mOptions); |
559 | 559 | $title = Title::newFromText($pTitle); |
| 560 | + |
| 561 | + // GoogleMaps extension allows user to provide title of the page to be included as |
| 562 | + // a marker description. This check here is to prevent recursive parsing if the provided title |
| 563 | + // is the same as the current page. |
| 564 | + if ($title instanceof Title && $pLocalParser->mTitle instanceof Title) { |
| 565 | + if ($title->equals($pLocalParser->getTitle())) { |
| 566 | + $title = null; |
| 567 | + } |
| 568 | + } |
| 569 | + |
560 | 570 | $revision = is_null($title) ? null : |
561 | 571 | Revision::newFromTitle($title); |
562 | 572 | $parsedArticleText = is_null($revision) ? null : |