Bug #34539
problem with category notifications
| Status: | Closed | Start date: | 2012-03-05 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Thomas Kowtsch | % Done: | 100% |
|
| Category: | General Handling | Spent time: | 1.00 hour | |
| Target version: | 1.5 | |||
| Votes: | 0 |
Description
I've found a problem with category notification: even if you delete an event the e-mail is send with the onCreateTemplate and onCreateTitle.
The problem is located in views/class.tx_cal_notification_view.php in the function notify()
I solved it the following way:
foreach($event->getCategories() as $category){
foreach($category->getNotificationEmails() as $emailAddress){
if($emailAddress!='' && t3lib_div::validEmail($emailAddress)){
if($newEventDataArray['deleted']){
$template = $this->conf['view.']['event.']['notify.'][$category->getUid().'.']['onDeleteTemplate'];
if(!$template){
$template = $this->conf['view.']['event.']['notify.']['all.']['onDeleteTemplate'];
}
$titleText = $this->conf['view.']['event.']['notify.'][$category->getUid().'.']['onDeleteEmailTitle'];
if(!$titleText){
$titleText = $this->conf['view.']['event.']['notify.']['all.']['onDeleteEmailTitle'];
}
}
else {
$template = $this->conf['view.']['event.']['notify.'][$category->getUid().'.']['onCreateTemplate'];
if(!$template){
$template = $this->conf['view.']['event.']['notify.']['all.']['onCreateTemplate'];
}
$titleText = $this->conf['view.']['event.']['notify.'][$category->getUid().'.']['onCreateEmailTitle'];
if(!$titleText){
$titleText = $this->conf['view.']['event.']['notify.']['all.']['onCreateEmailTitle'];
}
}
$unsubscribeLink = '';
$this->sendNotification($event, $emailAddress, $template, $titleText, $unsubscribeLink);
}
}
}
History
Updated by Thomas Kowtsch about 1 year ago
- Category set to General Handling
- Status changed from New to Closed
- Assignee set to Thomas Kowtsch
- Target version set to 1.5
- % Done changed from 0 to 100
commited fix in r59194, including user group