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:
parent
34c9d04a35
commit
dacbf0707b
@ -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) {
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user