]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/router.php
A script to GC sessions correctly
[quix0rs-gnu-social.git] / lib / router.php
index 75e72f932295d047bfd0875aab0a91bd5480855a..19839b99722a0682b8f4c253479579d67e969744 100644 (file)
@@ -113,6 +113,16 @@ class Router
 
         $m->connect('main/tagother/:id', array('action' => 'tagother'));
 
+        $m->connect('main/oembed.xml',
+                    array('action' => 'api',
+                          'method' => 'oembed.xml',
+                          'apiaction' => 'oembed'));
+
+        $m->connect('main/oembed.json',
+                    array('action' => 'api',
+                          'method' => 'oembed.json',
+                          'apiaction' => 'oembed'));
+
         // these take a code
 
         foreach (array('register', 'confirmaddress', 'recoverpassword') as $c) {
@@ -206,7 +216,7 @@ class Router
                     array('tag' => '[a-zA-Z0-9]+'));
         $m->connect('tag/:tag',
                     array('action' => 'tag'),
-                    array('tag' => '[a-zA-Z0-9]+'));
+                    array('tag' => '[\pL\pN_\-\.]{1,64}'));
 
         $m->connect('peopletag/:tag',
                     array('action' => 'peopletag'),
@@ -266,7 +276,7 @@ class Router
         $m->connect('api/statuses/:method/:argument',
                     array('action' => 'api',
                           'apiaction' => 'statuses'),
-                    array('method' => '(user_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)'));
+                    array('method' => '(|user_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)'));
 
         // users
 
@@ -394,6 +404,28 @@ class Router
                     array('action' => 'api',
                           'apiaction' => 'laconica'));
 
+        $m->connect('api/laconica/:method',
+                    array('action' => 'api',
+                          'apiaction' => 'laconica'));
+
+        // Groups
+        $m->connect('api/laconica/groups/:method/:argument',
+                    array('action' => 'api',
+                          'apiaction' => 'groups'));
+
+        $m->connect('api/laconica/groups/:method',
+                    array('action' => 'api',
+                          'apiaction' => 'groups'));
+
+        // Tags
+        $m->connect('api/laconica/tags/:method/:argument',
+                    array('action' => 'api',
+                          'apiaction' => 'tags'));
+
+        $m->connect('api/laconica/tags/:method',
+                    array('action' => 'api',
+                          'apiaction' => 'tags'));
+
         // search
         $m->connect('api/search.atom', array('action' => 'twitapisearchatom'));
         $m->connect('api/search.json', array('action' => 'twitapisearchjson'));