Forums | Mahara Community

Developers / Tip: Profile icons & quota

Posts: 117

18 July 2009, 6:36 PM

Here's a little tip:  If you don't want profile icons to count towards a user's quota, you just need to comment out the following code in artefact/file/profileicons.php and that's it.  I personally would like it if photos counting towards the quota was a configuration option in future versions of Mahara. Since photos are usually relatively small and only 5 are allowed, I don't think it's really necessary to count them towards the quota (maybe that's just me though. :) )

Line 146:

//quotaUpdate();

Line 170:

/*if (!$USER->quota_allowed($filesize)) {
$form->set_error('file', get_string('profileiconuploadexceedsquota', 'artefact.file', get_config('wwwroot'))); }*/ Line 198: /*try {$USER->quota_add($filesize); } catch (QuotaException$qe) {