make storage limit service classes apply to accounts, not channels. Also include a css file that was missing from work yesterday.

This commit is contained in:
friendica
2014-01-07 14:10:28 -08:00
parent e635dcb309
commit b8564134aa
7 changed files with 26 additions and 17 deletions

View File

@@ -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)) {