Menu

#41 Automatic Event Approval

open
nobody
None
5
2009-04-21
2009-04-21
No

In my situation, we trust users to post their own events. We don't want anybody spending time "approving" anything. It turns out the fix for this is really trivial (due to the logical way vtcalendar was written!). For someone else wanting this "automatic approval", you only need to comment out 4 lines of the file CHANGEEINFO-SAVE.INC.PHP. Around line #88 comment out the top and bottom of this if-then:

// Whatever the "admin" edits gets approved right away
# if ($_SESSION['AUTH_ISCALENDARADMIN']) {
if (!empty($event['repeatid'])) {
repeatpublicizeevent($eventid,$event);
}
else {
publicizeevent($eventid,$event);
}
#}

And do the same again down at line #138:

// Whatever the "admin" edits gets approved right away
# if ($_SESSION['AUTH_ISCALENDARADMIN']) {
if (!empty($event['repeatid'])) { repeatpublicizeevent($eventid,$event); }
else { publicizeevent($eventid,$event); }
# }

That's it! (BTW, those comments are misleading. The 2nd if-then is for new postings, the 1st is for edits.)

Discussion


Log in to post a comment.