[geeklog-cvs] geeklog-1.3/public_html/admin mail.php,1.20,1.21

dhaun at geeklog.net dhaun at geeklog.net
Sat Jan 17 15:38:29 EST 2004


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

Modified Files:
	mail.php 
Log Message:
Grant access to users that have 'user.mail' permissions (in addition to users in the 'Mail Admin' group), to be consistent with the display of the "Mail Users" menu entry in lib-common.php. Also sort the group names alphabetically.


Index: mail.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/mail.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** mail.php	13 Jan 2004 19:15:52 -0000	1.20
--- mail.php	17 Jan 2004 20:38:27 -0000	1.21
***************
*** 41,45 ****
  
  // Make sure user has access to this page  
! if (!SEC_inGroup('Mail Admin')) {
      $retval .= COM_siteHeader ('menu');
      $retval .= COM_startBlock ($MESSAGE[30], '',
--- 41,45 ----
  
  // Make sure user has access to this page  
! if (!SEC_inGroup('Mail Admin') && !SEC_hasrights('user.mail')) {
      $retval .= COM_siteHeader ('menu');
      $retval .= COM_startBlock ($MESSAGE[30], '',
***************
*** 77,83 ****
      $result = DB_query("SELECT grp_id, grp_name FROM {$_TABLES['groups']} WHERE grp_name <> 'All Users'");
      $nrows = DB_numRows($result);
!     for ($i = 1; $i <= $nrows; $i++) {
!         $A = DB_fetchArray($result);
!         $group_options .= '<option value="' . $A['grp_id'] . '">' . $A['grp_name'] . '</option>';
      }
      $mail_templates->set_var('group_options', $group_options);
--- 77,89 ----
      $result = DB_query("SELECT grp_id, grp_name FROM {$_TABLES['groups']} WHERE grp_name <> 'All Users'");
      $nrows = DB_numRows($result);
!     $groups = array ();
!     for ($i = 0; $i < $nrows; $i++) {
!         $A = DB_fetchArray ($result);
!         $groups[$A['grp_id']] = ucwords ($A['grp_name']);
!     }
!     asort ($groups);
!     foreach ($groups as $groupID => $groupName) {
!         $group_options .= '<option value="' . $groupID . '">' . $groupName
!                        . '</option>';
      }
      $mail_templates->set_var('group_options', $group_options);





More information about the geeklog-cvs mailing list