pluf2

pluf2 Commit Details


Date:2009-01-29 05:26:34 (15 years 10 months ago)
Author:Loic d'Anterroches
Branch:master
Commit:0fcf474b9fbc8e85c2f4779bd85b752b918107a5
Parents: 138931df6fbf7ea438dcea7133a92230da595104
Message:Fixed issue 109, typo dans Pluf_Views::deleteObject().

Changes:

File differences

src/Pluf/Views.php
310310
311311
312312
313
313
314314
315315
316316
317317
318
319
320
318
319
320
321321
322322
323323
$model = $p['model'];
$context = (isset($p['extra_context'])) ? $p['extra_context'] : array();
$template = (isset($p['template'])) ? $p['template'] : strtolower($model).'_confirm_delete.html';
$post_save_keys = (isset($p['post_save_redirect_keys'])) ? $p['post_save_redirect_keys'] : array();
$post_delete_keys = (isset($p['post_delete_redirect_keys'])) ? $p['post_delete_redirect_keys'] : array();
$object = Pluf_Shortcuts_GetObjectOr404($model, $id);
if ($request->method == 'POST') {
$object->delete();
if (isset($p['post_save_redirect'])) {
$url = Pluf_HTTP_URL_urlForView($p['post_save_redirect'],
$post_save_keys);
if (isset($p['post_delete_redirect'])) {
$url = Pluf_HTTP_URL_urlForView($p['post_delete_redirect'],
$post_delete_keys);
} else {
throw new Exception('No URL to redirect to from generic delete view.');
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05887s using 14 queries.