Mail link in profile page
This commit is contained in:
parent
28f0e9a2de
commit
ab074e200b
|
@ -190,8 +190,14 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
||||||
|
|
||||||
$tabindex = ($tabindex > 0 ? "tabindex=\"$tabindex\"" : "");
|
$tabindex = ($tabindex > 0 ? "tabindex=\"$tabindex\"" : "");
|
||||||
|
|
||||||
|
if ($privmail AND $preselected) {
|
||||||
|
$sql_extra .= " AND `id` IN (".implode(",", $preselected).")";
|
||||||
|
$hidepreselected = ' style="display: none;"';
|
||||||
|
} else
|
||||||
|
$hidepreselected = "";
|
||||||
|
|
||||||
if($privmail)
|
if($privmail)
|
||||||
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" $tabindex >\r\n";
|
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" $tabindex $hidepreselected>\r\n";
|
||||||
else
|
else
|
||||||
$o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" $tabindex >\r\n";
|
$o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" $tabindex >\r\n";
|
||||||
|
|
||||||
|
@ -209,6 +215,8 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
||||||
|
|
||||||
call_hooks($a->module . '_pre_' . $selname, $arr);
|
call_hooks($a->module . '_pre_' . $selname, $arr);
|
||||||
|
|
||||||
|
$receiverlist = array();
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if((is_array($preselected)) && in_array($rr['id'], $preselected))
|
if((is_array($preselected)) && in_array($rr['id'], $preselected))
|
||||||
|
@ -221,6 +229,8 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
||||||
else
|
else
|
||||||
$trimmed = mb_substr($rr['name'],0,20);
|
$trimmed = mb_substr($rr['name'],0,20);
|
||||||
|
|
||||||
|
$receiverlist[] = $trimmed;
|
||||||
|
|
||||||
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}|{$rr['url']}\" >$trimmed</option>\r\n";
|
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}|{$rr['url']}\" >$trimmed</option>\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,6 +238,9 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
||||||
|
|
||||||
$o .= "</select>\r\n";
|
$o .= "</select>\r\n";
|
||||||
|
|
||||||
|
if ($privmail AND $preselected)
|
||||||
|
$o .= implode(", ", $receiverlist);
|
||||||
|
|
||||||
call_hooks($a->module . '_post_' . $selname, $o);
|
call_hooks($a->module . '_post_' . $selname, $o);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
Loading…
Reference in a new issue