getConf('prefix') || $this->getConf('ignore_same_domain') == 1 && strtolower(parse_url($url, PHP_URL_HOST)) == strtolower($_SERVER["HTTP_HOST"])) { return parent::externallink($url, $name); } $name = ($name) ? $name : "$url"; $protocol = ($_SERVER["HTTPS"]) ? "https" : "http"; $url = $this->getConf('encode_url') ? urlencode($url) : $url; if ($this->getConf('prefix') == DOKU_BASE . 'lib/plugins/linkprefix/redirect.php?') { $url = $protocol . "://" . $_SERVER["HTTP_HOST"] . $this->getConf('prefix') . $url; } else { $url = $this->getConf('prefix') . $url; } return parent::externallink($url, $name); } function _resolveInterWiki(&$shortcut, $reference, &$exists = null){ if (!$this->getConf('prefix')) { return parent::_resolveInterWiki($shortcut,$reference); } $backup = $this->interwiki[$shortcut]; $url = $this->getConf('encode_url') ? urlencode($this->interwiki[$shortcut]) : $this->interwiki[$shortcut]; if ($backup) $this->interwiki[$shortcut] = $this->getConf('prefix') . $url; $return = parent::_resolveInterWiki($shortcut,$reference); $this->interwiki[$shortcut] = $backup; return $return; } }