]> 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 5e0fcfc9465e0cc2feac4d5e5b612271e3b7ee88..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) {
@@ -129,11 +139,6 @@ class Router
             $m->connect('index.php?action=' . $action, array('action' => $action));
         }
 
-        $m->connect('main/:method',
-                    array('action' => 'api',
-                          'method' => 'oembed(.xml|.json)?',
-                          'apiaction' => 'oembed'));
-
         // settings
 
         foreach (array('profile', 'avatar', 'password', 'openid', 'im',
@@ -211,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'),