aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.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 /include/items.php
parentd3b5e678908864d889b916ad2f976c1af16ca360 (diff)
downloadvolse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.tar.gz
volse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.tar.bz2
volse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.zip
photo driver abstraction
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/items.php b/include/items.php
index 088aa11a1..2a85556df 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3,7 +3,7 @@
require_once('include/bbcode.php');
require_once('include/oembed.php');
require_once('include/crypto.php');
-require_once('include/Photo.php');
+require_once('include/photo/photo_driver.php');
require_once('include/permissions.php');
@@ -2433,7 +2433,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
if((is_array($contact)) && ($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $contact['avatar_date'])) {
logger('consume_feed: Updating photo for ' . $contact['name']);
- require_once("Photo.php");
+
$photo_failure = false;
$have_photo = false;
@@ -2454,7 +2454,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$type = guess_image_type($photo_url,true);
- $img = new Photo($img_str, $type);
+ $img = photo_factory($img_str, $type);
if($img->is_valid()) {
if($have_photo) {
q("DELETE FROM `photo` WHERE `resource_id` = '%s' AND `contact-id` = %d AND `uid` = %d",
@@ -2979,7 +2979,7 @@ function local_delivery($importer,$data) {
if(($photo_timestamp) && (strlen($photo_url)) && ($photo_timestamp > $importer['avatar_date'])) {
logger('local_delivery: Updating photo for ' . $importer['name']);
- require_once("Photo.php");
+
$photo_failure = false;
$have_photo = false;
@@ -3000,7 +3000,7 @@ function local_delivery($importer,$data) {
$type = guess_image_type($photo_url,true);
- $img = new Photo($img_str, $type);
+ $img = photo_factory($img_str, $type);
if($img->is_valid()) {
if($have_photo) {
q("DELETE FROM `photo` WHERE `resource_id` = '%s' AND `contact-id` = %d AND `uid` = %d",
@@ -4210,7 +4210,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
$width = intval($match[1]);
$height = intval($match[2]);
- $ph = new Photo($data, $type);
+ $ph = photo_factory($data, $type);
if($ph->is_valid()) {
$ph->scaleImage(max($width, $height));
$data = $ph->imageString();