Code Duplication    Length = 13-13 lines in 2 locations

index.php 1 location

@@ 136-148 (lines=13) @@
133
    $article_prefix = '';
134
}
135
/* User bookmarks(favorites) */
136
if ($uid > 0) {
137
    $criteria->add(new Criteria('bm.bm_uid', $uid));
138
    $category_id      = 0;
139
    $blog_id          = 0;
140
    $bookmark_handler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
141
    $user_data        = array(
142
        'uid'   => $uid,
143
        'name'  => XoopsUser::getUnameFromId($uid),
144
        'marks' => $bookmark_handler->getCount(new Criteria('bm_uid', $uid))
145
    );
146
    $query_type       = 'bookmark';
147
    $article_prefix   = 'a.';
148
}
149
150
/* Sort */
151
$order = 'DESC';

view.blogs.php 1 location

@@ 93-105 (lines=13) @@
90
}
91
92
/* User bookmarks(favorites) */
93
if ($uid > 0) {
94
    $criteria->add(new Criteria('bm.bm_uid', $uid));
95
    $category_id      = 0;
96
    $blog_id          = 0;
97
    $bookmark_handler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
98
    $user_data        = array(
99
        'uid'   => $uid,
100
        'name'  => XoopsUser::getUnameFromId($uid),
101
        'marks' => $bookmark_handler->getCount(new Criteria('bm_uid', $uid))
102
    );
103
    $query_type       = 'bookmark';
104
    $blog_prefix      = 'b.';
105
}
106
107
$criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>'));
108