[geeklog-cvs] geeklog: Creation of multiple plugin groups needs to be fixed in...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Oct 17 09:22:40 EDT 2009


changeset 7381:e02d71d401c3
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e02d71d401c3
user: Dirk Haun <dirk at haun-online.de>
date: Sat Oct 17 13:26:13 2009 +0200
description:
Creation of multiple plugin groups needs to be fixed in the install script, too

diffstat:

 public_html/admin/install/lib-install.php |  16 +++++++++-------
 public_html/docs/history                  |   1 +
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r eda2a40b633c -r e02d71d401c3 public_html/admin/install/lib-install.php
--- a/public_html/admin/install/lib-install.php	Sat Oct 17 13:12:44 2009 +0200
+++ b/public_html/admin/install/lib-install.php	Sat Oct 17 13:26:13 2009 +0200
@@ -874,18 +874,20 @@
 
     // Add plugin's Admin group to the Root user group 
     // (assumes that the Root group's ID is always 1)
-    if ($admin_group_id > 1) {
+    if (count($groups) > 0) {
         if ($verbose) {
             COM_errorLog("Attempting to give all users in the Root group access to the '$plugin' Admin group", 1);
         }
 
-        DB_query("INSERT INTO {$_TABLES['group_assignments']} VALUES "
-                 . "($admin_group_id, NULL, 1)");
-        if (DB_error()) {
-            COM_errorLog('Error adding plugin admin group to Root group', 1);
-            PLG_uninstall($plugin);
+        foreach ($groups as $key => $value) {
+            DB_query("INSERT INTO {$_TABLES['group_assignments']} VALUES "
+                     . "($admin_group_id, NULL, 1)");
+            if (DB_error()) {
+                COM_errorLog('Error adding plugin admin group to Root group', 1);
+                PLG_uninstall($plugin);
 
-            return false;
+                return false;
+            }
         }
     }
 
diff -r eda2a40b633c -r e02d71d401c3 public_html/docs/history
--- a/public_html/docs/history	Sat Oct 17 13:12:44 2009 +0200
+++ b/public_html/docs/history	Sat Oct 17 13:26:13 2009 +0200
@@ -6,6 +6,7 @@
 - Fixed a long-standing quirk of the submission handling where the "Submissions"
   entry in the Admins Block wasn't updated after accepting / rejecting a
   submission [Dirk]
+- Fixed creation of multiple plugin groups in plugin autoinstall [Randy, Dirk]
 - Added new option $_CONF['article_comment_close_enabled'] to enable/disable
   automatically closing stories for comments after a certain amount of days
   (bug #0000959). Changed handling of comment_expire field in gl_stories such



More information about the geeklog-cvs mailing list