summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/format.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/inc/format.php b/inc/format.php
index 2dbb43a97..1f17dce74 100644
--- a/inc/format.php
+++ b/inc/format.php
@@ -89,18 +89,6 @@ function format_link_wiki($link){
list($link['url'],$hash) = split('#',$link['url'],2);
$hash = cleanID($hash);
- //if no name set, use (unclean) link without namespace
- if(empty($link['name'])){
- if($conf['useslash']){
- $nssep = '[:;/]';
- }else{
- $nssep = '[:;]';
- }
- $link['name'] = preg_replace('!.*'.$nssep.'!','',$link['url']);
- $link['name'] = htmlspecialchars($link['name']);
- }
-
-
$file = wikiFN($link['url']);
$url = cleanID($link['url']);
@@ -129,6 +117,17 @@ function format_link_wiki($link){
$link['class']="wikilink2";
}
+ //if no name set yet, use (unclean) link without namespace
+ if(empty($link['name'])){
+ if($conf['useslash']){
+ $nssep = '[:;/]';
+ }else{
+ $nssep = '[:;]';
+ }
+ $link['name'] = preg_replace('!.*'.$nssep.'!','',$link['url']);
+ }
+ $link['name'] = htmlspecialchars($link['name']);
+
//set title
$link['title'] = $url;