fluxweed wrote:I'm sorry if this has been asked and answered. I've tried searching for the posts but I couldn't find them.
This is my problem.
Attachment over the quota limit is possible in some situation.
Suppose a user posts a new message when he's near the quota limit.. he then attaches a file no. 1 in that message and the total is still below quota. (that's fine so far.. ) . Then he attaches file no. 2 , but this file will make it over the quota, however he can attach it no problem!! also file no. 3 no. 4 etc.. no problem at all. as long as it 's in the same message and he hasn't hit submit.
so it seems the quota is checked only for the first attachment in a post.
is this a bug or am i missing something in my installation. ?
What about after hitting submit and are you doing this as admin?
Thanks for your response.
Everything goes through after submit. when I checked the quota, it says 220%..
However, when I try a new post and add another attachment, it is refused this time.
And No, this account I tried is the most basic account, (not a moderator and doesn't belong to any group).
Check the attach_mod/includes/functions_includes.php for the following line as it makes the SQL call for quota's:
Code: Select all
if ($admin_mode == 'user' && !$submit && $mode != 'save')
// Show the contents
$sql = 'SELECT quota_limit_id, quota_type FROM ' . QUOTA_TABLE . "
WHERE user_id = $user_id";
if( !($result = $db->sql_query($sql)) )
message_die(GENERAL_ERROR, 'Unable to get Quota Settings', '', __LINE__, __FILE__, $sql);
$pm_quota = 0;
$upload_quota = 0;
if ($row = $db->sql_fetchrow($result))
if ($row['quota_type'] == QUOTA_UPLOAD_LIMIT)
$upload_quota = $row['quota_limit_id'];
else if ($row['quota_type'] == QUOTA_PM_LIMIT)
$pm_quota = $row['quota_limit_id'];
while ($row = $db->sql_fetchrow($result));
// Set Default Quota Limit
$upload_quota = $attach_config['default_upload_quota'];
$pm_quota = $attach_config['default_pm_quota'];
'S_SELECT_UPLOAD_QUOTA' => quota_limit_select('user_upload_quota', $upload_quota),
'S_SELECT_PM_QUOTA' => quota_limit_select('user_pm_quota', $pm_quota),
'L_UPLOAD_QUOTA' => $lang['Upload_quota'],
'L_PM_QUOTA' => $lang['Pm_quota'])
if ($admin_mode == 'user' && $submit && $HTTP_POST_VARS['deleteuser'])
process_quota_settings($admin_mode, $user_id, QUOTA_UPLOAD_LIMIT, 0);
process_quota_settings($admin_mode, $user_id, QUOTA_PM_LIMIT, 0);
else if ($admin_mode == 'user' && $submit && $mode == 'save')
// Get the contents
$upload_quota = get_var('user_upload_quota', 0);
$pm_quota = get_var('user_pm_quota', 0);
process_quota_settings($admin_mode, $user_id, QUOTA_UPLOAD_LIMIT, $upload_quota);
process_quota_settings($admin_mode, $user_id, QUOTA_PM_LIMIT, $pm_quota);
Also check the database and see if the values are correct.