[geeklog-cvs] geeklog: Fixed handling of owner_id for anonymous event submissions
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Oct 3 09:18:56 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c1c6258c8b23
changeset: 7346:c1c6258c8b23
user: Dirk Haun <dirk at haun-online.de>
date: Sat Oct 03 15:08:13 2009 +0200
description:
Fixed handling of owner_id for anonymous event submissions
diffstat:
plugins/calendar/functions.inc | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 1185208e854a -r c1c6258c8b23 plugins/calendar/functions.inc
--- a/plugins/calendar/functions.inc Sat Oct 03 14:50:24 2009 +0200
+++ b/plugins/calendar/functions.inc Sat Oct 03 15:08:13 2009 +0200
@@ -578,9 +578,15 @@
if (($_CA_CONF['eventsubmission'] == 1) &&
!SEC_hasRights('calendar.submit')) {
+ if (COM_isAnonUser()) {
+ $uid = 1;
+ } else {
+ $uid = $_USER['uid'];
+ }
+
DB_save ($_TABLES['eventsubmission'],
'eid,title,event_type,url,datestart,timestart,dateend,timeend,allday,location,address1,address2,city,state,zipcode,description,owner_id',
- "{$A['eid']},'{$A['title']}','{$A['event_type']}','{$A['url']}','{$A['datestart']}','{$A['timestart']}','{$A['dateend']}','{$A['timeend']}',{$A['allday']},'{$A['location']}','{$A['address1']}','{$A['address2']}','{$A['city']}','{$A['state']}','{$A['zipcode']}','{$A['description']}',{$_USER['uid']}");
+ "{$A['eid']},'{$A['title']}','{$A['event_type']}','{$A['url']}','{$A['datestart']}','{$A['timestart']}','{$A['dateend']}','{$A['timeend']}',{$A['allday']},'{$A['location']}','{$A['address1']}','{$A['address2']}','{$A['city']}','{$A['state']}','{$A['zipcode']}','{$A['description']}',{$uid}");
if (isset ($_CA_CONF['notification']) &&
($_CA_CONF['notification'] == 1)) {
More information about the geeklog-cvs
mailing list