Code Duplication    Length = 5-5 lines in 5 locations

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/usergroup.lib.php 1 location

@@ 1900-1904 (lines=5) @@
1897
        }
1898
1899
        $limit_text = '';
1900
        if (isset($from) && isset($limit)) {
1901
            $from = intval($from);
1902
            $limit = intval($limit);
1903
            $limit_text = "LIMIT $from, $limit";
1904
        }
1905
1906
        if (count($relation_type) == 0) {
1907
            $where_relation_condition = '';

main/exercice/exercise.class.php 1 location

@@ 615-619 (lines=5) @@
612
613
            $limitCondition = null;
614
615
            if (isset($start) && isset($limit)) {
616
                $start = intval($start);
617
                $limit = intval($limit);
618
                $limitCondition = " LIMIT $start, $limit";
619
            }
620
            $sql .= $limitCondition;
621
            $result = Database::query($sql);
622
            $questions = array();

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

@@ 3333-3337 (lines=5) @@
3330
            return $row['count'];
3331
        }
3332
3333
        if (isset($from) && isset($limit)) {
3334
            $from = intval($from);
3335
            $limit = intval($limit);
3336
            $sql .= " LIMIT $from, $limit";
3337
        }
3338
3339
        $result = Database::query($sql);
3340
        $num_rows = Database::num_rows($result);

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

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