aboutsummaryrefslogtreecommitdiffstats
path: root/mod/wall_upload.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-06-26 22:31:15 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-06-26 22:31:15 -0400
commit5b35a02d260d1f2573895c29f4710b08348ee8ba (patch)
treec59dc06ec20ae59b3f0f0b0f17bff2477ae0e2a4 /mod/wall_upload.php
parentf04647ca4bba6302f344bd16ba037cde89cf9ae5 (diff)
parentb02c7339671179aa7f4644bbde804791d8fefa25 (diff)
downloadvolse-hubzilla-5b35a02d260d1f2573895c29f4710b08348ee8ba.tar.gz
volse-hubzilla-5b35a02d260d1f2573895c29f4710b08348ee8ba.tar.bz2
volse-hubzilla-5b35a02d260d1f2573895c29f4710b08348ee8ba.zip
Merge remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: service class restrict the email connector stray s typos add event titles to discovered birthday events change required doco change event behaviour so that title is required but description is not event summary/title propagate remote deletes remove possibly unnecessary checks for likes or comments created by Diaspora users store signature info for remote users too was passing the wrong arguments to the signature storage function add some debug logging revert extra Diaspora disabling changes to try to eliminate Mustard double-posting Clean up the Diaspora connectivity: improve remote delete forwarding typos in bbcode, add service class restrictions to jot uploads rev update
Diffstat (limited to 'mod/wall_upload.php')
-rw-r--r--mod/wall_upload.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/wall_upload.php b/mod/wall_upload.php
index 4b81f8d1c..5990f2834 100644
--- a/mod/wall_upload.php
+++ b/mod/wall_upload.php
@@ -79,6 +79,19 @@ function wall_upload_post(&$a) {
killme();
}
+ $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+ intval($page_owner_uid)
+ );
+
+ $limit = service_class_fetch($page_owner_uid,'photo_upload_limit');
+
+ if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
+ echo upgrade_message(true) . EOL ;
+ @unlink($src);
+ killme();
+ }
+
+
$imagedata = @file_get_contents($src);
$ph = new Photo($imagedata, $filetype);