@@ 139-143 (lines=5) @@ | ||
136 | // Comments |
|
137 | case 'savecomment': |
|
138 | ||
139 | if (!$faqConfig->get('records.allowCommentsForGuests') && |
|
140 | !$user->perm->checkRight($user->getUserId(), 'addcomment')) { |
|
141 | $message = array('error' => $PMF_LANG['err_NotAuth']); |
|
142 | break; |
|
143 | } |
|
144 | ||
145 | $faq = new Faq($faqConfig); |
|
146 | $oComment = new Comment($faqConfig); |
|
@@ 283-287 (lines=5) @@ | ||
280 | ||
281 | case 'savefaq': |
|
282 | ||
283 | if (!$faqConfig->get('records.allowNewFaqsForGuests') && |
|
284 | !$user->perm->checkRight($user->getUserId(), 'addfaq')) { |
|
285 | $message = array('error' => $PMF_LANG['err_NotAuth']); |
|
286 | break; |
|
287 | } |
|
288 | ||
289 | $faq = new Faq($faqConfig); |
|
290 | $category = new Category($faqConfig); |
|
@@ 474-478 (lines=5) @@ | ||
471 | ||
472 | case 'savequestion': |
|
473 | ||
474 | if (!$faqConfig->get('records.allowQuestionsForGuests') && |
|
475 | !$user->perm->checkRight($user->getUserId(), 'addquestion')) { |
|
476 | $message = ['error' => $PMF_LANG['err_NotAuth']]; |
|
477 | break; |
|
478 | } |
|
479 | ||
480 | $faq = new Faq($faqConfig); |
|
481 | $cat = new Category($faqConfig); |