The Hubzilla
 All Classes Namespaces Files Functions Variables Pages
photo_driver.php File Reference

Classes

class  photo_driver
 

Functions

 photo_factory ($data, $type=null)
 
 guess_image_type ($filename, $headers= '')
 
 delete_thing_photo ($url, $ob_hash)
 
 import_xchan_photo ($photo, $xchan, $thing=false)
 
 import_channel_photo_from_url ($photo, $aid, $uid)
 
 import_channel_photo ($photo, $type, $aid, $uid)
 

Function Documentation

delete_thing_photo (   $url,
  $ob_hash 
)
guess_image_type (   $filename,
  $headers = '' 
)

Guess image mimetype from filename or from Content-Type header

  • $filename string Image filename
  • $headers string Headers to check for Content-Type (from curl request)

Well, this not much better, but at least it comes from the data inside the image, we won't be tricked by a manipulated extension

Referenced by compat_photos_list(), import_channel_photo_from_url(), import_xchan_photo(), photo_upload(), and scale_external_images().

import_channel_photo (   $photo,
  $type,
  $aid,
  $uid 
)
import_channel_photo_from_url (   $photo,
  $aid,
  $uid 
)

Referenced by create_identity().