Code Duplication    Length = 3-3 lines in 2 locations

main/lp/learnpath.class.php 2 locations

@@ 1862-1864 (lines=3) @@
1859
            if ($this->debug > 2) {
1860
                error_log('$index '.$index);
1861
            }
1862
            if ($this->debug > 2) {
1863
                error_log('New LP - In learnpath::first() - No last item seen. New last = '.$this->last.'('.$this->ordered_items[$index].')', 0);
1864
            }
1865
        }
1866
        if ($this->debug > 2) {
1867
            error_log('New LP - In learnpath::first() - First item is '.$this->get_current_item_id());
@@ 2035-2037 (lines=3) @@
2032
        // TODO
2033
        $index = $this->index;
2034
        $index++;
2035
        if ($this->debug > 2) {
2036
            error_log('New LP - Now looking at ordered_items['.($index).'] - type is '.$this->items[$this->ordered_items[$index]]->type, 0);
2037
        }
2038
        while (!empty ($this->ordered_items[$index]) AND ($this->items[$this->ordered_items[$index]]->get_type() == 'dir') AND $index < $this->max_ordered_items) {
2039
            $index++;
2040
            if ($index == $this->max_ordered_items) {