From 72e83f69bc3afe3646b423a19f11c99d03e3b66a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 25 Apr 2013 20:01:24 -0700 Subject: photo driver abstraction --- mod/photos.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 0564cb3ff..84a12aacb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1,5 +1,5 @@ supportedTypes(); $can_post = false; @@ -233,7 +235,7 @@ function photos_post(&$a) { intval($page_owner_uid) ); if(count($r)) { - $ph = new Photo($r[0]['data'], $r[0]['type']); + $ph = photo_factory($r[0]['data'], $r[0]['type']); if($ph->is_valid()) { $rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 ); $ph->rotate($rotate_deg); @@ -565,7 +567,8 @@ function photos_content(&$a) { return; } - $phototypes = Photo::supportedTypes(); + $ph = photo_factory(''); + $phototypes = $ph->supportedTypes(); $_SESSION['photo_return'] = $a->cmd; @@ -1152,7 +1155,7 @@ function photos_content(&$a) { $dislike = ''; // display comments - if(count($r)) { + if($r) { foreach($r as $item) { like_puller($a,$item,$alike,'like'); -- cgit v1.2.3