Code Duplication    Length = 6-6 lines in 3 locations

include/read_configs.php 3 locations

@@ 102-107 (lines=6) @@
99
        $sql             = "SELECT cid,pid,cat_shorttitle,cat_title,cat_desc,color,ismenuitem,cat_depth,canbemain FROM $cal->cat_table ORDER BY weight";
100
        $rs              = $GLOBALS['xoopsDB']->query($sql);
101
        $cal->categories = array();
102
        while ($cat = $GLOBALS['xoopsDB']->fetchObject($rs)) {
103
            $cal->categories[(int)$cat->cid] = $cat;
104
            if ($cat->canbemain == 1) {
105
                $cal->canbemain_cats[(int)$cat->cid] = $cat;
106
            }
107
        }
108
109
        // ����Ԥ������롼�פ�����ǽ
110
        $cal->groups =& $system_groups;
@@ 129-134 (lines=6) @@
126
                           . " ON cid=gperm_itemid WHERE gperm_name='apcal_cat' AND gperm_modid='$mid' AND enabled AND gperm_groupid IN $ids4sql ORDER BY weight";
127
        $rs              = $GLOBALS['xoopsDB']->query($sql);
128
        $cal->categories = array();
129
        while ($cat = $GLOBALS['xoopsDB']->fetchObject($rs)) {
130
            $cal->categories[(int)$cat->cid] = $cat;
131
            if ($cat->canbemain == 1) {
132
                $cal->canbemain_cats[(int)$cat->cid] = $cat;
133
            }
134
        }
135
136
        // ���̥桼���Υ��?�Х븢��
137
        if ($users_authority & 256) {
@@ 205-210 (lines=6) @@
202
                       . "' ORDER BY weight";
203
    $rs              = $GLOBALS['xoopsDB']->query($sql);
204
    $cal->categories = array();
205
    while ($cat = $GLOBALS['xoopsDB']->fetchObject($rs)) {
206
        $cal->categories[(int)$cat->cid] = $cat;
207
        if ($cat->canbemain == 1) {
208
            $cal->canbemain_cats[(int)$cat->cid] = $cat;
209
        }
210
    }
211
212
    // �����ȤΥ��?�Х븢��
213
    $user_id              = 0;