mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-02 22:23:38 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
@ -1,20 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* Default routes that CakePHP provides as catch all routes.
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Config
|
||||
* @since CakePHP(tm) v 2.0
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -25,7 +22,6 @@
|
|||
* created when your application has one or more plugins.
|
||||
*
|
||||
* - `/:prefix/:plugin` a plugin shortcut route.
|
||||
* - `/:prefix/:plugin/:action/*` a plugin shortcut route.
|
||||
* - `/:prefix/:plugin/:controller`
|
||||
* - `/:prefix/:plugin/:controller/:action/*`
|
||||
* - `/:prefix/:controller`
|
||||
|
@ -34,7 +30,6 @@
|
|||
* If plugins are found in your application the following routes are created:
|
||||
*
|
||||
* - `/:plugin` a plugin shortcut route.
|
||||
* - `/:plugin/:action/*` a plugin shortcut route.
|
||||
* - `/:plugin/:controller`
|
||||
* - `/:plugin/:controller/:action/*`
|
||||
*
|
||||
|
@ -53,8 +48,8 @@ if ($plugins = CakePlugin::loaded()) {
|
|||
$plugins[$key] = Inflector::underscore($value);
|
||||
}
|
||||
$pluginPattern = implode('|', $plugins);
|
||||
$match = array('plugin' => $pluginPattern);
|
||||
$shortParams = array('routeClass' => 'PluginShortRoute', 'plugin' => $pluginPattern);
|
||||
$match = array('plugin' => $pluginPattern, 'defaultRoute' => true);
|
||||
$shortParams = array('routeClass' => 'PluginShortRoute', 'plugin' => $pluginPattern, 'defaultRoute' => true);
|
||||
|
||||
foreach ($prefixes as $prefix) {
|
||||
$params = array('prefix' => $prefix, $prefix => true);
|
||||
|
@ -71,11 +66,11 @@ if ($plugins = CakePlugin::loaded()) {
|
|||
foreach ($prefixes as $prefix) {
|
||||
$params = array('prefix' => $prefix, $prefix => true);
|
||||
$indexParams = $params + array('action' => 'index');
|
||||
Router::connect("/{$prefix}/:controller", $indexParams);
|
||||
Router::connect("/{$prefix}/:controller/:action/*", $params);
|
||||
Router::connect("/{$prefix}/:controller", $indexParams, array('defaultRoute' => true));
|
||||
Router::connect("/{$prefix}/:controller/:action/*", $params, array('defaultRoute' => true));
|
||||
}
|
||||
Router::connect('/:controller', array('action' => 'index'));
|
||||
Router::connect('/:controller/:action/*');
|
||||
Router::connect('/:controller', array('action' => 'index'), array('defaultRoute' => true));
|
||||
Router::connect('/:controller/:action/*', array(), array('defaultRoute' => true));
|
||||
|
||||
$namedConfig = Router::namedConfig();
|
||||
if ($namedConfig['rules'] === false) {
|
||||
|
@ -84,3 +79,4 @@ if ($namedConfig['rules'] === false) {
|
|||
|
||||
unset($namedConfig, $params, $indexParams, $prefix, $prefixes, $shortParams, $match,
|
||||
$pluginPattern, $plugins, $key, $value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue