We sometimes have categories with a book inside the category with the same title. For example, the category "Zohar" has the book "Zohar" inside of it. The Category Editor doesn't work properly in this case.
Code Changes
The Category Editor previously would look to re-order a book without checking that its path is inside the category being re-ordered. This was a reasonable assumption to make in most situations, but in the above case, this means that the book "Zohar" could get re-ordered when the intention was to re-order the category "Zohar". I fixed this by only looking for books to re-order that are actually inside the category being re-ordered. In the code, this means an Index is only loaded when its categories property is identical to the cat_path being re-ordered.
Description
We sometimes have categories with a book inside the category with the same title. For example, the category "Zohar" has the book "Zohar" inside of it. The Category Editor doesn't work properly in this case.
Code Changes
The Category Editor previously would look to re-order a book without checking that its path is inside the category being re-ordered. This was a reasonable assumption to make in most situations, but in the above case, this means that the book "Zohar" could get re-ordered when the intention was to re-order the category "Zohar". I fixed this by only looking for books to re-order that are actually inside the category being re-ordered. In the code, this means an Index is only loaded when its
categories
property is identical to thecat_path
being re-ordered.