This is my answer to a Question on Support site for LampCMS project
It means if question has any answers or if currently logged in user of the site is a moderator (admin also moderator, so it's true for admins too), then instantiate the Answers object and get the answers for this question.
The reason for isModerator check is that in theory the question may contain deleted answers, which would mean that count of answers is 0, but there still may be deleted answers. Since moderator may be allowed to "undelete" answers, the Answers object will still pull all the answers, even deleted ones.
No comments:
Post a Comment