Skip to content

Commit

Permalink
Fixes a calendarmodule permissions problem when deleting recurring ev…
Browse files Browse the repository at this point in the history
…ents, also converts aggregated ical events from newline to breaks (otherwise they display a \n instead of newline in description) [#795 state:resolved milestone:2.1.0 responsible:dleffler]
  • Loading branch information
dleffler committed Nov 13, 2012
1 parent c5a5b3e commit 8ab9507
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
1 change: 1 addition & 0 deletions framework/modules-1/calendarmodule/actions/delete_form.php
Expand Up @@ -30,6 +30,7 @@
// $eventdates = expSorter::sort(array('array'=>$eventdates,'sortby'=>'date', 'order'=>'ASC'));
$template->assign('dates',$eventdates);
$template->assign('event',$item);
$template->assign('loc',$loc);
$template->output();
} else {
// Process a regular delete
Expand Down
29 changes: 15 additions & 14 deletions framework/modules-1/calendarmodule/views/_form_delete.tpl
Expand Up @@ -18,17 +18,18 @@
{/css}

<div class="module calendar delete">
<h1>{'Delete Event'|gettext}</h1>
<div class="form_header"><p>{'The event you have opted to delete is a recurring event. You can decide to delete just this instance of it, or all instances, below.'|gettext}</p></div>
<form action="?" method="post">
<input type="hidden" name="module" value="calendarmodule" />
<input type="hidden" name="action" value="delete_process" />
<input type="hidden" name="id" value="{$event->id}" />
<table cellspacing="0" cellpadding="2" width="100%" class="exp-skin-table">
{include file="_recur_dates.tpl"}
<tr>
<td colspan="2"><input class="awesome {$smarty.const.BTN_SIZE} {$smarty.const.BTN_COLOR}" type="submit" value="{'Delete Selected'|gettext}" /></td>
</tr>
</table>
</form>
</div>
<h1>{'Delete Event'|gettext}</h1>
<div class="form_header"><p>{'The event you have opted to delete is a recurring event. You can decide to delete just this instance of it, or all instances, below.'|gettext}</p></div>
<form action="?" method="post">
<input type="hidden" name="module" value="calendarmodule" />
<input type="hidden" name="src" value="{$loc->src}" />
<input type="hidden" name="action" value="delete_process" />
<input type="hidden" name="id" value="{$event->id}" />
<table cellspacing="0" cellpadding="2" width="100%" class="exp-skin-table">
{include file="_recur_dates.tpl"}
<tr>
<td colspan="2"><input class="awesome {$smarty.const.BTN_SIZE} {$smarty.const.BTN_COLOR}" type="submit" value="{'Delete Selected'|gettext}" /></td>
</tr>
</table>
</form>
</div>
4 changes: 2 additions & 2 deletions framework/modules/events/controllers/eventController.php
Expand Up @@ -249,7 +249,7 @@ function showall() {
"now" => $startperiod,
));
break;
case "monthly":
case "monthly": // build a month array of weeks with an array of days
// $monthly = array();
// $counts = array();
$info = getdate($time);
Expand Down Expand Up @@ -1160,7 +1160,7 @@ function getExternalEvents($loc, $startdate, $enddate) {
}
// dtstart required, one occurrence, (orig. start date)
$extevents[$eventdate][$dy]->title = $vevent->getProperty('summary');
$extevents[$eventdate][$dy]->body = $vevent->getProperty('description');
$extevents[$eventdate][$dy]->body = nl2br($vevent->getProperty('description'));

// $extevents[$eventdate][$dy]->location_data = serialize(expCore::makeLocation('extevent',$extcal->id));
$extevents[$eventdate][$dy]->location_data = 'icalevent' . $url;
Expand Down

0 comments on commit 8ab9507

Please sign in to comment.