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.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 52efa9f72..0b1531a65 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -388,7 +388,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->internallink($link,$link);
}
- function internallink($id, $name = NULL) {
+ function internallink($id, $name = NULL, $search=NULL) {
global $conf;
$name = $this->_getLinkTitle($name, $this->_simpleTitle($id), $isImage, $id);
@@ -415,6 +415,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['name'] = $name;
$link['title'] = $id;
+ //add search string
+ if($search){
+ ($conf['userewrite']) ? $link['url'].='?s=' : $link['url'].='&s=';
+ $link['url'] .= urlencode($search);
+ }
+
//output formatted
echo $this->_formatLink($link);
}