The contact list in mails now contains not only the name but also the address.

This commit is contained in:
Michael Vogel 2015-01-27 08:04:24 +01:00
parent 583c2ce13e
commit 848c09935a
4 changed files with 60 additions and 39 deletions

View File

@ -35,6 +35,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
$selected = " selected=\"selected\" ";
else
$selected = '';
$trimmed = mb_substr($rr['name'],0,12);
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}\" >$trimmed</option>\r\n";
@ -164,6 +165,8 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) {
require_once("include/bbcode.php");
$a = get_app();
$o = '';
@ -212,6 +215,9 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
else
$selected = '';
if($privmail)
$trimmed = GetProfileUsername($rr['url'], $rr['name'], false);
else
$trimmed = mb_substr($rr['name'],0,20);
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}|{$rr['url']}\" >$trimmed</option>\r\n";

View File

@ -619,6 +619,17 @@ function GetProfileUsername($profile, $username, $compact = false, $getnetwork =
return($username." (".$diaspora.")");
}
$red = preg_replace("=https?://(.*)/channel/(.*)=ism", "$2@$1", $profile);
if ($red != $profile) {
if ($getnetwork)
// red is identified as Diaspora - friendica can't connect directly to it
return(NETWORK_DIASPORA);
elseif ($compact)
return($red);
else
return($username." (".$red.")");
}
$StatusnetHost = preg_replace("=https?://(.*)/user/(.*)=ism", "$1", $profile);
if ($StatusnetHost != $profile) {
$StatusnetUser = preg_replace("=https?://(.*)/user/(.*)=ism", "$2", $profile);

View File

@ -2243,6 +2243,10 @@ blockquote {
#prof-separator { display: none;}
*/
#message-to-select {
height: 150px;
}
#prvmail-upload {
margin-left: 10px;
}