Indefero

Indefero Commit Details


Date:2009-01-26 14:51:51 (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:b6922a0296ca72e23f6d8421b0a2cfa5cdbbda5e
Parents: f203f7d78f6a1fa2abdf5ca7a12f302a0b64e131
Message:Added the notifications on the new uploaded files.

Changes:

File differences

src/IDF/Form/Upload.php
159159
160160
161161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
162178
163179
164180
foreach ($tags as $tag) {
$upload->setAssoc($tag);
}
// Send the notification
if ('' != $this->project->getConf()->getVal('downloads_notification_email', '')) {
$context = new Pluf_Template_Context(
array('file' => $upload,
'urlfile' => $upload->getAbsoluteUrl($this->project),
'project' => $this->project,
'tags' => $upload->get_tags_list(),
));
$tmpl = new Pluf_Template('idf/downloads/download-created-email.txt');
$text_email = $tmpl->render($context);
$email = new Pluf_Mail(Pluf::f('from_email'), $this->project->getConf()->getVal('downloads_notification_email'),
sprintf(__('New download - %s (%s)'),
$upload->summary, $this->project->shortname));
$email->addTextMessage($text_email);
$email->sendMail();
}
return $upload;
}
}
src/IDF/templates/idf/downloads/download-created-email.txt
1
2
3
4
5
6
7
8
9
10
11
12
{trans 'Hello,'}
{blocktrans}A new file is available for download:{/blocktrans}
{$file.summary|safe}
{$file} - {$file.filesize|ssize}
{trans 'Project:'} {$project.name|safe}
{trans 'Submitted by:'} {$file.get_submitter|safe}
{if $tags.count()}{trans 'Labels:'}
{foreach $tags as $tag} {$tag.class|safe}:{$tag.name|safe}
{/foreach}{/if}
{trans 'Download:'} {$urlfile}

Archive Download the corresponding diff file

Page rendered in 0.07391s using 13 queries.