Code Duplication    Length = 7-7 lines in 2 locations

application/modules/comments/comments.php 1 location

@@ 356-362 (lines=7) @@
353
        }
354
355
        // Validate email and nickname from unregistered users.
356
        if ($this->dx_auth->is_logged_in() == FALSE) {
357
            ($hook = get_hook('comments_set_val_rules')) ? eval($hook) : NULL;
358
359
            $this->form_validation->set_rules('comment_email', lang('Email', 'comments'), 'trim|required|xss_clean|valid_email');
360
            $this->form_validation->set_rules('comment_author', lang('Your name', 'comments'), 'trim|required|xss_clean|max_length[50]');
361
            $this->form_validation->set_rules('comment_site', lang('Site', 'comments'), 'trim|xss_clean|max_length[250]');
362
        }
363
364
        // Check captcha code if captcha_check enabled and user in not admin.
365
        if ($this->use_captcha == TRUE AND $this->dx_auth->is_admin() == FALSE) {

application/modules/comments/commentsapi.php 1 location

@@ 469-475 (lines=7) @@
466
        }
467
468
        // Validate email and nickname from unregistered users.
469
        if ($this->dx_auth->is_logged_in() == FALSE) {
470
            ($hook = get_hook('comments_set_val_rules')) ? eval($hook) : NULL;
471
472
            $this->form_validation->set_rules('comment_email', lang('Email', 'comments'), 'trim|required|xss_clean|valid_email');
473
            $this->form_validation->set_rules('comment_author', lang('Your name', 'comments'), 'trim|required|xss_clean|max_length[50]');
474
            $this->form_validation->set_rules('comment_site', lang('Site', 'comments'), 'trim|xss_clean|max_length[250]');
475
        }
476
477
        // Check captcha code if captcha_check enabled and user in not admin.
478
        if ($this->use_captcha == TRUE AND $this->dx_auth->is_admin() == FALSE) {