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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user