Skip to content

Commit

Permalink
#2615 Wiki: references to existing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Trofimov committed Dec 17, 2021
1 parent 74a1943 commit 2f190f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/classes/BxDolWiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ protected function textElements($text)
$aData = array(
// real link URL is set later when link is referenced
'url' => 'bx-internal-page://' . $sUri,
'title' => !empty($r['title']) ? $r['title'] : null,
'title' => !empty($r['title']) ? _t($r['title']) : null,
);
$this->DefinitionData['Reference'][$sUri] = $aData;
}
Expand All @@ -865,7 +865,7 @@ protected function inlineLink($Excerpt)
if (@isset($a['element']['attributes']['href']) && 0 === strncmp($a['element']['attributes']['href'], 'bx-internal-page://', 19)) {
$sUri = substr($a['element']['attributes']['href'], 19);
if (isset($this->_aPages[$sUri])) {
$sHref = BxDolPermalinks::getInstance()->permalink($this->_aPages[$sUri]['url']);
$sHref = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->_aPages[$sUri]['url']);
$a['element']['attributes']['href'] = $sHref;
}
else {
Expand Down

0 comments on commit 2f190f0

Please sign in to comment.