aboutsummaryrefslogtreecommitdiffstats
path: root/include/contact_selectors.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-03 01:50:39 -0700
committerfriendica <info@friendica.com>2013-07-03 01:50:39 -0700
commit8369a8a7559391ea6cb2757b5093bcf47aed0ed1 (patch)
tree9a9bc185f4e0b8c331eeff3a75eca976bd0656c4 /include/contact_selectors.php
parentfd74c5b2ce303ba7018b139c033c6f92ea134751 (diff)
downloadvolse-hubzilla-8369a8a7559391ea6cb2757b5093bcf47aed0ed1.tar.gz
volse-hubzilla-8369a8a7559391ea6cb2757b5093bcf47aed0ed1.tar.bz2
volse-hubzilla-8369a8a7559391ea6cb2757b5093bcf47aed0ed1.zip
progress on multiple profiles, doing it the old way. I don't think we're going to be able to do it the new way - way too complicated.
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";