Hi petitssuisses,
I'm reviewing the code of [extension by petitssuisses] Share Album and I have some questions/feedbacks.
* Uninstall
Instead of performing deletes in tables user_access + user_infos + users (without using the configurable column names), you'd better use the delete_user function : much more reliable/complete and providing a trigger for other plugins.
Same for groups with delete_groups function.
* Install
You have 2 different codes for methods "install" and "update" in your ShareAlbum_maintain class. I do prefer doing, like in Community, something like:
function update($old_version, $new_version, &$errors=array()) { $this->install($new_version, $errors); }
and in the "install" method you check the existence of such table/column before adding it. Both ways work, but I like the one I use on Community better. It avoids code duplication.
Offline
Hi,
Thanks for the suggestions, they completely make sense.
Code is being updated, will be released in 12.2
Cheers
Offline
Hi,
Seems fine BUT I have encountered a problem. I had to manually ask for a purge of compiled templates in order to see the new version of the configuration page. I don't understand why yet.
Offline