Skip to content
This repository
Browse code

Fix coding standards in Config/

  • Loading branch information...
commit b06e15ce6f3c045d9a7e431aadbaac66a84e1a3a 1 parent 04c843b
Mark Story authored March 03, 2012

Showing 1 changed file with 30 additions and 30 deletions. Show diff stats Hide diff stats

  1. 60  lib/Cake/Config/routes.php
60  lib/Cake/Config/routes.php
@@ -45,42 +45,42 @@
45 45
  *
46 46
  * You can disable the connection of default routes by deleting the require inside APP/Config/routes.php.
47 47
  */
48  
-	$prefixes = Router::prefixes();
  48
+$prefixes = Router::prefixes();
49 49
 
50  
-	if ($plugins = CakePlugin::loaded()) {
51  
-		App::uses('PluginShortRoute', 'Routing/Route');
52  
-		foreach ($plugins as $key => $value) {
53  
-			$plugins[$key] = Inflector::underscore($value);
54  
-		}
55  
-		$pluginPattern = implode('|', $plugins);
56  
-		$match = array('plugin' => $pluginPattern);
57  
-		$shortParams = array('routeClass' => 'PluginShortRoute', 'plugin' => $pluginPattern);
58  
-
59  
-		foreach ($prefixes as $prefix) {
60  
-			$params = array('prefix' => $prefix, $prefix => true);
61  
-			$indexParams = $params + array('action' => 'index');
62  
-			Router::connect("/{$prefix}/:plugin", $indexParams, $shortParams);
63  
-			Router::connect("/{$prefix}/:plugin/:controller", $indexParams, $match);
64  
-			Router::connect("/{$prefix}/:plugin/:controller/:action/*", $params, $match);
65  
-		}
66  
-		Router::connect('/:plugin', array('action' => 'index'), $shortParams);
67  
-		Router::connect('/:plugin/:controller', array('action' => 'index'), $match);
68  
-		Router::connect('/:plugin/:controller/:action/*', array(), $match);
  50
+if ($plugins = CakePlugin::loaded()) {
  51
+	App::uses('PluginShortRoute', 'Routing/Route');
  52
+	foreach ($plugins as $key => $value) {
  53
+		$plugins[$key] = Inflector::underscore($value);
69 54
 	}
  55
+	$pluginPattern = implode('|', $plugins);
  56
+	$match = array('plugin' => $pluginPattern);
  57
+	$shortParams = array('routeClass' => 'PluginShortRoute', 'plugin' => $pluginPattern);
70 58
 
71 59
 	foreach ($prefixes as $prefix) {
72 60
 		$params = array('prefix' => $prefix, $prefix => true);
73 61
 		$indexParams = $params + array('action' => 'index');
74  
-		Router::connect("/{$prefix}/:controller", $indexParams);
75  
-		Router::connect("/{$prefix}/:controller/:action/*", $params);
  62
+		Router::connect("/{$prefix}/:plugin", $indexParams, $shortParams);
  63
+		Router::connect("/{$prefix}/:plugin/:controller", $indexParams, $match);
  64
+		Router::connect("/{$prefix}/:plugin/:controller/:action/*", $params, $match);
76 65
 	}
77  
-	Router::connect('/:controller', array('action' => 'index'));
78  
-	Router::connect('/:controller/:action/*');
  66
+	Router::connect('/:plugin', array('action' => 'index'), $shortParams);
  67
+	Router::connect('/:plugin/:controller', array('action' => 'index'), $match);
  68
+	Router::connect('/:plugin/:controller/:action/*', array(), $match);
  69
+}
79 70
 
80  
-	$namedConfig = Router::namedConfig();
81  
-	if ($namedConfig['rules'] === false) {
82  
-		Router::connectNamed(true);
83  
-	}
  71
+foreach ($prefixes as $prefix) {
  72
+	$params = array('prefix' => $prefix, $prefix => true);
  73
+	$indexParams = $params + array('action' => 'index');
  74
+	Router::connect("/{$prefix}/:controller", $indexParams);
  75
+	Router::connect("/{$prefix}/:controller/:action/*", $params);
  76
+}
  77
+Router::connect('/:controller', array('action' => 'index'));
  78
+Router::connect('/:controller/:action/*');
  79
+
  80
+$namedConfig = Router::namedConfig();
  81
+if ($namedConfig['rules'] === false) {
  82
+	Router::connectNamed(true);
  83
+}
84 84
 
85  
-	unset($namedConfig, $params, $indexParams, $prefix, $prefixes, $shortParams, $match,
86  
-		$pluginPattern, $plugins, $key, $value);
  85
+unset($namedConfig, $params, $indexParams, $prefix, $prefixes, $shortParams, $match,
  86
+	$pluginPattern, $plugins, $key, $value);

0 notes on commit b06e15c

Please sign in to comment.
Something went wrong with that request. Please try again.