[geeklog-cvs] geeklog-1.3/public_html/admin/install install.php,1.44,1.45

dhaun at geeklog.net dhaun at geeklog.net
Tue Mar 11 12:00:59 EST 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin/install
In directory internal.geeklog.net:/tmp/cvs-serv3643/public_html/admin/install

Modified Files:
	install.php 
Log Message:
Fixed problems with static pages permissions.


Index: install.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/install/install.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** install.php	9 Mar 2003 18:10:26 -0000	1.44
--- install.php	11 Mar 2003 17:00:56 -0000	1.45
***************
*** 404,408 ****
                      . "ADD COLUMN owner_id mediumint(8) unsigned DEFAULT '1',"
                      . "ADD COLUMN perm_owner tinyint(1) unsigned DEFAULT '3',"
!                     . "ADD COLUMN perm_group tinyint(1) unsigned DEFAULT '3',"
                      . "ADD COLUMN perm_members tinyint(1) unsigned DEFAULT '2',"
                      . "ADD COLUMN perm_anon tinyint(1) unsigned DEFAULT '2',"
--- 404,408 ----
                      . "ADD COLUMN owner_id mediumint(8) unsigned DEFAULT '1',"
                      . "ADD COLUMN perm_owner tinyint(1) unsigned DEFAULT '3',"
!                     . "ADD COLUMN perm_group tinyint(1) unsigned DEFAULT '2',"
                      . "ADD COLUMN perm_members tinyint(1) unsigned DEFAULT '2',"
                      . "ADD COLUMN perm_anon tinyint(1) unsigned DEFAULT '2',"
***************
*** 429,432 ****
--- 429,441 ----
                  // remove Static Pages Admin group id
                  DB_query ("DELETE FROM {$_TABLES['vars']} WHERE name = 'sp_group_id'");
+ 
+                 if ($spversion == 1) {
+                     $result = DB_query ("SELECT DISTINCT sp_uid FROM {$_TABLES['staticpage']}");
+                     $authors = DB_numRows ($result);
+                     for ($i = 0; $i < $authors; $i++) {
+                         $A = DB_fetchArray ($result);
+                         DB_query ("UPDATE {$_TABLES['staticpage']} SET owner_id = '{$A['sp_uid']}' WHERE sp_uid = '{$A['sp_uid']}'");
+                     }
+                 }
              }
  





More information about the geeklog-cvs mailing list