-
- $limit = service_class_fetch($a->data['user']['uid'], 'photo_upload_limit');
-
- if ($limit) {
- $r = q("SELECT SUM(OCTET_LENGTH(`data`)) AS `total` FROM `photo` WHERE `uid` = %d AND `scale` = 0 AND `album` != 'Contact Photos'",
- intval($a->data['user']['uid'])
- );
- $size = $r[0]['total'];
-
- if (($size + strlen($imagedata)) > $limit) {
- notice( upgrade_message() . EOL );
- @unlink($src);
- $foo = 0;
- call_hooks('photo_post_end',$foo);
- killme();
- }
- }
-