summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php29
1 files changed, 14 insertions, 15 deletions
diff --git a/inc/common.php b/inc/common.php
index 0fe33c5b1..503155c46 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -416,6 +416,7 @@ function idfilter($id, $ue = true) {
if($ue) {
$id = rawurlencode($id);
$id = str_replace('%3A', ':', $id); //keep as colon
+ $id = str_replace('%3B', ';', $id); //keep as semicolon
$id = str_replace('%2F', '/', $id); //keep as slash
}
return $id;
@@ -1640,22 +1641,20 @@ function userlink($username = null, $textonly = false) {
$evt = new Doku_Event('COMMON_USER_LINK', $data);
if($evt->advise_before(true)) {
if(empty($data['name'])) {
- if($conf['showuseras'] == 'loginname') {
- $data['name'] = $textonly ? $data['username'] : hsc($data['username']);
- } else {
- if($auth) $info = $auth->getUserData($username);
- if(isset($info) && $info) {
- switch($conf['showuseras']) {
- case 'username':
- case 'username_link':
- $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
- break;
- case 'email':
- case 'email_link':
- $data['name'] = obfuscate($info['mail']);
- break;
- }
+ if($auth) $info = $auth->getUserData($username);
+ if($conf['showuseras'] != 'loginname' && isset($info) && $info) {
+ switch($conf['showuseras']) {
+ case 'username':
+ case 'username_link':
+ $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
+ break;
+ case 'email':
+ case 'email_link':
+ $data['name'] = obfuscate($info['mail']);
+ break;
}
+ } else {
+ $data['name'] = $textonly ? $data['username'] : hsc($data['username']);
}
}