Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix forum #3490

Merged
merged 6 commits into from
Oct 15, 2018
Merged

Fix forum #3490

merged 6 commits into from
Oct 15, 2018

Conversation

phibel
Copy link
Contributor

@phibel phibel commented Oct 4, 2018

No description provided.

@CaMer0n
Copy link
Member

CaMer0n commented Oct 4, 2018

Excellent @phibel ! Thank you!
I have no time to test, but maybe @rica-carv or @Jimmi08 would like to.

The code looks good to me though.
Merging.

@phibel
Copy link
Contributor Author

phibel commented Oct 4, 2018

Thank you @CaMer0n, did you read my commit message 39f42fd ? Any thoughts about that?

…other forum

I am working further on the moderator permissions and discovered that my previous commit
692509f is a bad solution. Because the moderator submits the threadId and postID for the post
who he wants to delete. This threadId was used to check the moderator permissions of the postId.

So if a moderator has only permissions for one forum, he could change the transmitted threadId
in an other forum to get there also moderator permisssions...

Sorry that I did not noticed this glitch before I made the previous commit. :-/
Without admin permissions (member of user class 254) it was not possible to modify threads in
the forum. This fix get the forum-moderator permissions by the threadId to modify this thread.
Looks like someone was interrupted during work and than it was merged into the repo?
Anyway, the needed information are stored in $postInfo[] and not in $row[].
if(!is_array($postInfo) || empty($postInfo))
{
echo 'NOT FOUND!'; return;
return null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the return here to "null" and adapted the description.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@CaMer0n CaMer0n merged commit d2171ba into e107inc:master Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants