From b8564134aaffc2ebe35fecd5dae4fd0f6523eb53 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 7 Jan 2014 14:10:28 -0800 Subject: make storage limit service classes apply to accounts, not channels. Also include a css file that was missing from work yesterday. --- mod/filestorage.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mod/filestorage.php') diff --git a/mod/filestorage.php b/mod/filestorage.php index b774cf756..0d92c0d2a 100644 --- a/mod/filestorage.php +++ b/mod/filestorage.php @@ -42,10 +42,11 @@ function filestorage_content(&$a) { return; } - $r = q("select channel_id from channel where channel_address = '%s'", + $r = q("select * from channel where channel_address = '%s'", dbesc($which) ); if($r) { + $channel = $r[0]; $owner = intval($r[0]['channel_id']); } @@ -146,8 +147,8 @@ function filestorage_content(&$a) { } $limit = service_class_fetch ($owner,'attach_upload_limit'); - $r = q("select sum(filesize) as total from attach where uid = %d ", - intval($owner) + $r = q("select sum(filesize) as total from attach where aid = %d ", + intval($channel['channel_account_id']) ); $used = $r[0]['total']; -- cgit v1.2.3