mark_story
513f7bfe86
Cleanup file header.
2014-04-07 21:26:35 -04:00
euromark
0ece694a75
microptimize options and default merge and other string key array merges
2014-04-08 01:25:14 +02:00
Saleh Souzanchi
40b7694891
adding options for react to response when asset not exists
2014-04-04 19:50:37 +04:30
ADmad
10f294d6bb
Remove $reponse param of Dispatcher::_invoke().
...
Use controller's $response property by default.
2014-03-30 19:29:07 +05:30
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
mark_story
19ac39963a
Remove duplicate code.
...
The conditions for persistParams() work should be self contained. Remove
this duplication.
2013-08-02 13:30:31 -04:00
mark_story
8209a298f7
Make CakeRoute::persistParams() more tolerant
...
Subclasses and instances may not always define persist options.
CakeRoute should be accepting of these differences.
Fixes #3957
2013-08-02 13:28:58 -04:00
ADmad
61bf8df454
Renaming base url config keys and methods for better uniformity.
2013-08-01 00:44:36 +05:30
mark_story
e03d3df0fe
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Test/Case/View/HelperTest.php
lib/Cake/VERSION.txt
2013-07-17 22:40:09 -04:00
mark_story
d4db64ff26
Ignore asset requests containing %2e in them.
...
urldecode URI's early to avoid issues with encoded `.` characters.
2013-07-16 13:14:27 -04:00
mark_story
e016f1156f
Revert previous changes.
...
Adding this parameter was a mistake. Remove it.
2013-07-12 21:37:22 -04:00
mark_story
52be365598
Introduce the strip
argument to Router.
...
This allows callers to request that the basepath *not* be stripped off
when normalizing string URL's. This is important in AuthComponent when
handling redirect URL's as the redirect location could point to
a controller that shares a name with the base path.
Refs #3897
Refs #3916
2013-07-12 21:16:18 -04:00
Harold Putman
1ff77f2363
Fix subtle error in Regex matching URI scheme.
...
[+-.] will match plus, hyphen, and dot, but also comma. Use [+\-.] since commas not allowed in URI scheme.
2013-06-21 15:17:59 -04:00
Harold Putman
2fd36bdedc
Router::url should passthru //example.com/file.ext
...
The function allows ://example.com/file.ext but was treating //example.com as cake-relative URL. The updated regex matches URI schemes as defined in RFC2396. Will passthru any of these formats:
* Starts with a valid URI scheme (javascript:, https:, itunes:, ftp:)
* Starts with a '#'
* [NEW] Starts with a '?' which may be meaningless, but is as valid as starting with '#' (RFC1808)
* starts with //, or :// (:// is not technically valid, but included for compatibilty)
2013-06-21 15:10:11 -04:00
ADmad
12da3b1f27
Merge branch 'master' into 2.4
2013-06-16 13:07:44 +05:30
Mark Story
e454f2d2a3
Merge pull request #1334 from thegallagher/2.3-cache-fix
...
Fix content-type header in cached views.
Fixes #2358
2013-06-12 18:27:42 -07:00
mark_story
cd3c54bb9d
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/VERSION.txt
2013-06-10 22:12:10 -04:00
euromark
42777b7809
incorrect tab to space - whitespace coding standards
2013-06-09 21:01:01 +02:00
David Gallagher
0eead76d4b
Fix content-type header in cached views. Fixes issue #2358
2013-06-06 23:33:51 +10:00
José Lorenzo Rodríguez
3b4a4fde31
Merge pull request #1317 from lorenzo/feature/full-base-url
...
Adding App.fullbaseURL as a recognized Configure value
2013-06-05 15:12:27 -07:00
Jose Lorenzo Rodriguez
10ba4dd773
Fixed CS errors
2013-06-06 00:11:50 +02:00
Jose Lorenzo Rodriguez
7b746ccb57
Overwriting App.fullBaseURL if changed using Router::baseURL()
2013-06-05 23:57:16 +02:00
Marc Würth
4c9f0414cb
Improved the DocBlocks and other code cleanup
...
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
Jose Lorenzo Rodriguez
4bc92b822e
Adding App.fullbaseURL as a recognized Configure value
2013-05-30 16:07:26 +02:00
mark_story
f8c6138ad7
Fix incorrect exception type when double slash paths are used.
...
Fixes #3838
2013-05-18 12:20:06 -04:00
euromark
fab5a6f4d9
spelling corrections
2013-04-30 14:11:50 +02:00
Mark Story
ac94d11e65
Merge pull request #1254 from dereuromark/master-spelling-corrections
...
spelling corrections (a url to an URL, unify URL)
2013-04-29 09:27:48 -07:00
euromark
09d9efe235
spelling corrections (a url to an URL, unify URL)
2013-04-29 11:05:17 +02:00
Saleh Souzanchi
a48149b4db
update doc of Router::redirect
2013-04-29 06:06:22 +04:30
Saleh Souzanchi
720dc5e8c0
fix currentRoute() when $_currentRoute is empty, return false
2013-04-26 09:09:40 +04:30
mark_story
63b392a26b
Improve error message.
...
One of the cases was not explained in the existing error message.
Fixes #3773
2013-04-19 12:13:58 -04:00
mark_story
8eb56960d8
Remove remaining reference operators.
...
These were left over from the days of 1.x and aren't needed anymore.
2013-04-15 21:23:48 -04:00
Juan Basso
ce5563ff83
Supoprt query parameters on Router::parse. It will increase the symmetry of parse and reverse methods
2013-04-12 23:28:23 +00:00
Adam Taylor
433dd09ec4
Fix typos
2013-03-05 00:05:14 -07:00
mark_story
d9fbe5e00a
Tidy up doc blocks.
...
These kind of changes make tidyier method summaries in apigen.
2013-02-26 21:43:53 -05:00
ADmad
484801ecf4
Prevent response object being set as response body
2013-02-16 02:07:02 +05:30
euromark
111366d5c8
== to === and != to !== where applicable
2013-02-12 03:38:08 +01:00
Graham Weldon
66d856d883
Added extra line for referencing license file for copyright
2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4
This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
...
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
euromark
11a88042bd
fix doc block endings
2013-01-11 15:06:54 +01:00
Ceeram
3f4d24bfc0
remove unused local variables and a few improvements
2012-12-23 13:53:13 +01:00
euromark
b811afbc44
double spaces to single ones
2012-12-22 23:48:15 +01:00
Mark
8febb71b67
Merge pull request #1003 from dereuromark/2.3-cache-prefixes
...
cache prefix for view cache to avoid collisions with domains/languages
2012-12-17 00:46:08 -08:00
mark_story
6f5ff4d7dd
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Model/CakeSchema.php
lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
2012-12-13 20:20:42 -05:00
euromark
32f2426001
cache prefix for view cache to avoid collisions with domains/languages
2012-12-11 12:54:16 +01:00
mark_story
6292fc707d
Fix example & incorrect import.
2012-12-09 14:06:28 -05:00
mark_story
9c9cc7fba2
Expand doc block for Router::connect().
2012-12-09 13:57:50 -05:00
euromark
881127ef4d
unify new lines at the end of the file
2012-12-05 15:00:24 +01:00
Saleh Souzanchi
d5283af818
fixed utf-8 pattern in router option
2012-12-02 16:30:45 +03:30
ADmad
72d6ca636f
Docblock fixes
2012-11-29 04:36:29 +05:30
Schlaefer
94a17d40da
fix ticket 3400: url string with # in it is not routed
...
See: http://cakephp.lighthouseapp.com/projects/42648/tickets/3400-url-string-with-in-it-is-not-routed
2012-11-26 16:43:47 +01:00