Boofo
06-11-2002, 02:04 PM
Can someone please help me make it so Admins can bypass the limit of attachment file size? I have it so Admins can bypass the size of avatars, but not the file size limit. The following code is what is in my functions.php right now:
code I have now:
$filesize=filesize($attachment);
if ($maxattachsize!=0 and $filesize>$maxattachsize) {
// too big!
eval("standarderror(\"".gettemplate("error_attachtoobig")."\");");
unlink($attachment);
exit;
}
The following is what I was told to change it to before I added whatever hack changed my original code to the code above:
if ($maxattachsize!=0 and $filesize>$maxattachsize and $bbuserinfo[usergroupid]!=6) {
// too big!
eval("standarderror(\"".gettemplate("error_attachtoobig")."\");");
exit;
}
if ($filesize!=$attachment_size and $bbuserinfo[usergroupid]!=6) {
code I have now:
$filesize=filesize($attachment);
if ($maxattachsize!=0 and $filesize>$maxattachsize) {
// too big!
eval("standarderror(\"".gettemplate("error_attachtoobig")."\");");
unlink($attachment);
exit;
}
The following is what I was told to change it to before I added whatever hack changed my original code to the code above:
if ($maxattachsize!=0 and $filesize>$maxattachsize and $bbuserinfo[usergroupid]!=6) {
// too big!
eval("standarderror(\"".gettemplate("error_attachtoobig")."\");");
exit;
}
if ($filesize!=$attachment_size and $bbuserinfo[usergroupid]!=6) {