| @@ 347-353 (lines=7) @@ | ||
| 344 | } |
|
| 345 | ||
| 346 | // Validate email and nickname from unregistered users. |
|
| 347 | if ($this->dx_auth->is_logged_in() == FALSE) { |
|
| 348 | ($hook = get_hook('comments_set_val_rules')) ? eval($hook) : NULL; |
|
| 349 | ||
| 350 | $this->form_validation->set_rules('comment_email', lang('Email', 'comments'), 'trim|required|xss_clean|valid_email'); |
|
| 351 | $this->form_validation->set_rules('comment_author', lang('Your name', 'comments'), 'trim|required|xss_clean|max_length[50]'); |
|
| 352 | $this->form_validation->set_rules('comment_site', lang('Site', 'comments'), 'trim|xss_clean|max_length[250]'); |
|
| 353 | } |
|
| 354 | ||
| 355 | // Check captcha code if captcha_check enabled and user in not admin. |
|
| 356 | if ($this->use_captcha == TRUE AND $this->dx_auth->is_admin() == FALSE) { |
|
| @@ 455-461 (lines=7) @@ | ||
| 452 | } |
|
| 453 | ||
| 454 | // Validate email and nickname from unregistered users. |
|
| 455 | if ($this->dx_auth->is_logged_in() == FALSE) { |
|
| 456 | ($hook = get_hook('comments_set_val_rules')) ? eval($hook) : NULL; |
|
| 457 | ||
| 458 | $this->form_validation->set_rules('comment_email', lang('Email', 'comments'), 'trim|required|xss_clean|valid_email'); |
|
| 459 | $this->form_validation->set_rules('comment_author', lang('Your name', 'comments'), 'trim|required|xss_clean|max_length[50]'); |
|
| 460 | $this->form_validation->set_rules('comment_site', lang('Site', 'comments'), 'trim|xss_clean|max_length[250]'); |
|
| 461 | } |
|
| 462 | ||
| 463 | // Check captcha code if captcha_check enabled and user in not admin. |
|
| 464 | if ($this->use_captcha == TRUE AND $this->dx_auth->is_admin() == FALSE) { |
|