summaryrefslogtreecommitdiff
path: root/inc/parser/xhtml.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser/xhtml.php')
-rw-r--r--inc/parser/xhtml.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 20cd8e9d6..53a4dbcad 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -697,7 +697,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['name'] = $this->_getLinkTitle($name, $wikiUri, $isImage);
//get interwiki URL
- $url = $this->_resolveInterWiki($wikiName, $wikiUri);
+ $exists = null;
+ $url = $this->_resolveInterWiki($wikiName, $wikiUri, $exists);
if(!$isImage) {
$class = preg_replace('/[^_\-a-z0-9]+/i', '_', $wikiName);
@@ -710,6 +711,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
if(strpos($url, DOKU_URL) === 0 OR strpos($url, DOKU_BASE) === 0) {
$link['target'] = $conf['target']['wiki'];
}
+ if($exists !== null && !$isImage) {
+ if($exists) {
+ $link['class'] .= ' wikilink1';
+ } else {
+ $link['class'] .= ' wikilink2';
+ $link['rel'] = 'nofollow';
+ }
+ }
$link['url'] = $url;
$link['title'] = htmlspecialchars($link['url']);