Code Duplication    Length = 6-6 lines in 2 locations

application/modules/comments/commentsapi.php 2 locations

@@ 232-237 (lines=6) @@
229
            return $id->id;
230
        }
231
232
        if (strstr($url, '/image/')) {
233
            $url = explode(DS, $url);
234
            $url = $url[count($url) - 1];
235
236
            return $url;
237
        }
238
        if (strstr($url, '/album/')) {
239
            $url = explode(DS, $url);
240
            $url = $url[count($url) - 1];
@@ 238-243 (lines=6) @@
235
236
            return $url;
237
        }
238
        if (strstr($url, '/album/')) {
239
            $url = explode(DS, $url);
240
            $url = $url[count($url) - 1];
241
242
            return $url;
243
        }
244
245
        if ($url == site_url()) {
246
            $id = $this->db->select('main_page_id, comments_status')