aboutsummaryrefslogtreecommitdiffstats
path: root/include/contact_selectors.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/contact_selectors.php')
-rw-r--r--include/contact_selectors.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/contact_selectors.php b/include/contact_selectors.php
index adcca2c52..b56a77937 100644
--- a/include/contact_selectors.php
+++ b/include/contact_selectors.php
@@ -1,21 +1,19 @@
<?php /** @file */
-function contact_profile_assign($current,$foreign_net) {
+function contact_profile_assign($current) {
$o = '';
- $disabled = (($foreign_net) ? ' disabled="true" ' : '');
+ $o .= "<select id=\"contact-profile-selector\" name=\"profile-assign\" />\r\n";
- $o .= "<select id=\"contact-profile-selector\" $disabled name=\"profile-assign\" />\r\n";
+ $r = q("SELECT profile_guid, profile_name FROM `profile` WHERE `uid` = %d",
+ intval($_SESSION['uid']));
- $r = q("SELECT `id`, `profile_name` FROM `profile` WHERE `uid` = %d",
- intval($_SESSION['uid']));
-
- if(count($r)) {
+ if($r) {
foreach($r as $rr) {
- $selected = (($rr['id'] == $current) ? " selected=\"selected\" " : "");
- $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['profile_name']}</option>\r\n";
+ $selected = (($rr['profile_guid'] == $current) ? " selected=\"selected\" " : "");
+ $o .= "<option value=\"{$rr['profile_guid']}\" $selected >{$rr['profile_name']}</option>\r\n";
}
}
$o .= "</select>\r\n";