summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-02-22 17:03:41 -0800
committerZach Copley <zach@controlyourself.ca>2009-02-22 17:03:41 -0800
commit8e0508dad3bb888b0c01834614b1aa7e16cfe583 (patch)
tree04f2734597377942fbbfc5b4f133e951ccc645a5 /lib/router.php
parentcdab8d55a96b61ce6cfbec697d95e3223751fd3f (diff)
parentda532bae9131b6dec8f5c0d67ce77c4ad1736f7d (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/router.php b/lib/router.php
index 9d0d3a3f0..e842604e9 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -47,7 +47,7 @@ require_once 'Net/URL/Mapper.php';
class Router
{
- static $m = null;
+ var $m = null;
static $inst = null;
static function get()
@@ -98,12 +98,14 @@ class Router
$main = array('login', 'logout', 'register', 'subscribe',
'unsubscribe', 'confirmaddress', 'recoverpassword',
'invite', 'favor', 'disfavor', 'sup',
- 'tagother', 'block');
+ 'block');
foreach ($main as $a) {
$m->connect('main/'.$a, array('action' => $a));
}
+ $m->connect('main/tagother/:id', array('action' => 'tagother'));
+
// these take a code
foreach (array('register', 'confirmaddress', 'recoverpassword') as $c) {
@@ -370,7 +372,7 @@ class Router
return $match;
}
- function build($action, $args=null, $fragment=null)
+ function build($action, $args=null, $params=null, $fragment=null)
{
$action_arg = array('action' => $action);
@@ -380,6 +382,6 @@ class Router
$args = $action_arg;
}
- return $this->m->generate($args, null, $fragment);
+ return $this->m->generate($args, $params, $fragment);
}
} \ No newline at end of file