PDA

View Full Version : [fixed] Private forum allowing attachment download default. Bug?


TommyBALL
Wed 11th Sep '02, 6:06am
When I create a forum with "Private forum: Yes", I check the permissions for the forum, and find that default the "Can download attachments" is set to "Yes" while everything else is set to "No".

I would expect the default settings on everything, including the "Can download attachments", be set to.

Is this a bug/oddity or a feature I've missed?

I'm running a pure unhacked 2.2.7 (including all the latest bugfixes).

Scott MacVicar
Wed 11th Sep '02, 7:07am
Attachments can only be downloaded from the forum if the user can view the forum and they have permission to download. As standard it sets that they are allowed to download but they wont be able to. It just saves you having to go change it at a later date if you open the forum.

TommyBALL
Wed 11th Sep '02, 7:11am
Then why set everything else to no, and let only the download attachment be set to yes?. I know the "download attachment" access feature was added after all the others, so it shows all the signs of an inconsistency. Sombody forgot to update some code somewhere I guess ;).

Scott MacVicar
Wed 11th Sep '02, 7:19am
Just checked a buggy wuggy :)

Moving to bugs.

open /admin/forum.php

look for

$DB_site->query("INSERT INTO forumpermission (forumpermissionid,forumid,usergroupid,canview,can search,canemail,canpostnew,canmove,canopenclose,ca ndeletethread,canreplyown,canreplyothers,canviewot hers,caneditpost,candeletepost,canpostattachment,c anpostpoll,canvote) VALUES (NULL,'$forumid','$group[usergroupid]',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)");


change to

$DB_site->query("INSERT INTO forumpermission (forumpermissionid,forumid,usergroupid,canview,can search,canemail,canpostnew,canmove,canopenclose,ca ndeletethread,canreplyown,canreplyothers,canviewot hers,caneditpost,candeletepost,canpostattachment,c anpostpoll,canvote,cangetattachment) VALUES (NULL,'$forumid','$group[usergroupid]',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)");

TommyBALL
Wed 11th Sep '02, 7:56am
Thanks Scott! :D

You guys are the best, but what else is new ;)

TommyBALL
Wed 11th Sep '02, 8:07am
Found two occurences of the code you mentioned. Updated both in /admin/forum.php (found no file named /admin/forums.php :))

DWZ
Wed 11th Sep '02, 8:22am
I'm looking at my code now - but I find that in my code there is only one space after "INSERT INTO forumpermission" (you have two), and there is no space in
"ca ndeletethread"

So... errr.... yeah, should I just be adding on ",cangetattachment" ? i.e. not have those two spaces?

And yeah, as TommyBALL said, it's there twice, should we be replacing it twice?

Scott MacVicar
Wed 11th Sep '02, 10:06am
There is no space its vB wrapping my text :(

and yes add it twice.

DWZ
Wed 11th Sep '02, 7:58pm
Originally posted by PPN
There is no space its vB wrapping my text :(

and yes add it twice. ahh, ok, cool, thanks :)