aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.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/photos.php
parentd3b5e678908864d889b916ad2f976c1af16ca360 (diff)
downloadvolse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.tar.gz
volse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.tar.bz2
volse-hubzilla-72e83f69bc3afe3646b423a19f11c99d03e3b66a.zip
photo driver abstraction
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php13
1 files changed, 8 insertions, 5 deletions
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 @@
<?php
-require_once('include/Photo.php');
+require_once('include/photo/photo_driver.php');
require_once('include/photos.php');
require_once('include/items.php');
require_once('include/acl_selectors.php');
@@ -59,7 +59,9 @@ function photos_post(&$a) {
logger('mod_photos: REQUEST ' . print_r($_REQUEST,true), LOGGER_DATA);
logger('mod_photos: FILES ' . print_r($_FILES,true), LOGGER_DATA);
- $phototypes = Photo::supportedTypes();
+ $ph = photo_factory('');
+
+ $phototypes = $ph->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');