diff --git a/templates/search.tpl b/templates/search.tpl index 23380e6d..9d2da70f 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -61,13 +61,14 @@ if (sizeof ($tAlias) > 0) { print " \n"; //highlight search string - if (stristr($tAlias[$i]['address'],$fSearch)) + $tAlias[$i]['display_address'] = $tAlias[$i]['address']; + if (stristr($tAlias[$i]['display_address'],$fSearch)) { $new_address = str_ireplace($fSearch, "" . - $fSearch . "", $tAlias[$i]['address']); - $tAlias[$i]['address'] = $new_address; + $fSearch . "", $tAlias[$i]['display_address']); + $tAlias[$i]['display_address'] = $new_address; } - print " " . $tAlias[$i]['address'] . "\n"; + print " " . $tAlias[$i]['display_address'] . "\n"; if (stristr($tAlias[$i]['goto'],$fSearch)) { $new_goto = str_ireplace($fSearch, "" . @@ -137,13 +138,14 @@ if (sizeof ($tMailbox) > 0) if ((is_array ($tMailbox) and sizeof ($tMailbox) > 0)) { print " \n"; - if (stristr($tMailbox[$i]['username'],$fSearch)) + $tMailbox[$i]['display_username'] = $tMailbox[$i]['username']; + if (stristr($tMailbox[$i]['display_username'],$fSearch)) { $new_name = str_ireplace($fSearch, "" . - $fSearch . "", $tMailbox[$i]['username']); - $tMailbox[$i]['username'] = $new_name; + $fSearch . "", $tMailbox[$i]['display_username']); + $tMailbox[$i]['display_username'] = $new_name; } - print " " . $tMailbox[$i]['username'] . "\n"; + print " " . $tMailbox[$i]['display_username'] . "\n"; if (stristr($tMailbox[$i]['name'],$fSearch)) { $new_name = str_ireplace($fSearch, "" .