aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-07 14:10:28 -0800
committerfriendica <info@friendica.com>2014-01-07 14:10:28 -0800
commitb8564134aaffc2ebe35fecd5dae4fd0f6523eb53 (patch)
tree1271c4ea29d9286c20da88cb2969c09e2a4af841 /mod
parente635dcb3092da962c29fe4c8e4ddc53de368002d (diff)
downloadvolse-hubzilla-b8564134aaffc2ebe35fecd5dae4fd0f6523eb53.tar.gz
volse-hubzilla-b8564134aaffc2ebe35fecd5dae4fd0f6523eb53.tar.bz2
volse-hubzilla-b8564134aaffc2ebe35fecd5dae4fd0f6523eb53.zip
make storage limit service classes apply to accounts, not channels. Also include a css file that was missing from work yesterday.
Diffstat (limited to 'mod')
-rw-r--r--mod/filestorage.php7
-rw-r--r--mod/photos.php4
2 files changed, 6 insertions, 5 deletions
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'];
diff --git a/mod/photos.php b/mod/photos.php
index 5afde49ef..4a0fb01b8 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -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'])
);