Code Duplication    Length = 8-8 lines in 2 locations

application/helpers/language_helper.php 1 location

@@ 282-289 (lines=8) @@
279
280
    $lang_uri = $ci->uri->segment(1);
281
282
    if (in_array($lang_uri, $lan_array_rev)) {
283
        $lang_id = $lan_array[$lang_uri];
284
        $lang_ident = $lang_uri;
285
    } else {
286
        $lang = $ci->db->where('default', 1)->get('languages')->result_array();
287
        $lang_id = $lang[0]['id'];
288
        $lang_ident = $lang[0]['identif'];
289
    }
290
291
    if ($flag == 'id') {
292
        return $lang_id;

application/modules/banners/banners.php 1 location

@@ 156-163 (lines=8) @@
153
        }
154
155
        $lang_uri = $this->uri->segment(1);
156
        if (in_array($lang_uri, $lan_array_rev)) {
157
            $lang_id = $lan_array[$lang_uri];
158
            $lang_ident = $lang_uri;
159
        } else {
160
            $lang = $this->db->where('default', 1)->get('languages')->result_array();
161
            $lang_id = $lang[0]['id'];
162
            $lang_ident = $lang[0]['identif'];
163
        }
164
        if ($flag == 'id') {
165
            return $lang_id;
166
        }