diff --git a/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php b/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php index 87f460d..32efe75 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php +++ b/src/Hackspace/Bundle/CalciferBundle/Controller/LocationController.php @@ -35,7 +35,7 @@ class LocationController extends Controller /** * Finds and displays a Event entity. * - * @Route("/{slug}", name="location_show") + * @Route("/{slug}(?!\.ics)", name="location_show") * @Method("GET") * @Template("CalciferBundle:Event:index.html.twig") */ @@ -79,12 +79,12 @@ class LocationController extends Controller /** * Finds and displays a Event entity. * - * @Route("/{id}.ics", requirements={"id" = "\d+"}, name="location_show_ics") + * @Route("/{slug}\.ics", name="location_show_ics") * @Method("GET") */ - public function showActionICS($id) + public function showActionICS($slug) { - $results = $this->showAction(str_replace('.ics','',$id)); + $results = $this->showAction(str_replace('.ics','',$slug)); $entities = $results['entities']; $calendar = new Calendar(); diff --git a/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php b/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php index 88261b8..b6128d9 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php +++ b/src/Hackspace/Bundle/CalciferBundle/Controller/TagController.php @@ -35,7 +35,7 @@ class TagController extends Controller /** * Finds and displays a Event entity. * - * @Route("/{slug}", name="tag_show") + * @Route("/{slug}(?!\.ics)", name="tag_show") * @Method("GET") * @Template("CalciferBundle:Event:index.html.twig") */ @@ -76,12 +76,12 @@ class TagController extends Controller /** * Finds and displays a Event entity. * - * @Route("/{id}.ics", requirements={"id" = "\d+"}, name="tag_show_ics") + * @Route("/{slug}.ics", name="tag_show_ics") * @Method("GET") */ - public function showActionICS($id) + public function showActionICS($slug) { - $results = $this->showAction(str_replace('.ics','',$id)); + $results = $this->showAction(str_replace('.ics','',$slug)); $entities = $results['entities']; $calendar = new Calendar();