[geeklog-devel] PLG_uninstall

Joe Mucchiello joe at ThrowingDice.com
Mon Feb 11 19:19:07 EST 2008


At 07:06 PM 2/11/2008, Joe Mucchiello wrote:
>This code is only called if the plugin in question does not use the 
>new autouninstall function.
>
>         if ($retval === true) {
>             $plg = array_search ($type, $_PLUGINS);
>             if ($plg !== false) {
>                 unset ($_PLUGINS[$plg]);
>             }
>             return true;
>         }
>     }
>


Ooops, I wasn't done.

                 DB_query("DELETE FROM 
{$_TABLES['group_assignments']} WHERE ug_main_grp_id = $grp_id");
The group removal code should check both ug_main_grp_id and 
ug_grp_id. The Admin may have added a plugin group to another group.

                 DB_query ("DELETE FROM {$_TABLES['access']} WHERE 
acc_ft_id = $access_id");
This table should also be cleaned by group. The Admin may have 
granted extra rights to a plugin's group.

The speedlimit table should be cleaned by this function. It probably 
needs to be an array since a plugin could have more than one thing to throttle.


----
Joe Mucchiello
Throwing Dice Games
http://www.throwingdice.com 




More information about the geeklog-devel mailing list