add api/laconica for backwards compatibility

This commit is contained in:
Evan Prodromou 2009-08-27 09:34:32 -07:00
parent a21ca17f68
commit a84c4e3518

View File

@ -401,16 +401,22 @@ class Router
array('action' => 'api', array('action' => 'api',
'apiaction' => 'statusnet')); 'apiaction' => 'statusnet'));
$m->connect('api/statusnet/:method', // For older methods, we provide "laconica" base action
$m->connect('api/laconica/:method',
array('action' => 'api', array('action' => 'api',
'apiaction' => 'statusnet')); 'apiaction' => 'statusnet'));
// Groups and tags are newer than 0.8.1 so no backward-compatibility
// necessary
// Groups // Groups
//'list' has to be handled differently, as php will not allow a method to be named 'list' //'list' has to be handled differently, as php will not allow a method to be named 'list'
$m->connect('api/statusnet/groups/list/:argument', $m->connect('api/statusnet/groups/list/:argument',
array('action' => 'api', array('action' => 'api',
'method' => 'list_groups', 'method' => 'list_groups',
'apiaction' => 'groups')); 'apiaction' => 'groups'));
foreach (array('xml', 'json', 'rss', 'atom') as $e) { foreach (array('xml', 'json', 'rss', 'atom') as $e) {
$m->connect('api/statusnet/groups/list.' . $e, $m->connect('api/statusnet/groups/list.' . $e,
array('action' => 'api', array('action' => 'api',