summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-07-30 15:37:35 -0400
committerCraig Andrews <candrews@integralblue.com>2009-07-30 15:37:35 -0400
commit15848a815efa00d89c0daa7abf340ec899059f8f (patch)
tree102466d87a724a2b60a48c8011c2af536397a681
parent63e8f15448ac2cfb5217ddd96bb95821b6f106c5 (diff)
Fix the router entries for the oEmbed endpoint so they don't accidentally catch too much
-rw-r--r--lib/router.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/router.php b/lib/router.php
index e10d484f4..19839b997 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -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;
}