Code Duplication    Length = 9-9 lines in 2 locations

index.php 1 location

@@ 94-102 (lines=9) @@
91
$criteria       = new \CriteriaCompo();
92
$article_prefix = '';
93
/* Specific category */
94
if ($category_id > 0) {
95
    $category_obj = $categoryHandler->get($category_id);
96
    $criteria->add(new \Criteria('bc.cat_id', $category_id));
97
    $uid            = 0;
98
    $blog_id        = 0;
99
    $category_data  = ['id' => $category_id, 'title' => $category_obj->getVar('cat_title')];
100
    $query_type     = 'category';
101
    $article_prefix = 'a.';
102
}
103
/* Specific blog */
104
if ($blog_id > 0) {
105
    $blog_obj = $blogHandler->get($blog_id);

view.blogs.php 1 location

@@ 87-95 (lines=9) @@
84
$criteria    = new \CriteriaCompo();
85
$blog_prefix = '';
86
/* Specific category */
87
if ($category_id > 0) {
88
    $category_obj = $categoryHandler->get($category_id);
89
    $criteria->add(new \Criteria('bc.cat_id', $category_id));
90
    $uid           = 0;
91
    $blog_id       = 0;
92
    $category_data = ['id' => $category_id, 'title' => $category_obj->getVar('cat_title')];
93
    $query_type    = 'category';
94
    $blog_prefix   = 'b.';
95
}
96
97
/* User bookmarks(favorites) */
98
if ($uid > 0) {