aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/photos.php b/include/photos.php
index e41d1059a..e4367bf95 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -102,12 +102,10 @@ function photo_upload($channel, $observer, $args) {
$imagedata = @file_get_contents($src);
- $r = q("select sum(size) as total from photo where uid = %d and scale = 0 ",
- intval($channel_id)
+ $r = q("select sum(size) as total from photo where aid = %d and scale = 0 ",
+ intval($account_id)
);
-// FIXME service class limits should probably apply to accounts and not channels
-
$limit = service_class_fetch($channel_id,'photo_upload_limit');
if(($r) && ($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {