Move http repository access to /r/$project

It's a shorter URL and also helps git derive the right name
for the clone.
This commit is contained in:
Patrick Georgi 2011-08-21 07:44:19 +02:00
parent 34c9d04a35
commit dacbf0707b
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class IDF_Middleware
function process_request(&$request)
{
$match = array();
if (preg_match('#^/(?:api/p|p)/([\-\w]+)/?#', $request->query, $match)) {
if (preg_match('#^/(?:api/p|p|r)/([\-\w]+)/?#', $request->query, $match)) {
try {
$request->project = IDF_Project::getOr404($match[1]);
} catch (Pluf_HTTP_Error404 $e) {

View File

@ -245,7 +245,7 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changesrev/$#',
'model' => 'IDF_Views_Source_Svn',
'method' => 'changelogRev');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/repo/(.*)$#',
$ctl[] = array('regex' => '#^/r/([\-\w]+)/(.*)$#',
'base' => $base,
'model' => 'IDF_Views_Source',
'method' => 'repository');