From 9b4379b17dbd5cf626b584a4658fcdb63477f6dc Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sun, 19 Oct 2014 21:55:33 -0400 Subject: [PATCH] Simplified way to add new prefixes to the router --- lib/Cake/Routing/Router.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index f5768ebbd..e9dc6ad71 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -355,9 +355,8 @@ class Router { break; } } - if (isset($defaults['prefix'])) { + if (isset($defaults['prefix']) && !in_array($defaults['prefix'], self::$_prefixes)) { self::$_prefixes[] = $defaults['prefix']; - self::$_prefixes = array_keys(array_flip(self::$_prefixes)); } $defaults += array('plugin' => null); if (empty($options['action'])) {