summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
commitb3a0eea3b66e95becb6c4595ed71c7fe71ed6437 (patch)
tree76666150701f03205bfff77e7d034dfa724f8764 /lib/router.php
parent399669b1fb955d2d8c18098a7b551184d534a94c (diff)
parente185c0395a6cd250ccd7c8e385c54830be73f937 (diff)
Merge branch '0.7.x' into 0.8.x
Conflicts: classes/Notice.php lib/action.php lib/router.php lib/twitter.php
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/router.php b/lib/router.php
index aab286721..d0b56e88b 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -49,6 +49,9 @@ class Router
{
var $m = null;
static $inst = null;
+ static $bare = array('requesttoken', 'accesstoken', 'userauthorization',
+ 'postnotice', 'updateprofile', 'finishremotesubscribe',
+ 'finishopenidlogin', 'finishaddopenid');
static function get()
{
@@ -98,7 +101,7 @@ class Router
$main = array('login', 'logout', 'register', 'subscribe',
'unsubscribe', 'confirmaddress', 'recoverpassword',
'invite', 'favor', 'disfavor', 'sup',
- 'block');
+ 'block', 'subedit');
foreach ($main as $a) {
$m->connect('main/'.$a, array('action' => $a));
@@ -118,8 +121,7 @@ class Router
$m->connect('main/remote', array('action' => 'remotesubscribe'));
$m->connect('main/remote?nickname=:nickname', array('action' => 'remotesubscribe'), array('nickname' => '[A-Za-z0-9_-]+'));
- foreach (array('requesttoken', 'accesstoken', 'userauthorization',
- 'postnotice', 'updateprofile', 'finishremotesubscribe') as $action) {
+ foreach (Router::$bare as $action) {
$m->connect('index.php?action=' . $action, array('action' => $action));
}
@@ -230,7 +232,7 @@ class Router
$m->connect('api/statuses/:method/:argument',
array('action' => 'api',
'apiaction' => 'statuses'),
- array('method' => '(user_timeline|friends_timeline|show|destroy|friends|followers)'));
+ array('method' => '(user_timeline|friends_timeline|replies|show|destroy|friends|followers)'));
// users
@@ -261,7 +263,7 @@ class Router
}
foreach (array('xml', 'json', 'rss', 'atom') as $e) {
- $m->connect('api/direct_message/sent.'.$e,
+ $m->connect('api/direct_messages/sent.'.$e,
array('action' => 'api',
'apiaction' => 'direct_messages',
'method' => 'sent.'.$e));
@@ -281,7 +283,7 @@ class Router
$m->connect('api/friendships/:method',
array('action' => 'api',
'apiaction' => 'friendships'),
- array('method' => 'exists(\.(xml|json|rss|atom))'));
+ array('method' => 'exists(\.(xml|json))'));
// Social graph
@@ -357,7 +359,6 @@ class Router
array('action' => 'api',
'apiaction' => 'laconica'));
-
// search
$m->connect('api/search.atom', array('action' => 'twitapisearchatom'));
$m->connect('api/search.json', array('action' => 'twitapisearchjson'));
@@ -365,7 +366,7 @@ class Router
// user stuff
- foreach (array('subscriptions', 'subscribers',
+ foreach (array('subscriptions', 'subscribers',
'nudge', 'xrds', 'all', 'foaf',
'replies', 'inbox', 'outbox', 'microsummary') as $a) {
$m->connect(':nickname/'.$a,