Indefero

Indefero Commit Details


Date:2008-08-02 02:48:55 (16 years 4 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, svn
Commit:cf9360a1a87f8a98dc506a316055537b95ec245f
Parents: 953d7c4ecd37e2c89058b656ee586ae73bfe1e8f
Message:Fixed the middleware to correctly return a 404 error if the project is not found.

Changes:

File differences

src/IDF/Middleware.php
4444
4545
4646
47
47
48
49
50
51
4852
4953
5054
{
$match = array();
if (preg_match('#^/p/(\w+)/#', $request->query, $match)) {
$request->project = IDF_Project::getOr404($match[1]);
try {
$request->project = IDF_Project::getOr404($match[1]);
} catch (Pluf_HTTP_Error404 $e) {
return new Pluf_HTTP_Response_NotFound(sprintf(__('The page <em>%s</em> was not found on the server.'), htmlspecialchars($request->query)));
}
}
return false;
}

Archive Download the corresponding diff file

Page rendered in 0.08505s using 13 queries.