summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-28 21:11:16 -0800
committerEvan Prodromou <evan@controlyourself.ca>2009-02-28 21:11:16 -0800
commitfc44c9a7f456a146a20884c56676baf7343dd923 (patch)
treebcc572d966709bfa19277eb48c3f2f831d49d8ba /lib/router.php
parent02ba71b0f186b406071a97c3267603d4863a4b21 (diff)
parent458c03786735bd3e3b6619b2d20538bd55acd0c6 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/router.php b/lib/router.php
index 4c036e7b2..1d1a5ba4c 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -116,6 +116,12 @@ class Router
$m->connect('main/openid', array('action' => 'openidlogin'));
$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) {
+ $m->connect('index.php?action=' . $action, array('action' => $action));
+ }
// settings
@@ -128,6 +134,7 @@ class Router
foreach (array('group', 'people', 'notice') as $s) {
$m->connect('search/'.$s, array('action' => $s.'search'));
+ $m->connect('search/'.$s.'?q=:q', array('action' => $s.'search'), array('q' => '.+'));
}
$m->connect('search/notice/rss', array('action' => 'noticesearchrss'));
@@ -135,6 +142,9 @@ class Router
// notice
$m->connect('notice/new', array('action' => 'newnotice'));
+ $m->connect('notice/new?replyto=:replyto',
+ array('action' => 'newnotice'),
+ array('replyto' => '[A-Za-z0-9_-]+'));
$m->connect('notice/:notice',
array('action' => 'shownotice'),
array('notice' => '[0-9]+'));
@@ -150,6 +160,7 @@ class Router
array('id' => '[0-9]+'));
$m->connect('message/new', array('action' => 'newmessage'));
+ $m->connect('message/new?to=:to', array('action' => 'newmessage'), array('to' => '[A-Za-z0-9_-]'));
$m->connect('message/:message',
array('action' => 'showmessage'),
array('message' => '[0-9]+'));
@@ -416,4 +427,4 @@ class Router
return $this->m->generate($args, $params, $fragment);
}
-} \ No newline at end of file
+}