mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding a check for loaded routes. This prevents routes being loaded on each dispatched action, such as when requestAction is called.
This commit is contained in:
parent
f27566336c
commit
afd2683602
1 changed files with 5 additions and 3 deletions
|
@ -176,9 +176,11 @@ class Dispatcher {
|
|||
* @return array Parameters found in POST and GET.
|
||||
*/
|
||||
public function parseParams(CakeRequest $request, $additionalParams = array()) {
|
||||
$namedExpressions = Router::getNamedExpressions();
|
||||
extract($namedExpressions);
|
||||
include CONFIGS . 'routes.php';
|
||||
if (count(Router::$routes) > 0) {
|
||||
$namedExpressions = Router::getNamedExpressions();
|
||||
extract($namedExpressions);
|
||||
include CONFIGS . 'routes.php';
|
||||
}
|
||||
|
||||
$params = Router::parse($request->url);
|
||||
$request->addParams($params);
|
||||
|
|
Loading…
Add table
Reference in a new issue