]> 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 1f39c60dc50207449c6ddba1a196560d0a1a390c..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) {
@@ -152,6 +162,10 @@ class Router
         $m->connect('search/notice/rss?q=:q', array('action' => 'noticesearchrss'),
                     array('q' => '.+'));
 
+        $m->connect('attachment/:attachment',
+                    array('action' => 'attachment'),
+                    array('attachment' => '[0-9]+'));
+
         $m->connect('attachment/:attachment/ajax',
                     array('action' => 'attachment_ajax'),
                     array('attachment' => '[0-9]+'));
@@ -202,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'),
@@ -257,12 +271,12 @@ class Router
         $m->connect('api/statuses/:method',
                     array('action' => 'api',
                           'apiaction' => 'statuses'),
-                    array('method' => '(public_timeline|friends_timeline|user_timeline|update|replies|mentions|friends|followers|featured)(\.(atom|rss|xml|json))?'));
+                    array('method' => '(public_timeline|friends_timeline|user_timeline|update|replies|mentions|show|friends|followers|featured)(\.(atom|rss|xml|json))?'));
 
         $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
 
@@ -313,7 +327,7 @@ class Router
         $m->connect('api/friendships/:method',
                     array('action' => 'api',
                           'apiaction' => 'friendships'),
-                    array('method' => 'exists(\.(xml|json))'));
+                    array('method' => '(show|exists)(\.(xml|json))'));
 
         // Social graph
 
@@ -390,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'));