Indefero

Indefero Commit Details


Date:2009-01-25 03:58:24 (15 years 10 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:e513d95dbe687ea1c420ed0e6a517cf0de63d122
Parents: ec2565e2446df5878d0637f304b89bf491441873
Message:Added the notification for the tickets.

Changes:

File differences

src/IDF/Views/Issue.php
153153
154154
155155
156
156157
158
159
160
161
162
163
157164
158165
159166
......
163170
164171
165172
166
167173
168174
169175
......
284290
285291
286292
293
287294
288295
289
290
291
292
293
294
296
295297
296298
299
300
301
302
303
304
305
306
307
308
309
297310
298311
299312
$urlissue = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($prj->shortname, $issue->id));
$request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been created.'), $urlissue, $issue->id));
$to_emails = array();
if (null != $issue->get_owner() and $issue->owner != $issue->submitter) {
$to_emails[] = $issue->get_owner()->email;
}
if ('' != $request->conf->getVal('issues_notification_email', '')) {
$to_emails[] = $request->conf->getVal('issues_notification_email', '');
}
foreach ($to_emails as $oemail) {
$comments = $issue->get_comments_list(array('order' => 'id ASC'));
$context = new Pluf_Template_Context(
array(
'url_base' => Pluf::f('url_base'),
)
);
$oemail = $issue->get_owner()->email;
$email = new Pluf_Mail(Pluf::f('from_email'), $oemail,
sprintf(__('Issue %s - %s (%s)'),
$issue->id, $issue->summary, $prj->shortname));
$tmpl = new Pluf_Template('idf/issues/issue-updated-email.txt');
$text_email = $tmpl->render($context);
$email = new Pluf_Mail_Batch(Pluf::f('from_email'));
$to_emails = array();
foreach ($interested as $user) {
if ($user->id != $request->user->id) {
$email->setSubject(sprintf(__('Updated Issue %s - %s (%s)'),
$issue->id, $issue->summary, $prj->shortname));
$email->setTo($user->email);
$email->setReturnPath(Pluf::f('from_email'));
$email->addTextMessage($text_email);
$email->sendMail();
$to_emails[] = $user->email;
}
}
if ('' != $request->conf->getVal('issues_notification_email', '')) {
$to_emails[] = $request->conf->getVal('issues_notification_email');
}
foreach ($to_emails as $oemail) {
$email->setSubject(sprintf(__('Updated Issue %s - %s (%s)'),
$issue->id, $issue->summary, $prj->shortname));
$email->setTo($oemail);
$email->setReturnPath(Pluf::f('from_email'));
$email->addTextMessage($text_email);
$email->sendMail();
}
$email->close();
return new Pluf_HTTP_Response_Redirect($url);
}
src/IDF/Views/Project.php
452452
453453
454454
455
455456
456457
457458
array(
'page_title' => $title,
'form' => $form,
'from_email' => Pluf::f('from_email'),
),
$request);
}
src/IDF/templates/idf/admin/tabs.html
8686
8787
8888
89
89
90
9091
9192
9293
{block context}
<div class="issue-submit-info">
<p><strong>{trans 'Instructions:'}</strong></p>
<p>{blocktrans}You can configure here the project tabs access rights.{/blocktrans}</p>
<p>{blocktrans}You can configure here the project tabs access rights and notification emails.{/blocktrans}</p>
<p>{blocktrans}Notification emails will be sent by the <strong>{$from_email}</strong> address, if you send the email to a mailing list, you may need to register this email address. If you do not want to send emails for a given type of changes, simply leave the corresponding field empty.{/blocktrans}</p>
<p>{blocktrans}If you mark a project as private, only the project members and administrators, together with the extra authorized users you provide will have access to the project. You will still be able to define further access rights for the different tabs but the "Open to all" and "Signed in users" will default to authorized users only.{/blocktrans}</p>
<p>{blocktrans}Specify each person by its login. Each person must have already registered with the given login. Separate the logins with commas and/or new lines.{/blocktrans}</p>
</div>

Archive Download the corresponding diff file

Page rendered in 0.24620s using 13 queries.