I've a quick hack for that. The disk quota settings in the groupmanager won't have a function anymore after applying it. Only admins will be able to upload more than 1 pic
in include/picmgmnt.inc.php find
// Test if disk quota exceeded
if (!GALLERY_ADMIN_MODE && $USER_DATA['group_quota']) {
$result = cpg_db_query("SELECT sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND category = '" . (FIRST_USER_CAT + USER_ID) . "'");
$record = mysql_fetch_array($result);
$total_space_used = $record[0];
mysql_free_result($result);
if ((($total_space_used + $total_filesize)>>10) > $USER_DATA['group_quota'] ) {
and replace with
// Test if disk quota exceeded
if (!GALLERY_ADMIN_MODE) {
$result = cpg_db_query("SELECT total_filesize FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND category = '" . (FIRST_USER_CAT + USER_ID) . "'");
$record = mysql_fetch_array($result);
$total_space_used = count($record);
mysql_free_result($result);
if ($total_space_used > 1 ) {
now open your lang file and find (I'm using english.php in that example)
'quota_exceeded' => 'Disk quota exceeded<br /><br />You have a space quota of [quota]K, your files currently use [space]K, adding this file would make you exceed your quota.',
and modify it to your needs... eg. 'You have already uploaded a pic' or similar
Should work but I haven't tested it. Therefore backup your files before modifying them