]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix the router entries for the oEmbed endpoint so they don't accidentally catch too...
authorCraig Andrews <candrews@integralblue.com>
Thu, 30 Jul 2009 19:37:35 +0000 (15:37 -0400)
committerCraig Andrews <candrews@integralblue.com>
Thu, 30 Jul 2009 19:37:35 +0000 (15:37 -0400)
lib/router.php

index e10d484f4e8f42b7999de9902f29863d7c00cd3a..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) {
@@ -475,11 +485,6 @@ class Router
 
         Event::handle('RouterInitialized', array($m));
 
-        $m->connect('main/:method',
-                    array('action' => 'api',
-                          'method' => 'oembed(.xml|.json)?',
-                          'apiaction' => 'oembed'));
-
         return $m;
     }