Changeset 986
- Timestamp:
- 06/12/09 16:25:20 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/webservice.php
r957 r986 141 141 } 142 142 143 public final function getPhotoLdap( $pJid)143 public final function getPhotoLdap( $pJid, $pCatalog ) 144 144 { 145 145 if ( ! $this->jabberName ) … … 148 148 $uid = substr($pJid, 0, strpos($pJid,"@")); 149 149 150 if( $this->jabberName == (substr($pJid, strpos($pJid, "@") + 1 )))150 if( ($this->jabberName == (substr($pJid, strpos($pJid, "@") + 1 ))) && $pCatalog) 151 151 { 152 152 $this->ldapConnect(); … … 237 237 $jid = strpos($jid, "/") ? substr($jid, 0, strpos($jid, "/")) : $jid; 238 238 239 $photo = $obj->getPhotoLdap($jid );239 $photo = $obj->getPhotoLdap($jid, true); 240 240 $photoWidth = 70; 241 241 $photoHeight = 90; … … 249 249 else 250 250 { 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 } 253 262 } 254 263
Note: See TracChangeset
for help on using the changeset viewer.