summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
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