Changeset 895
- Timestamp:
- 05/21/09 15:54:11 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/class.contacts_im.inc.php
r865 r895 20 20 private $db; 21 21 private $ou_User; 22 private $hostsJabber; 23 private $serverJabber; 22 24 23 25 public final function __construct() … … 34 36 $this->ou_User = substr($this->ou_User,strpos($this->ou_User, "ou=")); 35 37 $this->ou_User = strtoupper(substr($this->ou_User, 0, strpos($this->ou_User, ",dc="))); 38 39 // Hosts Jabber 40 $this->hostsJabber = unserialize($_SESSION['phpgw_info']['jabberit_messenger']['map_org_realm_jabberit']); 41 $this->hostsJabber = explode(";", $this->hostsJabber); 42 43 // Server Name Jabber 44 $this->serverJabber = $_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']; 36 45 } 37 46 … … 72 81 $users = $this->users_auth_im($param['name']); 73 82 $order = array(); 74 83 75 84 if (!is_array($users) && trim($users) === 'Many Results') 76 85 return "<error>Many Results</error>"; … … 78 87 if( is_array($users) ) 79 88 { 89 if( is_array($this->hostsJabber) ) 90 { 91 for( $i = 0 ; $i < count($users); $i++ ) 92 { 93 foreach($this->hostsJabber as $values) 94 { 95 $itens = explode(":", $values); 96 if( $users[$i]['dn'] == $itens[0] ) 97 $users[$i]['jid'] = $users[$i]['jid']."@".$itens[1]; 98 } 99 } 100 } 101 80 102 foreach($users as $tmp) 81 103 { … … 83 105 $order[$tmp['dn']] = array(); 84 106 85 $order[$tmp['dn']][] = '<data><cn>' . $tmp['cn'] . '</cn><mail>' . $tmp['mail'] .'</mail><uid>' . $tmp['uid'] . '</uid><photo>' . $tmp['photo'] . '</photo></data>'; 107 if( (strpos($tmp['jid'], "@" )) === false ) 108 $tmp['jid'] = $tmp['jid']."@".$this->serverJabber; 109 110 $_SESSION['debug'][] = $order[$tmp['dn']][] = '<data><cn>' . $tmp['cn'] . '</cn><mail>' . $tmp['mail'] .'</mail><uid>' . $tmp['uid'] . '</uid><jid>' . $tmp['jid'] . '</jid><photo>' . $tmp['photo'] . '</photo></data>'; 86 111 } 87 112
Note: See TracChangeset
for help on using the changeset viewer.