From b43b6c3549370f82afe989bfb1482254523bbc1b Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 25 Jan 2013 18:13:15 -0800 Subject: start on photos rework --- mod/photos.php | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index eaf35cc20..848d3cebd 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1,5 +1,6 @@ page['htmlhead'] .= " -EOT; } return; @@ -748,7 +728,7 @@ function photos_post(&$a) { - $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ", + $r = q("select sum(size) as total from photo where uid = %d and scale = 0 ", intval($a->data['channel']['channel_id']) ); @@ -832,7 +812,7 @@ function photos_post(&$a) { $arr['item_flags'] = $item_flags; $arr['item_restrict'] = $item_restrict; $arr['resource_type'] = 'photo'; - $arr['resource_id'] = $hoto_hash; + $arr['resource_id'] = $photo_hash; $arr['owner_xchan'] = $a->data['channel']['channel_hash']; $arr['author_xchan'] = $a->data['channel']['channel_hash']; // FIXME for AUTH guests $arr['title'] = $title; @@ -1052,7 +1032,7 @@ function photos_content(&$a) { '; - $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ", + $r = q("select sum(size) as total from photo where uid = %d and scale = 0 ", intval($a->data['channel']['channel_id']) ); -- cgit v1.2.3