Indefero

Indefero Commit Details


Date:2009-05-26 05:04:06 (15 years 6 months ago)
Author:Mehdi Kabab
Branch: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:668b49df40c233deb9b9410aa8546b0701e1f6de
Parents: 3476541bf48ac302b94285be8a7122ae3a276350
Message:Fixed issue 220, redirect to the issue or the issue comment after an updating.

Changes:

File differences

src/IDF/Views/Issue.php
171171
172172
173173
174
175
176
177
178
174
175
179176
180177
181178
......
201198
202199
203200
201
204202
205203
206204
......
291289
292290
293291
294
295
296
297
298
292
293
299294
300295
301296
......
304299
305300
306301
307
308302
309303
310304
311305
312306
313307
314
315
308
316309
317310
318311
......
334327
335328
336329
330
337331
338332
339333
$params);
if (!isset($request->POST['preview']) and $form->isValid()) {
$issue = $form->save();
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index',
array($prj->shortname));
$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));
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($prj->shortname, $issue->id));
$to_emails = array();
if (null != $issue->get_owner() and $issue->owner != $issue->submitter) {
$to_emails[] = $issue->get_owner()->email;
$email->sendMail();
}
if ($api) return $issue;
$request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been created.'), $url, $issue->id));
return new Pluf_HTTP_Response_Redirect($url);
}
} else {
$params);
if (!isset($request->POST['preview']) && $form->isValid()) {
$issue = $form->save();
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index',
array($prj->shortname));
$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 updated.'), $urlissue, $issue->id));
$comments = $issue->get_comments_list(array('order' => 'id DESC'));
$url .= '#ic' . $comments[0]->id;
// Get the list of interested person + owner + submitter
if (!Pluf_Model_InArray($issue->get_submitter(), $interested)) {
$interested[] = $issue->get_submitter();
!Pluf_Model_InArray($issue->get_owner(), $interested)) {
$interested[] = $issue->get_owner();
}
$comments = $issue->get_comments_list(array('order' => 'id DESC'));
$context = new Pluf_Template_Context(
array(
'issue' => $issue,
'comments' => $comments,
'project' => $prj,
'url_base' => Pluf::f('url_base'),
)
);
));
$tmpl = new Pluf_Template('idf/issues/issue-updated-email.txt');
$text_email = $tmpl->render($context);
$email = new Pluf_Mail_Batch(Pluf::f('from_email'));
$email->sendMail();
}
$email->close();
$request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been updated.'), $url, $issue->id));
return new Pluf_HTTP_Response_Redirect($url);
}
} else {

Archive Download the corresponding diff file

Page rendered in 0.09366s using 14 queries.