mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix coding standards in Config/
This commit is contained in:
parent
04c843b17b
commit
b06e15ce6f
1 changed files with 30 additions and 30 deletions
|
@ -45,9 +45,9 @@
|
||||||
*
|
*
|
||||||
* You can disable the connection of default routes by deleting the require inside APP/Config/routes.php.
|
* You can disable the connection of default routes by deleting the require inside APP/Config/routes.php.
|
||||||
*/
|
*/
|
||||||
$prefixes = Router::prefixes();
|
$prefixes = Router::prefixes();
|
||||||
|
|
||||||
if ($plugins = CakePlugin::loaded()) {
|
if ($plugins = CakePlugin::loaded()) {
|
||||||
App::uses('PluginShortRoute', 'Routing/Route');
|
App::uses('PluginShortRoute', 'Routing/Route');
|
||||||
foreach ($plugins as $key => $value) {
|
foreach ($plugins as $key => $value) {
|
||||||
$plugins[$key] = Inflector::underscore($value);
|
$plugins[$key] = Inflector::underscore($value);
|
||||||
|
@ -66,21 +66,21 @@
|
||||||
Router::connect('/:plugin', array('action' => 'index'), $shortParams);
|
Router::connect('/:plugin', array('action' => 'index'), $shortParams);
|
||||||
Router::connect('/:plugin/:controller', array('action' => 'index'), $match);
|
Router::connect('/:plugin/:controller', array('action' => 'index'), $match);
|
||||||
Router::connect('/:plugin/:controller/:action/*', array(), $match);
|
Router::connect('/:plugin/:controller/:action/*', array(), $match);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($prefixes as $prefix) {
|
foreach ($prefixes as $prefix) {
|
||||||
$params = array('prefix' => $prefix, $prefix => true);
|
$params = array('prefix' => $prefix, $prefix => true);
|
||||||
$indexParams = $params + array('action' => 'index');
|
$indexParams = $params + array('action' => 'index');
|
||||||
Router::connect("/{$prefix}/:controller", $indexParams);
|
Router::connect("/{$prefix}/:controller", $indexParams);
|
||||||
Router::connect("/{$prefix}/:controller/:action/*", $params);
|
Router::connect("/{$prefix}/:controller/:action/*", $params);
|
||||||
}
|
}
|
||||||
Router::connect('/:controller', array('action' => 'index'));
|
Router::connect('/:controller', array('action' => 'index'));
|
||||||
Router::connect('/:controller/:action/*');
|
Router::connect('/:controller/:action/*');
|
||||||
|
|
||||||
$namedConfig = Router::namedConfig();
|
$namedConfig = Router::namedConfig();
|
||||||
if ($namedConfig['rules'] === false) {
|
if ($namedConfig['rules'] === false) {
|
||||||
Router::connectNamed(true);
|
Router::connectNamed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($namedConfig, $params, $indexParams, $prefix, $prefixes, $shortParams, $match,
|
unset($namedConfig, $params, $indexParams, $prefix, $prefixes, $shortParams, $match,
|
||||||
$pluginPattern, $plugins, $key, $value);
|
$pluginPattern, $plugins, $key, $value);
|
||||||
|
|
Loading…
Reference in a new issue