From 3dab5506814dae8739f0e7e38acbf6a968d22ffb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 6 Feb 2012 09:21:35 -0600 Subject: [PATCH] fixing route bundle determination. --- laravel/routing/route.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/laravel/routing/route.php b/laravel/routing/route.php index 3150499b..0b816300 100644 --- a/laravel/routing/route.php +++ b/laravel/routing/route.php @@ -62,10 +62,9 @@ public function __construct($key, $action, $parameters = array()) $this->uris = array_map(array($this, 'extract'), $uris); // Determine the bundle in which the route was registered. We will know - // the bundle by the first segment of the route's URI. We need to know - // the bundle so we know if we need to run a bundle's global filters - // when executing the route. - $this->bundle = Bundle::resolve(head(explode('/', $this->uris[0]))); + // the bundle by feeding the URI into the bundle::handles method, which + // will return the bundle assigned to that URI. + $this->bundle = Bundle::handles($this->uris[0]); $this->parameters = array_map('urldecode', $parameters); } @@ -147,10 +146,6 @@ public function response() */ protected function filters($event) { - // Add the global filters to the array. We will also attempt to add - // the bundle's global filter as well. However, we'll need to keep - // the array unique since the default bundle's global filter will - // be the same as the application's global filter. $filters = array_unique(array($event, Bundle::prefix($this->bundle).$event)); // Next wee will check to see if there are any filters attached