[geeklog-cvs] geeklog: E_ALL fixes for COM_getPermTag() usage in the Calendar ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Jan 9 04:16:48 EST 2011
changeset 8045:0c7b968d333b
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/0c7b968d333b
user: Dirk Haun <dirk at haun-online.de>
date: Sun Jan 09 10:16:41 2011 +0100
description:
E_ALL fixes for COM_getPermTag() usage in the Calendar plugin
diffstat:
plugins/calendar/functions.inc | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diffs (41 lines):
diff -r 47a9753a1a05 -r 0c7b968d333b plugins/calendar/functions.inc
--- a/plugins/calendar/functions.inc Sat Jan 08 16:35:32 2011 -0500
+++ b/plugins/calendar/functions.inc Sun Jan 09 10:16:41 2011 +0100
@@ -381,7 +381,7 @@
global $_CA_CONF, $_GROUPS, $_TABLES;
// The eventsubmission table only keeps track of the submitter's uid,
- // but not of grous and permissions. So set those to sensible defaults.
+ // but not of groups and permissions. So set those to sensible defaults.
if (isset($_GROUPS['Calendar Admin'])) {
$group_id = $_GROUPS['Calendar Admin'];
@@ -1162,15 +1162,22 @@
} else {
$flag = false;
}
-
- $group_id = $_GROUPS['Calendar Admin'];
+ $tagnames = array();
+
+ if (isset($_GROUPS['Calendar Admin'])) {
+ $group_id = $_GROUPS['Calendar Admin'];
+ } else {
+ $group_id = DB_getItem($_TABLES['groups'], 'grp_id',
+ "grp_name = 'Calendar Admin'");
+ }
$owner_id = 2; // Admin
+
if (COM_getPermTag($owner_id, $group_id, $_CA_CONF['autotag_permissions_event'][0], $_CA_CONF['autotag_permissions_event'][1], $_CA_CONF['autotag_permissions_event'][2], $_CA_CONF['autotag_permissions_event'][3]) == $flag) {
- $tagname[] = 'event';
+ $tagnames[] = 'event';
}
-
- if (is_array($tagname)) {
- return $tagname;
+
+ if (count($tagnames) > 0) {
+ return $tagnames;
}
} elseif ($op == 'description') {
return array (
More information about the geeklog-cvs
mailing list