[geeklog-devel] plugin_autoinstall - two more issues
Randy Kolenko
Randy.Kolenko at nextide.ca
Mon Oct 5 14:00:07 EDT 2009
Ben,
That is the same issue.
The solution is to alter admin/plugins.php at line 1035-1048 to look
like this:
if (count($groups) > 1) {
if ($verbose) {
COM_errorLog("Attempting to give all users in the Root group access
to the '$plugin' Admin group", 1);
}
foreach($groups as $key=>$value){
DB_query("INSERT INTO {$_TABLES['group_assignments']} VALUES "
. "($value, NULL, 1)");
if (DB_error()) {
COM_errorLog('Error adding plugin admin group to Root group', 1);
PLG_uninstall($plugin);
return false;
}
}
}
This should be a fix made to the core. If not, then we have to document
in the wiki that the post plugin install routine needs to add in the
group_assignments for root. Otherwise those groups are totally
unusable.
-randy
-----Original Message-----
From: cordiste [mailto:cordiste at free.fr]
Sent: Monday, October 05, 2009 1:36 PM
To: Geeklog Development
Subject: Re: [geeklog-devel] plugin_autoinstall - two more issues
Hello,
Could it be related?
http://www.geeklog.net/forum/viewtopic.php?showtopic=88552
::Ben
2009/10/5 Blaine Lang <devel at portalparts.com>
Two new issues have surfaced while working with the autoinstall -
admin/plugins.php function plugin_do_autoinstall().
1) If the autoinstall fails, then the PLG_uninstall will always fail.
The plugin has not yet been installed and the plugins autouninstall
function is then not found. The code as far as I can see does not do an
include the plugins functions.inc
To duplicate: uninstall the Polls plugin and then manually create a
groups record for 'Polls Admin'
The autoinstall will fail and not be able to recover.
2) If a plugin needs to create multiple groups, they will be created
fine but the plugin_doautoinstall only will create the group_assignments
records for the first created group. Is there a reason the code to
create group_assignment records does not loop through the $groups array?
Is the plan for the autoinstall feature to remove the need for the
admin/plugins/{pi_name}/install.php file entirely ?
I was close to removing until these issues appeared.
Blaine
_______________________________________________
geeklog-devel mailing list
geeklog-devel at lists.geeklog.net
http://eight.pairlist.net/mailman/listinfo/geeklog-devel
More information about the geeklog-devel
mailing list