AlexSheer / phpBB3.2-STK

Support ToolKit For phpBB3.2.x
https://www.phpbbguru.net/community/viewtopic.php?f=64&t=42862
15 stars 13 forks source link

Two minor issues #24

Closed kasimi closed 5 years ago

kasimi commented 6 years ago

In includes/database_cleaner/database_cleaner_controller.php:

Galixte commented 5 years ago

Hi @AlexSheer,

could you take a look, please?

AlexSheer commented 5 years ago
* line 1054: `$acp_tools = new acp_modules();` should be moved outsite of the if-bloc

For what reason?

* line 847: `$reason_id` is undefined

Probably need so WHERE reason_id = ' . (int) $row['reason_id'];

kasimi commented 5 years ago

For what reason?

If the class acp_modules is already loaded $acp_tools is not created. When trying to delete a module it will throw an error because $acp_tools is undefined. To be more precise, $acp_tools should be created after the if block.

Probably need so WHERE reason_id = ' . (int) $row['reason_id'];

Yes, like on this line: https://github.com/AlexSheer/phpBB3.2-STK/blob/ff1971f6282f4b13dab50fe5309c4dfed105e84b/includes/database_cleaner/database_cleaner_controller.php#L829

AlexSheer commented 5 years ago

Done! https://github.com/AlexSheer/phpBB3.2-STK/commit/dc2d81b03592e30ec45cfa6cbb4e48c87a4312d0#diff-9e36e6438479140c8ea2fce9ec175815