Code Duplication    Length = 4-4 lines in 2 locations

index.php 1 location

@@ 294-297 (lines=4) @@
291
$xoopsTpl->assign('is_list', !empty($list));
292
293
$xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
294
if (empty($helper->getConfig('anonymous_rate')) && !is_object($xoopsUser)) {
295
} elseif ($blog_id > 0) {
296
    $xoopsTpl->assign('canrate', 1);
297
}
298
299
$sort_link   = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . (empty($blog_id) ? '' : '/b' . $blog_id) . (empty($list) ? '' : '/l1');
300
$valid_sorts = [

view.blogs.php 1 location

@@ 238-241 (lines=4) @@
235
$xoopsTpl->assign('is_list', !empty($list));
236
237
$xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
238
if (empty($helper->getConfig('anonymous_rate')) && !is_object($xoopsUser)) {
239
} elseif (!$list) {
240
    $xoopsTpl->assign('canrate', 1);
241
}
242
243
$sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER;
244
$vars      = [];