From d85570c9946aef61d8d935d9f50169215338d665 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 15 Feb 2011 11:45:38 +0000 Subject: improved wiki --- h-source/Application/Include/myFunctions.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'h-source/Application/Include/myFunctions.php') diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index d494eb6..8299157 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -195,6 +195,8 @@ function decodeWikiText($string) $string = preg_replace('/(\[hr\])/', '
',$string); + $string = preg_replace_callback('/(\[\[)(.*?)(\]\])/', 'linkToInternalPage' ,$string); + $string = preg_replace_callback('/(\[a\])(.*?)(\[\/a\])/', 'linkTo',$string); $string = preg_replace_callback('/(\[a\])(.*?)\|(.*?)(\[\/a\])/', 'linkToWithText',$string); @@ -269,6 +271,11 @@ function linkTo($match) } } +function linkToInternalPage($match) +{ + return "".$match[2].""; +} + function linkToWithText($match) { if (checkUrl($match[2])) -- cgit v1.2.3