trongate / trongate-framework

The Trongate PHP framework
https://trongate.io
Other
1.11k stars 100 forks source link

Add ID Parameter for Deletion in delete_one() Function #158

Closed DaFa66 closed 8 months ago

DaFa66 commented 8 months ago

Addressed a reported bug from michidesign on the Help_bar regarding ineffective execution of the before hook.

The "delete_one()" method in "Standard_endpoints.php" was not sending an 'id' to delete in the passed '$input' array which was being checked in the "_make_sure_delete_allowed" method from the Category Builder module on the Module Market.

This fix:

  1. Ensures proper handling of subcategories, preventing the deletion of a parent category when subcategories exist.
  2. Resolves the issue of subcategories remaining in the table without appearing in categories/manage after deleting a main category.
  3. Enhances Category Builder reliability.