Code Duplication    Length = 5-5 lines in 3 locations

main/exercise/exercise.class.php 1 location

@@ 603-607 (lines=5) @@
600
601
            $limitCondition = null;
602
603
            if (isset($start) && isset($limit)) {
604
                $start = intval($start);
605
                $limit = intval($limit);
606
                $limitCondition = " LIMIT $start, $limit";
607
            }
608
            $sql .= $limitCondition;
609
            $result = Database::query($sql);
610
            $questions = array();

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

@@ 4238-4242 (lines=5) @@
4235
4236
        $limitCondition = '';
4237
4238
        if (isset($from) && isset($numberItems)) {
4239
            $from = intval($from);
4240
            $numberItems = intval($numberItems);
4241
            $limitCondition = "LIMIT $from, $numberItems";
4242
        }
4243
4244
        $column = Database::escape_string($column);
4245
        $direction = in_array(strtolower($direction), array('asc', 'desc')) ? $direction : null;

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

@@ 5205-5209 (lines=5) @@
5202
5203
        $limitCondition = null;
5204
5205
        if (isset($from) && isset($numberItems)) {
5206
            $from = intval($from);
5207
            $numberItems = intval($numberItems);
5208
            $limitCondition = "LIMIT $from, $numberItems";
5209
        }
5210
5211
        $urlId = api_get_current_access_url_id();
5212