Code Duplication    Length = 5-5 lines in 2 locations

application/modules/comments/commentsapi.php 2 locations

@@ 353-357 (lines=5) @@
350
            }
351
        }
352
353
        if ($this->max_comment_length != 0) {
354
            $this->form_validation->set_rules('comment_text', lang('Comment', 'comments'), 'trim|required|xss_clean|max_length[' . $this->max_comment_length . ']');
355
        } else {
356
            $this->form_validation->set_rules('comment_text', lang('Comment', 'comments'), 'trim|required|xss_clean');
357
        }
358
359
        if (!$this->form_validation->run($this)) {
360
            //            $this->dx_auth->captcha();
@@ 474-478 (lines=5) @@
471
            }
472
        }
473
474
        if ($this->max_comment_length != 0) {
475
            $this->form_validation->set_rules('comment_text', lang('Comment', 'comments'), 'trim|required|xss_clean|max_length[' . $this->max_comment_length . ']');
476
        } else {
477
            $this->form_validation->set_rules('comment_text', lang('Comment', 'comments'), 'trim|required|xss_clean');
478
        }
479
480
        if ($this->form_validation->run($this) == FALSE) {
481
            ($hook = get_hook('comments_validation_failed')) ? eval($hook) : NULL;