includes/pageutils.php
changeset 456 e133d321fce4
parent 322 5f1cd51bf1be
child 458 c433348f3628
equal deleted inserted replaced
455:43b908c9b2e2 456:e133d321fce4
   893     if(getConfig('comments_need_login') == '2' && !$session->user_logged_in) _die('Access denied to post comments: you need to be logged in first.');
   893     if(getConfig('comments_need_login') == '2' && !$session->user_logged_in) _die('Access denied to post comments: you need to be logged in first.');
   894     if(getConfig('comments_need_login') == '1' && !$session->user_logged_in)
   894     if(getConfig('comments_need_login') == '1' && !$session->user_logged_in)
   895     {
   895     {
   896       if(!$captcha_code || !$captcha_id) _die('BUG: PageUtils::addcomment: no CAPTCHA data passed to method');
   896       if(!$captcha_code || !$captcha_id) _die('BUG: PageUtils::addcomment: no CAPTCHA data passed to method');
   897       $result = $session->get_captcha($captcha_id);
   897       $result = $session->get_captcha($captcha_id);
   898       if($captcha_code != $result) _die('The confirmation code you entered was incorrect.');
   898       if(strtolower($captcha_code) != strtolower($result)) _die('The confirmation code you entered was incorrect.');
   899     }
   899     }
   900     $text = RenderMan::preprocess_text($text);
   900     $text = RenderMan::preprocess_text($text);
   901     $name = $session->user_logged_in ? RenderMan::preprocess_text($session->username) : RenderMan::preprocess_text($name);
   901     $name = $session->user_logged_in ? RenderMan::preprocess_text($session->username) : RenderMan::preprocess_text($name);
   902     $subj = RenderMan::preprocess_text($subject);
   902     $subj = RenderMan::preprocess_text($subject);
   903     if(getConfig('approve_comments')=='1') $appr = '0'; else $appr = '1';
   903     if(getConfig('approve_comments')=='1') $appr = '0'; else $appr = '1';