Code Duplication    Length = 5-5 lines in 3 locations

application/modules/admin/pages.php 2 locations

@@ 484-488 (lines=5) @@
481
        if ($this->form_validation->run($this) == FALSE) {
482
            showMessage(validation_errors(), false, 'r');
483
        } else {
484
            if ($this->input->post('page_url') == '' or $this->input->post('page_url') == NULL) {
485
                $url = $this->createUrl($this->input->post('page_title'));
486
            } else {
487
                $url = $this->input->post('page_url');
488
            }
489
490
            // check if we have existing module with entered URL
491
            $this->db->where('name', $url);
@@ 107-111 (lines=5) @@
104
105
            $def_lang = $this->cms_admin->get_default_lang();
106
107
            if ($this->input->post('page_url') == '' or $this->input->post('page_url') == NULL) {
108
                $url = $this->createUrl($this->input->post('page_title'));
109
            } else {
110
                $url = $this->input->post('page_url');
111
            }
112
113
            // check if we have existing module with entered URL
114
            $this->db->where('name', $url);

application/modules/admin/categories.php 1 location

@@ 247-251 (lines=5) @@
244
     */
245
    private function formUrl() {
246
        // Create category URL
247
        if ($this->input->post('url') == null || $this->input->post('url') == '') {
248
            $url = $this->createUrl($this->input->post('name'));
249
        } else {
250
            $url = $this->input->post('url');
251
        }
252
        $url = mb_strlen($url) === 1 ? str_repeat($url, 2) : $url;
253
254
        return $url;