Code Duplication    Length = 3-3 lines in 2 locations

main/lp/learnpath.class.php 2 locations

@@ 1842-1844 (lines=3) @@
1839
            if ($this->debug > 2) {
1840
                error_log('$index '.$index);
1841
            }
1842
            if ($this->debug > 2) {
1843
                error_log('New LP - In learnpath::first() - No last item seen. New last = '.$this->last.'('.$this->ordered_items[$index].')', 0);
1844
            }
1845
        }
1846
        if ($this->debug > 2) {
1847
            error_log('New LP - In learnpath::first() - First item is '.$this->get_current_item_id());
@@ 2015-2017 (lines=3) @@
2012
        // TODO
2013
        $index = $this->index;
2014
        $index++;
2015
        if ($this->debug > 2) {
2016
            error_log('New LP - Now looking at ordered_items['.($index).'] - type is '.$this->items[$this->ordered_items[$index]]->type, 0);
2017
        }
2018
        while (!empty ($this->ordered_items[$index]) AND ($this->items[$this->ordered_items[$index]]->get_type() == 'dir') AND $index < $this->max_ordered_items) {
2019
            $index++;
2020
            if ($index == $this->max_ordered_items) {