diff options
Diffstat (limited to 'classes/TidypicsImage.php')
-rw-r--r-- | classes/TidypicsImage.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/classes/TidypicsImage.php b/classes/TidypicsImage.php index c0b5de723..26a3483a9 100644 --- a/classes/TidypicsImage.php +++ b/classes/TidypicsImage.php @@ -90,7 +90,11 @@ class TidypicsImage extends ElggFile { * @return string */ public function getTitle() { - return $this->title; + if ($this->title) { + return $this->title; + } else { + return $this->originalfilename; + } } /** @@ -244,6 +248,11 @@ class TidypicsImage extends ElggFile { trigger_error('Tidypics warning: image memory size too large for resizing so rejecting', E_USER_WARNING); throw new Exception(elgg_echo('tidypics:image_pixels')); } + + // make sure file fits quota + if (!tp_upload_check_quota($data['size'], elgg_get_logged_in_user_guid())) { + throw new Exception(elgg_echo('tidypics:cannot_upload_exceeds_quota')); + } } /** |