Commit graph

257 commits

Author SHA1 Message Date
mark_story
c5b6dda82f Merge branch 'master' into 2.5 2014-03-11 21:02:27 -04:00
mark_story
c0ac61117e Only sort the keys once per request instead of on each match.
Sorting the keys property by value sorts keys with the same prefix for
free. This does change the order of the keys, but I don't think that is
actually a large issue as it is just a list.

Refs #2991
2014-03-10 21:42:26 -04:00
Mike Gibson
0de1307110 Changed if statement to force Travis rebuild 2014-03-10 18:46:28 +00:00
Mike Gibson
60319832b5 Fixed PHPCS error 2014-03-10 15:28:00 +00:00
Mike Gibson
7205f5ec9c Made it slightly neater 2014-03-10 15:01:52 +00:00
Mike Gibson
d40452b43d Test if keys are empty before sorting 2014-03-10 14:25:28 +00:00
Mike Gibson
9be789d371 Use array_keys instead of array_flip 2014-03-10 13:29:43 +00:00
Mike Gibson
17652575f3 Fixed key sorting 2014-03-10 13:09:19 +00:00
Mike Gibson
5e896aa94a Removed comparison method 2014-03-10 13:03:04 +00:00
Mike Gibson
00956110f5 Sort route keys in reverse length order before replacing to prevent incorrect matching 2014-03-10 11:43:28 +00:00
ADmad
9de3418079 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Permission.php
2014-02-11 18:17:59 +05:30
Mark Story
6b3a062927 Merge pull request #2799 from sam-at-github/master
Fixed prefixed action prefix reverse routing match. One liner.
2014-02-09 16:02:44 -05:00
Sam
a9059d4a4f Fix formatting - one space too much. Refs #2799. 2014-02-10 02:02:41 +11:00
Sam
7fd13d406c Fixed prefixed action prefix reverse routing match. One liner. 2014-02-10 01:38:32 +11:00
Eric Martins
2793dca671 Fix ApiGen errors 2014-02-07 18:29:54 -02:00
Sam
9691e54248 Minor comments only. Added more explanation of $defaults parameter to Router::connect(). Trying to clarify how it relates to the routing destination and the template string tokens. 2014-02-06 20:34:02 +11:00
Sam
ae3c791b6c Minor documentation corrections about Router::connect(). 2014-02-06 18:41:37 +11:00
ADmad
c093804b35 Merge branch 'master' into 2.5 2014-01-26 17:39:50 +05:30
mark_story
cf16ae055f Remove pointless code.
After the changes in #2709 this code just heats the earth.
2014-01-25 22:13:42 -05:00
Melvin.Ross@gmail.com
7f496fad94 _Trailing_ and $this->keys also do not need to be urldecoded. Both _trailing_ and $this->keys gets set in _writeRoute, which also makes the regex that used to create the array $route.
Any keys in $route that match [_trailing_] or any values in $this->keys are put there through the exection of preg_match. The URL is decoded before being passed to preg_match, which means the values
inside of [_trailing_]etc. have already been decoded.
2014-01-24 17:44:31 -06:00
Melvin.Ross@gmail.com
83f37e48a9 Fix typo that removed '$' from '$key' 2014-01-24 16:33:59 -06:00
Melvin.Ross@gmail.com
8d6814e63f Remove rawurldecode from the _parseArgs function in CakeRoute since urldecode is already called on the URL string in CakeRoute::parse() when creating the $route array that is passed to _parseArgs.
The result of the double urldecodes is parameters with meaningful '%' signs being stripped away on accident, and the web server reporting that the requested address doesn't exist.
2014-01-24 16:14:58 -06:00
Saleh Souzanchi
4639d3597c add DispatcherFilter Settings 2013-12-18 06:54:27 +03:30
mark_story
48d2618c62 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Routing/Router.php
2013-12-08 21:25:59 -05:00
mark_story
85a9132c9b Append / to the start/end of the mapResources prefix.
This makes the method easier to use and less error prone.

Fixes #2431
2013-12-04 21:46:59 -05:00
ADmad
dda6080579 Merge branch 'master' into 2.5 2013-11-19 00:27:12 +05:30
Marc Würth
7cfa0116f4 Removed "PHP 5" from file header DocBlocks
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
ADmad
d9ca148499 Merge branch 'master' into 2.5
Conflicts:
	CONTRIBUTING.md
	lib/Cake/Model/Model.php
	lib/Cake/VERSION.txt
2013-10-30 02:34:09 +05:30
Bryan Crowe
a943ea5c34 Add space between classname(s) 2013-10-22 22:59:50 -04:00
Bryan Crowe
d39ced8381 Correct 'an URL' to 'a URL' in docblocks 2013-10-22 00:09:34 -04:00
Bryan Crowe
1f2a4113bf Readability update for Dispatcher::_invoke() 2013-10-17 00:48:17 -04:00
Jose Lorenzo Rodriguez
df549898ad Merge remote-tracking branch 'origin/2.5' into k-halaburda-master 2013-10-12 01:05:02 +02:00
mark_story
4265dbcc33 Use App.base when there are no requests to generate URL's
Setting App.fullBaseUrl to a non-host value causes issues generating
URL's in a web context. However, not including the base path generates
incorrect URL's in a CLI context. This change allows the use of App.base
to populate the base path which is used as a fallback when there are no
requests, or when the base path is empty.

Refs #2931
2013-10-10 23:07:03 -04:00
Bryan Crowe
4242bd4f3d Additional Cake references to CakePHP and docblock typo 2013-10-09 19:38:16 -04:00
euromark
eb852a0247 Strict checks where applicable. 2013-10-08 20:16:55 +02:00
Bryan Crowe
c1dd0e4393 Changed url to URL where appropriate 2013-10-07 23:17:58 -04:00
mark_story
5e9b22271a Merge branch 'master' into 2.5 2013-09-27 22:26:33 -04:00
euromark
df269ba0ef Cake to CakePHP name 2013-09-27 19:36:43 +02:00
mark_story
a7a6fcae8a Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-09-17 10:11:24 -04:00
euromark
12f2f729c8 more cs 2013-09-17 14:53:07 +02:00
euromark
382f75dbfc cs corrections, bool to boolean and int to integer. 2013-09-17 14:44:34 +02:00
mark_story
6d45953525 Merge branch '2.4' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-08-23 12:57:08 -04:00
mark_story
0f2d59d987 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Network/CakeResponse.php
	lib/Cake/TestSuite/CakeTestCase.php
2013-08-18 23:10:08 -04:00
Mark Story
005699eb49 Merge pull request #1533 from dereuromark/master-null-checks
unify null checks - avoid method call in favor of strict check
2013-08-17 12:05:52 -07:00
joostdekeijzer
7fe2395be3 RedirectRoute class does not honor persist as array with custom route elements.
Custom route elements like '/:lang/etc' should be persisted by redirect
routes as they are in standard routes.

Refs #GH-1531
2013-08-17 14:51:12 -04:00
Rachman Chavik
8e5a9cd7da Accept 'connectOptions' in Router::mapResources() 2013-08-17 19:28:18 +07:00
euromark
6cf147e8c8 unify null checks - avoid method call in favor of strict check 2013-08-16 20:12:49 +02:00
Juan Basso
330f8d168d Merge pull request #1228 from jrbasso/2.4-router-parse
Supoprt query parameters on Router::parse.
2013-08-06 18:57:37 -07:00
ADmad
38b050a711 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Command/ConsoleShell.php
2013-08-04 19:26:55 +05:30
euromark
a5531f7419 fix casing 2013-08-03 04:32:39 +02:00