Procházet zdrojové kódy

Merge pull request #1423 from jloguercio/1.11.x

Fix Next or previous button while the item position is first or last - Refs BT#11192
José Loguercio před 8 roky
rodič
revize
438ecf0fb5
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      main/lp/learnpath.class.php

+ 3 - 3
main/lp/learnpath.class.php

@@ -11161,9 +11161,9 @@ EOD;
         $lpItemId = [];
 
         $typeListNotToVerify = self::getChapterTypes();
-        foreach ($this->items as $item) {
-            if (!in_array($item->get_type(), $typeListNotToVerify)) {
-                $lpItemId[] = $item->get_id();
+        foreach ($this->get_toc() as $item) {
+            if (!in_array($item['type'], $typeListNotToVerify)) {
+                $lpItemId[] = $item['id'];
             }
         }