[geeklog-cvs] geeklog: Let users with user.mail permissions only email groups ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Feb 1 03:49:16 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3ccf161b2de2
changeset: 6742:3ccf161b2de2
user: Dirk Haun <dirk at haun-online.de>
date: Sat Jan 31 22:44:58 2009 +0100
description:
Let users with user.mail permissions only email groups that they are in themselves
diffstat:
2 files changed, 13 insertions(+), 15 deletions(-)
public_html/admin/mail.php | 26 +++++++++++---------------
public_html/docs/history | 2 ++
diffs (69 lines):
diff -r 39b5799ac006 -r 3ccf161b2de2 public_html/admin/mail.php
--- a/public_html/admin/mail.php Sat Jan 31 22:17:59 2009 +0100
+++ b/public_html/admin/mail.php Sat Jan 31 22:44:58 2009 +0100
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.5 |
+// | Geeklog 1.6 |
// +---------------------------------------------------------------------------+
// | mail.php |
// | |
// | Geeklog mail administration page. |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2001-2008 by the following authors: |
+// | Copyright (C) 2001-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Dirk Haun - dirk AT haun-online DOT de |
@@ -29,8 +29,6 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
-//
-// $Id: mail.php,v 1.37 2008/05/27 20:53:10 dhaun Exp $
require_once '../lib-common.php';
require_once 'auth.inc.php';
@@ -72,19 +70,17 @@
$mail_templates->set_var ('lang_note', $LANG31[19]);
$mail_templates->set_var ('lang_to', $LANG31[18]);
$mail_templates->set_var ('lang_selectgroup', $LANG31[25]);
+
+ $thisUsersGroups = SEC_getUserGroups();
+ uksort($thisUsersGroups, 'strcasecmp');
$group_options = '';
- $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']);
+ foreach ($thisUsersGroups as $groupName => $groupID) {
+ if ($groupName != 'All Users') {
+ $group_options .= '<option value="' . $groupID . '">' . $groupName
+ . '</option>';
+ }
}
- asort ($groups);
- foreach ($groups as $groupID => $groupName) {
- $group_options .= '<option value="' . $groupID . '">' . $groupName
- . '</option>';
- }
+
$mail_templates->set_var ('group_options', $group_options);
$mail_templates->set_var ('lang_from', $LANG31[2]);
$mail_templates->set_var ('site_name', $_CONF['site_name']);
diff -r 39b5799ac006 -r 3ccf161b2de2 public_html/docs/history
--- a/public_html/docs/history Sat Jan 31 22:17:59 2009 +0100
+++ b/public_html/docs/history Sat Jan 31 22:44:58 2009 +0100
@@ -11,6 +11,8 @@
+ (TBD) Comment moderation and editable comments, by Jared Wenerd
Other changes:
+- Let users with user.mail permissions only email groups that they are in
+ themselves [Dirk]
- Gave the Groups and User editors a facelift. Requires a new template file,
admin/lists/inline.thtml [Dirk]
- Add new permissions plugin.install and plugin.upload for more fine-grained
More information about the geeklog-cvs
mailing list