summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan <jan@jandecaluwe.com>2005-03-30 16:48:57 +0200
committerjan <jan@jandecaluwe.com>2005-03-30 16:48:57 +0200
commit9ed00c2eec762f43aaed748c5148e7bd65927f38 (patch)
treec1596e9b5991df0bb4cbc2525522b35b858a0474
parent9afe4dbf2e0907d016556ca89d08115ab99ab903 (diff)
downloadrpg-9ed00c2eec762f43aaed748c5148e7bd65927f38.tar.gz
rpg-9ed00c2eec762f43aaed748c5148e7bd65927f38.tar.bz2
Make useheading work again
darcs-hash:20050330144857-45605-a7811307313366b3895fd8718de7df8733ac2aaa.gz
-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;