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)
|
function process_request(&$request)
|
||||||
{
|
{
|
||||||
$match = array();
|
$match = array();
|
||||||
if (preg_match('#^/(?:api/p|p)/([\-\w]+)/?#', $request->query, $match)) {
|
if (preg_match('#^/(?:api/p|p|r)/([\-\w]+)/?#', $request->query, $match)) {
|
||||||
try {
|
try {
|
||||||
$request->project = IDF_Project::getOr404($match[1]);
|
$request->project = IDF_Project::getOr404($match[1]);
|
||||||
} catch (Pluf_HTTP_Error404 $e) {
|
} catch (Pluf_HTTP_Error404 $e) {
|
||||||
|
@ -245,7 +245,7 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/source/changesrev/$#',
|
|||||||
'model' => 'IDF_Views_Source_Svn',
|
'model' => 'IDF_Views_Source_Svn',
|
||||||
'method' => 'changelogRev');
|
'method' => 'changelogRev');
|
||||||
|
|
||||||
$ctl[] = array('regex' => '#^/p/([\-\w]+)/source/repo/(.*)$#',
|
$ctl[] = array('regex' => '#^/r/([\-\w]+)/(.*)$#',
|
||||||
'base' => $base,
|
'base' => $base,
|
||||||
'model' => 'IDF_Views_Source',
|
'model' => 'IDF_Views_Source',
|
||||||
'method' => 'repository');
|
'method' => 'repository');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user