Indefero

Indefero Commit Details


Date:2009-01-28 08:20:41 (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:fb1a47b3230432156001ef25d50b57f0a5285db6
Parents: be7cbabe8d5d44cbb687df5862b104cc4369a78b
Message:Added the notification for the commits.

Changes:

File differences

src/IDF/Commit.php
154154
155155
156156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
157176
158177
159178
$commit->origauthor = $change->author;
$commit->creation_dtime = $change->date;
$commit->create();
// We notify the creation of the commit
if ('' != $project->getConf()->getVal('source_notification_email', '')) {
$context = new Pluf_Template_Context(
array(
'c' => $commit,
'project' => $project,
'url_base' => Pluf::f('url_base'),
)
);
$tmpl = new Pluf_Template('idf/source/commit-created-email.txt');
$text_email = $tmpl->render($context);
$email = new Pluf_Mail(Pluf::f('from_email'),
$project->getConf()->getVal('source_notification_email'),
sprintf(__('New Commit %s - %s (%s)'),
$commit->scm_id, $commit->summary, $project->shortname));
$email->addTextMessage($text_email);
$email->sendMail();
}
return $commit;
}
src/IDF/templates/idf/source/commit-created-email.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{trans 'Hello,'}
{blocktrans}A new commit has been created:{/blocktrans}
{$c.summary|safe}
{trans 'Commit:'} {$c.scm_id|safe}
{trans 'Project:'} {$project.name|safe}
{trans 'Created by:'} {$c.get_author|safe}
{trans 'Created at:'} {$c.creation_dtime|date:"%Y-%m-%d %H:%M:%S"}
{if $c.fullmessage}
{trans 'Content:'}
{$c.fullmessage}
{/if}
--
{trans 'Commit details:'} {$url_base}{url 'IDF_Views_Source::commit', array($project.shortname, $c.scm_id)}

Archive Download the corresponding diff file

Page rendered in 0.07732s using 13 queries.