Code Duplication    Length = 13-16 lines in 2 locations

application/modules/mod_discount/models/discount_model_admin.php 1 location

@@ 283-298 (lines=16) @@
280
     * @param integer $id
281
     * @return string|boolean
282
     */
283
    public function getProductById($id) {
284
        $locale = MY_Controller::getCurrentLocale();
285
        $query = $this->db
286
            ->select('name')
287
            ->from('shop_products_i18n')
288
            ->where('id', $id)
289
            ->where('locale', $locale)
290
            ->get()
291
            ->row_array();
292
293
        if ($query) {
294
            return $query['name'];
295
        }
296
297
        return false;
298
    }
299
300
    /**
301
     * Delete discount by id

application/modules/mod_seo/models/seoexpert_model.php 1 location

@@ 81-93 (lines=13) @@
78
     * @param bool|string $locale
79
     * @return bool|int
80
     */
81
    public function getLangIdByLocale($locale = false) {
82
83
        if (!$locale) {
84
            $locale = \MY_Controller::getCurrentLocale();
85
        }
86
87
        $res = $this->db->select('id')->where('identif', $locale)->get('languages')->row_array();
88
        if ($res) {
89
            return $res['id'];
90
        }
91
92
        return false;
93
    }
94
95
    /**
96
     * Get module settings