[geeklog-cvs] geeklog-1.3/public_html/admin/plugins/staticpages index.php,1.18,1.19 install.php,1.9,1.10

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/plugins/staticpages
In directory internal.geeklog.net:/tmp/cvs-serv3643/public_html/admin/plugins/staticpages

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


Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/plugins/staticpages/index.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** index.php	10 Mar 2003 18:36:01 -0000	1.18
--- index.php	11 Mar 2003 17:00:57 -0000	1.19
***************
*** 232,236 ****
  
      if (!empty ($sp_id) && $mode == 'edit') {
!         $result = DB_query ("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']} WHERE sp_id = '$sp_id' AND " . SP_getPerms ('', '3'));
          $A = DB_fetchArray ($result);
          $A['sp_old_id'] = $A['sp_id'];
--- 232,240 ----
  
      if (!empty ($sp_id) && $mode == 'edit') {
!         $perms = SP_getPerms ('', '3');
!         if (!empty ($perms)) {
!             $perms = ' AND ' . $perms;
!         }
!         $result = DB_query ("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']} WHERE sp_id = '$sp_id'" . $perms);
          $A = DB_fetchArray ($result);
          $A['sp_old_id'] = $A['sp_id'];
***************
*** 241,245 ****
          $A['sp_old_id'] = '';
      } elseif (!empty ($sp_id) && $mode == 'clone') {
!         $result = DB_query ("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']} WHERE sp_id = '$sp_id' AND " . SP_getPerms ('', '3'));
          $A = DB_fetchArray ($result);
          $A['sp_id'] = COM_makesid ();
--- 245,253 ----
          $A['sp_old_id'] = '';
      } elseif (!empty ($sp_id) && $mode == 'clone') {
!         $perms = SP_getPerms ('', '3');
!         if (!empty ($perms)) {
!             $perms = ' AND ' . $perms;
!         }
!         $result = DB_query ("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']} WHERE sp_id = '$sp_id'" . $perms);
          $A = DB_fetchArray ($result);
          $A['sp_id'] = COM_makesid ();
***************
*** 283,287 ****
  	//$limit = (50 * $page) - 50;
  	//$result = DB_query("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']} ORDER BY sp_date DESC LIMIT $limit,50");
! 	$result = DB_query("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']} WHERE " . SP_getPerms('','3') . " ORDER BY sp_date DESC");
  	$nrows = DB_numRows($result);
  	if ($nrows > 0) {
--- 291,299 ----
  	//$limit = (50 * $page) - 50;
  	//$result = DB_query("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']} ORDER BY sp_date DESC LIMIT $limit,50");
!         $perms = SP_getPerms ('', '3');
!         if (!empty ($perms)) {
!             $perms = ' WHERE ' . $perms;
!         }
! 	$result = DB_query("SELECT *,UNIX_TIMESTAMP(sp_date) AS unixdate FROM {$_TABLES['staticpage']}" . $perms . " ORDER BY sp_date DESC");
  	$nrows = DB_numRows($result);
  	if ($nrows > 0) {

Index: install.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/plugins/staticpages/install.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** install.php	9 Mar 2003 11:47:22 -0000	1.9
--- install.php	11 Mar 2003 17:00:57 -0000	1.10
***************
*** 81,85 ****
          . "owner_id mediumint(8) unsigned NOT NULL default '1',"
          . "perm_owner tinyint(1) unsigned NOT NULL default '3',"
!         . "perm_group tinyint(1) unsigned NOT NULL default '3',"
          . "perm_members tinyint(1) unsigned NOT NULL default '2',"
          . "perm_anon tinyint(1) unsigned NOT NULL default '2',"
--- 81,85 ----
          . "owner_id mediumint(8) unsigned NOT NULL default '1',"
          . "perm_owner tinyint(1) unsigned NOT NULL default '3',"
!         . "perm_group tinyint(1) unsigned NOT NULL default '2',"
          . "perm_members tinyint(1) unsigned NOT NULL default '2',"
          . "perm_anon tinyint(1) unsigned NOT NULL default '2',"





More information about the geeklog-cvs mailing list