Code Duplication    Length = 5-5 lines in 2 locations

main/inc/lib/groupmanager.lib.php 1 location

@@ 1036-1040 (lines=5) @@
1033
            $sql .= " ORDER BY $column $direction";
1034
        }
1035
1036
        if (!empty($start) && !empty($limit)) {
1037
            $start = intval($start);
1038
            $limit = intval($limit);
1039
            $sql .= " LIMIT $start, $limit";
1040
        }
1041
        $res = Database::query($sql);
1042
        $users = array();
1043
        while ($obj = Database::fetch_object($res)) {

main/work/work.lib.php 1 location

@@ 4733-4737 (lines=5) @@
4730
        );
4731
    } else {
4732
        $limitString = null;
4733
        if (!empty($start) && !empty($limit)) {
4734
            $start = intval($start);
4735
            $limit = intval($limit);
4736
            $limitString = " LIMIT $start, $limit";
4737
        }
4738
4739
        $orderBy = null;
4740