]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/router.php
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
[quix0rs-gnu-social.git] / lib / router.php
index 9d0d3a3f0613382fb401fd47922b5ebae107098e..e842604e9a35d11abd55ba1194eaec80b56534f0 100644 (file)
@@ -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