public_html/admin/install/lib-install.php
branchHEAD
changeset 7381 e02d71d401c3
parent 7299 dd4e3922f617
child 7427 7915c1f5f403
     1.1 --- a/public_html/admin/install/lib-install.php	Thu Sep 10 10:06:32 2009 +0200
     1.2 +++ b/public_html/admin/install/lib-install.php	Sat Oct 17 13:26:13 2009 +0200
     1.3 @@ -874,18 +874,20 @@
     1.4  
     1.5      // Add plugin's Admin group to the Root user group 
     1.6      // (assumes that the Root group's ID is always 1)
     1.7 -    if ($admin_group_id > 1) {
     1.8 +    if (count($groups) > 0) {
     1.9          if ($verbose) {
    1.10              COM_errorLog("Attempting to give all users in the Root group access to the '$plugin' Admin group", 1);
    1.11          }
    1.12  
    1.13 -        DB_query("INSERT INTO {$_TABLES['group_assignments']} VALUES "
    1.14 -                 . "($admin_group_id, NULL, 1)");
    1.15 -        if (DB_error()) {
    1.16 -            COM_errorLog('Error adding plugin admin group to Root group', 1);
    1.17 -            PLG_uninstall($plugin);
    1.18 +        foreach ($groups as $key => $value) {
    1.19 +            DB_query("INSERT INTO {$_TABLES['group_assignments']} VALUES "
    1.20 +                     . "($admin_group_id, NULL, 1)");
    1.21 +            if (DB_error()) {
    1.22 +                COM_errorLog('Error adding plugin admin group to Root group', 1);
    1.23 +                PLG_uninstall($plugin);
    1.24  
    1.25 -            return false;
    1.26 +                return false;
    1.27 +            }
    1.28          }
    1.29      }
    1.30