Code Duplication    Length = 6-6 lines in 2 locations

main/work/work.lib.php 2 locations

@@ 1251-1256 (lines=6) @@
1248
    }
1249
1250
1251
    if (!empty($group_id)) {
1252
        // set to select only messages posted by the user's group
1253
        $extra_conditions = " work.post_group_id = '".intval($groupIid)."' ";
1254
    } else {
1255
        $extra_conditions = " (work.post_group_id = '0' or work.post_group_id IS NULL) ";
1256
    }
1257
1258
    if ($is_allowed_to_edit) {
1259
        $extra_conditions .= ' AND work.active IN (0, 1) ';
@@ 1896-1901 (lines=6) @@
1893
    }
1894
1895
    if (!empty($work_data)) {
1896
        if (!empty($group_id)) {
1897
            $extra_conditions = " work.post_group_id = '".intval($groupIid)."' ";
1898
            // set to select only messages posted by the user's group
1899
        } else {
1900
            $extra_conditions = " (work.post_group_id = '0' OR work.post_group_id is NULL) ";
1901
        }
1902
1903
        if ($is_allowed_to_edit || $isDrhOfCourse) {
1904
            $extra_conditions .= ' AND work.active IN (0, 1) ';