Code Duplication    Length = 5-5 lines in 2 locations

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

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

main/work/work.lib.php 1 location

@@ 4499-4503 (lines=5) @@
4496
        );
4497
    } else {
4498
        $limitString = null;
4499
        if (!empty($start) && !empty($limit)) {
4500
            $start = intval($start);
4501
            $limit = intval($limit);
4502
            $limitString = " LIMIT $start, $limit";
4503
        }
4504
4505
        $orderBy = null;
4506