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

@@ -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'];

View File

@@ -687,8 +687,8 @@ function photos_content(&$a) {
/* Show space usage */
$r = q("select sum(size) as total from photo where uid = %d and scale = 0 ",
intval($a->data['channel']['channel_id'])
$r = q("select sum(size) as total from photo where aid = %d and scale = 0 ",
intval($a->data['channel']['channel_account_id'])
);