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

@@ -330,8 +330,8 @@ function attach_store($channel,$observer_hash,$options = '',$arr = null) {
$limit = service_class_fetch($channel_id,'attach_upload_limit');
if($limit !== false) {
$r = q("select sum(filesize) as total from attach where uid = %d ",
intval($channel_id)
$r = q("select sum(filesize) as total from attach where aid = %d ",
intval($channel['channel_account_id'])
);
if(($r) && (($r[0]['total'] + $filesize) > ($limit - $existing_size))) {
$ret['message'] = upgrade_message(true).sprintf(t("You have reached your limit of %1$.0f Mbytes attachment storage."),$limit / 1024000);