aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile_photo.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-25 20:01:24 -0700
committerfriendica <info@friendica.com>2013-04-25 20:01:24 -0700
commit72e83f69bc3afe3646b423a19f11c99d03e3b66a (patch)
tree130a7a1d0a45f3116c5729e6d7913ffcabff0acf /mod/profile_photo.php
parentd3b5e678908864d889b916ad2f976c1af16ca360 (diff)
downloadvolse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.tar.gz
volse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.tar.bz2
volse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.zip
photo driver abstraction
Diffstat (limited to 'mod/profile_photo.php')
-rw-r--r--mod/profile_photo.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index ea7a01bc9..64dfc0e83 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -1,6 +1,6 @@
<?php
-require_once("Photo.php");
+require_once('include/photo/photo_driver.php');
function profile_photo_init(&$a) {
@@ -77,7 +77,7 @@ function profile_photo_post(&$a) {
$base_image = $r[0];
- $im = new Photo($base_image['data'], $base_image['type']);
+ $im = photo_factory($base_image['data'], $base_image['type']);
if($im->is_valid()) {
$im->cropImage(175,$srcX,$srcY,$srcW,$srcH);
@@ -164,7 +164,7 @@ function profile_photo_post(&$a) {
}
$imagedata = @file_get_contents($src);
- $ph = new Photo($imagedata, $filetype);
+ $ph = photo_factory($imagedata, $filetype);
if(! $ph->is_valid()) {
notice( t('Unable to process image.') . EOL );
@@ -251,7 +251,7 @@ function profile_photo_content(&$a) {
return;
}
- $ph = new Photo($r[0]['data'], $r[0]['type']);
+ $ph = photo_factory($r[0]['data'], $r[0]['type']);
// go ahead as if we have just uploaded a new photo to crop
profile_photo_crop_ui_head($a, $ph);
}