]>
Commit | Line | Data |
---|---|---|
4819a450 ER |
1 | --- eventum-20060829/include/class.notification.php 2006-08-30 00:46:18.937413896 +0300 |
2 | +++ eventum-20060830/include/class.notification.php 2006-08-30 20:17:25.074832296 +0300 | |
3 | @@ -853,6 +853,26 @@ | |
4 | } | |
5 | } | |
6 | ||
7 | + /** | |
8 | + * Method used to get list of addresses that were email sent to. | |
9 | + * | |
10 | + * @access public | |
11 | + * @param integer $issue_id The issue ID | |
12 | + * @return array list of addresse | |
13 | + */ | |
358f6191 | 14 | + function getLastNotifiedAddresses($issue_id = null) |
4819a450 | 15 | + { |
4f45b210 | 16 | + global $_EVENTUM_LAST_NOTIFIED_LIST; |
4819a450 ER |
17 | + |
18 | + if (is_null($issue_id)) { | |
19 | + // return all addresses in flat view | |
4f45b210 | 20 | + return array_values($_EVENTUM_LAST_NOTIFIED_LIST); |
4819a450 ER |
21 | + } |
22 | + | |
23 | + // return address list for specific issue_id only. | |
4f45b210 | 24 | + return $_EVENTUM_LAST_NOTIFIED_LIST[$issue_id]; |
4819a450 ER |
25 | + } |
26 | + | |
27 | ||
28 | /** | |
29 | * Method used to format and send the email notifications. | |
30 | @@ -869,6 +889,8 @@ | |
31 | */ | |
32 | function notifySubscribers($issue_id, $emails, $type, $data, $subject, $internal_only, $type_id = false, $headers = false) | |
33 | { | |
4f45b210 | 34 | + global $_EVENTUM_LAST_NOTIFIED_LIST; |
4819a450 ER |
35 | + |
36 | // open text template | |
37 | $tpl = new Template_API; | |
38 | $tpl->setTemplate('notifications/' . $type . '.tpl.text'); | |
39 | @@ -954,6 +976,8 @@ | |
40 | $full_subject = "[#$issue_id] $subject: $extra_subject"; | |
41 | } | |
42 | $mail->send($from, $emails[$i], $full_subject, TRUE, $issue_id, $final_type, $sender_usr_id, $type_id); | |
43 | + | |
4f45b210 | 44 | + $_EVENTUM_LAST_NOTIFIED_LIST[$issue_id][] = $emails[$i]; |
4819a450 ER |
45 | } |
46 | } | |
47 | ||
48 | --- eventum-20060829/update.php 2006-08-30 00:46:19.047416365 +0300 | |
49 | +++ eventum-20060830/update.php 2006-08-30 20:17:24.844826982 +0300 | |
50 | @@ -111,6 +111,7 @@ | |
51 | ||
52 | $tpl->assign(array( | |
53 | "subscribers" => Notification::getSubscribers($issue_id), | |
358f6191 | 54 | + "notify_list" => Notification::getLastNotifiedAddresses($issue_id), |
4819a450 ER |
55 | "categories" => Category::getAssocList($prj_id), |
56 | "priorities" => Priority::getAssocList($prj_id), | |
57 | "status" => $statuses, | |
58 | --- eventum-20060829/templates/update_form.tpl.html 2006-08-30 00:46:18.777410305 +0300 | |
59 | +++ eventum-20060830/templates/update_form.tpl.html 2006-08-30 20:21:39.160697745 +0300 | |
60 | @@ -10,12 +10,23 @@ | |
61 | {if $update_result == -1} | |
62 | <b>{t}Sorry, an error happened while trying to run your query.{/t}</b> | |
63 | {elseif $update_result == 1} | |
64 | - <b>{t}Thank you, issue #{$smarty.post.issue_id} was updated successfully.{/t} | |
65 | + <b>{t}Thank you, issue #{$smarty.post.issue_id} was updated successfully.{/t}</b> | |
66 | {if $has_duplicates == 'yes'} | |
67 | {t}Also, all issues that are marked as duplicates from this one were updated as well.{/t} | |
68 | {/if} | |
69 | <br /><br /> | |
70 | + | |
71 | + {if $notify_list|@count > 0} | |
72 | + <b>{t}E-mail about issue update was sent to:{/t}</b><br /> | |
73 | + {foreach from=$notify_list item=email_address} | |
74 | + {$email_address|escape:"html"}<br /> | |
75 | + {/foreach} | |
76 | + <br /> | |
77 | + {/if} | |
78 | + | |
79 | + <b> | |
80 | <a href="view.php?id={$smarty.post.issue_id}" class="link">{t}Return to Issue{/t} #{$smarty.post.issue_id} {t}Details Page{/t}</a> | |
81 | + </b> | |
82 | {/if} | |
83 | </td> | |
84 | </tr> |