Changeset 986


Ignore:
Timestamp:
06/12/09 16:25:20 (15 years ago)
Author:
alexandrecorreia
Message:

Ticket #505 - Arquivos modificados para a administração de hosts virtuais no servidor Jabber.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jabberit_messenger/inc/webservice.php

    r957 r986  
    141141        } 
    142142         
    143         public final function getPhotoLdap($pJid) 
     143        public final function getPhotoLdap( $pJid, $pCatalog ) 
    144144        { 
    145145                if ( ! $this->jabberName ) 
     
    148148                $uid = substr($pJid, 0, strpos($pJid,"@")); 
    149149                 
    150                 if( $this->jabberName == (substr($pJid, strpos($pJid, "@") + 1 ))) 
     150                if( ($this->jabberName == (substr($pJid, strpos($pJid, "@") + 1 ))) && $pCatalog) 
    151151                { 
    152152                        $this->ldapConnect(); 
     
    237237        $jid = strpos($jid, "/") ? substr($jid, 0, strpos($jid, "/")) : $jid; 
    238238         
    239         $photo = $obj->getPhotoLdap($jid); 
     239        $photo = $obj->getPhotoLdap($jid, true); 
    240240        $photoWidth = 70; 
    241241        $photoHeight = 90; 
     
    249249        else 
    250250        { 
    251                 $photo = @imagecreatefrompng("../templates/default/images/photo.png"); 
    252                 imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo)); 
     251                $photo = $obj->getPhotoLdap($jid, false); 
     252                if( $photo ) 
     253                { 
     254                        $photo = imagecreatefromstring($photo); 
     255                        imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo)); 
     256                } 
     257                else 
     258                { 
     259                        $photo = @imagecreatefrompng("../templates/default/images/photo.png"); 
     260                        imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo)); 
     261                } 
    253262        } 
    254263         
Note: See TracChangeset for help on using the changeset viewer.