[geeklog-cvs] geeklog-1.3/public_html/admin/install install.php,1.55,1.56

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Sat Sep 20 13:36:23 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin/install
In directory geeklog_prod:/tmp/cvs-serv1010

Modified Files:
	install.php 
Log Message:
Remove any unused entries from the group_assignments table (left over from deleted groups) during the upgrade.


Index: install.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/install/install.php,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** install.php	8 Sep 2003 20:49:14 -0000	1.55
--- install.php	20 Sep 2003 17:36:20 -0000	1.56
***************
*** 513,516 ****
--- 513,528 ----
              }
  
+             // remove unused entries left over from deleted groups
+             $result = DB_query ("SELECT grp_id FROM {$_TABLES['groups']}");
+             $num = DB_numRows ($result);
+             $groups = array ();
+             for ($i = 0; $i < $num; $i++) {
+                 $A = DB_fetchArray ($result);
+                 $groups[] = $A['grp_id'];
+             }
+             $grouplist = '(' . implode (',', $groups) . ')';
+ 
+             DB_query ("DELETE FROM {$_TABLES['group_assignments']} WHERE (ug_main_grp_id NOT IN $grouplist) OR (ug_grp_id NOT IN $grouplist)");
+ 
              $current_gl_version = '1.3.9';
              $_SQL = '';





More information about the geeklog-cvs mailing list