InDefero

Sign in or create your account | Project List | Help

InDefero Commit Details

Date:2009-07-02 19:59:06 (8 months 16 days ago)
Author:Loïc d'Anterroches
Commit:c488278ce1bac2a6adc83a77395b776126dbe212
Message:Fixed bad use of Exception in the wiki view.

Files: src/IDF/Views/Wiki.php (4 diffs)

Change Details

src/IDF/Views/Wiki.php
222222                            array($prj->id, $match[2]));
223223        $pages = Pluf::factory('IDF_WikiPage')->getList(array('filter'=>$sql->gen()));
224224        if ($pages->count() != 1) {
225            throw new Pluf_HTTP_Response_NotFound($request);
225            return new Pluf_HTTP_Response_NotFound($request);
226226        }
227227        $page = $pages[0];
228228        $oldrev = false;
...... 
231231            $oldrev = Pluf_Shortcuts_GetObjectOr404('IDF_WikiRevision',
232232                                                    $request->GET['rev']);
233233            if ($oldrev->wikipage != $page->id or $oldrev->is_head == true) {
234                throw new Pluf_HTTP_Response_NotFound($request);
234                return new Pluf_HTTP_Response_NotFound($request);
235235            }
236236        }
237237        $ptags = self::getWikiTags($prj);
...... 
269269        $page = $oldrev->get_wikipage();
270270        $prj->inOr404($page);
271271        if ($oldrev->is_head == true) {
272            throw new Pluf_HTTP_Error404($request);
272            return new Pluf_HTTP_Response_NotFound($request);
273273        }
274274        if ($request->method == 'POST') {
275275            $oldrev->delete();
...... 
310310                            array($prj->id, $match[2]));
311311        $pages = Pluf::factory('IDF_WikiPage')->getList(array('filter'=>$sql->gen()));
312312        if ($pages->count() != 1) {
313            throw new Pluf_HTTP_Error404($request);
313            return new Pluf_HTTP_Response_NotFound($request);
314314        }
315315        $page = $pages[0];
316316        $title = sprintf(__('Update %s'), $page->title);

Archive Download the corresponding diff file

Branches:
dev
master
newdiff
svn