Code Duplication    Length = 5-5 lines in 4 locations

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

@@ 3075-3079 (lines=5) @@
3072
                    $whereConditions
3073
                $orderBy
3074
                ";
3075
        if (isset($from) && isset($limit)) {
3076
            $from = intval($from);
3077
            $limit = intval($limit);
3078
            $sql .= " LIMIT $from, $limit";
3079
        }
3080
3081
        $result = Database::query($sql);
3082

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

@@ 551-555 (lines=5) @@
548
        }
549
550
        $limit_text = '';
551
        if (isset($from) && isset($limit)) {
552
            $from = intval($from);
553
            $limit = intval($limit);
554
            $limit_text = "LIMIT $from, $limit";
555
        }
556
557
        if (count($relation_type) == 0) {
558
            $where_relation_condition = '';

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

@@ 3320-3324 (lines=5) @@
3317
            return $row['count'];
3318
        }
3319
3320
        if (isset($from) && isset($limit)) {
3321
            $from = intval($from);
3322
            $limit = intval($limit);
3323
            $sql .= " LIMIT $from, $limit";
3324
        }
3325
3326
        $result = Database::query($sql);
3327
        $num_rows = Database::num_rows($result);

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

@@ 1894-1898 (lines=5) @@
1891
        }
1892
1893
        $limit_text = '';
1894
        if (isset($from) && isset($limit)) {
1895
            $from = intval($from);
1896
            $limit = intval($limit);
1897
            $limit_text = "LIMIT $from, $limit";
1898
        }
1899
1900
        if (count($relation_type) == 0) {
1901
            $where_relation_condition = '';