Commit graph

281 commits

Author SHA1 Message Date
Guy Warner
fb61d9393b Add @trigger doc blocks of methods triggering CakeEvent 2014-11-30 14:45:40 -07:00
wisoot
eb14a64d0b Check whether the filter key is a valid class name before assuming that value is class settings 2014-09-15 15:29:30 +10:00
Anthony GRASSIOT
aa42b80a4d a / an typo fixes fot API 2014-07-30 22:11:03 +02:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
55672b6df3 Merge branch 'router-stars' from Hikkijp
Refs #3582, #3581
2014-06-02 22:38:27 -04:00
mark_story
4362f7bf8b Add tests for CakeRoute::match() and trailing * routes.
Add tests for /pages/** routes, and fix coding standards errors.

Refs #3581
2014-06-02 22:37:37 -04:00
ADmad
e7debd8692 More API docblock CS fixes. 2014-06-02 18:27:11 +05:30
Hikkijp
c622a9dfc2 Fixes bug #3581
Fixes bug #3581 and the issue noticed by markstory
2014-05-27 17:30:38 -03:00
Hikkijp
f7e98e7427 Revert "Fixes bug described in #3581"
This reverts commit e6c6e0bf2c.
2014-05-27 17:25:28 -03:00
Hikkijp
e6c6e0bf2c Fixes bug described in #3581
Routes with '/**' are now correctly handled by the HtmlHelper->link()
2014-05-27 14:03:56 -03:00
Hikkijp
952c7192f4 Revert "Fixes bug described in #3581"
This reverts commit 6c75e3697d.
2014-05-27 14:00:20 -03:00
Hikkijp
6c75e3697d Fixes bug described in #3581
Routes with '/**' are now correctly handled when called by
$this->Html->link() in a view.
2014-05-27 13:50:08 -03:00
ADmad
d466e00644 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
	lib/Cake/Utility/Folder.php
	lib/Cake/VERSION.txt
2014-05-04 14:35:36 +05:30
Mathew Foscarini
f7453500b9 fixed case. 2014-04-30 16:19:15 -04:00
Mathew Foscarini
bb726d58ba Grammar fixes
@return will accept the `|` or operator to define multiple return types. Don't use the word `or`.
2014-04-30 16:09:53 -04:00
euromark
7a287a6942 More coding standard corrections. 2014-04-29 14:19:33 +02:00
mark_story
f1b57d14ab Revert changed added in #2750.
While the had the potential to make 404s going through AssetDispatcher
much faster, they broke plugins + extension routing. While explicit
extensions could be fixed, routing all extensions could not. Because we
are trying to keep 2.x as API compatible as possible it makes sense to
revert the previous changes.
2014-04-13 20:00:34 -04:00
mark_story
749f2b99d9 Don't 404 extensions that could be handled by routing.
Fixes an error in #2750 where routed extensions would always return
404's for plugin requests. When a file extenion could be handled by
router, AssetDispatcher cannot 404 the request.

Refs #3305
2014-04-13 06:48:51 -04:00
Mark Story
caf0217fe0 Merge pull request #3259 from dereuromark/2.5-array-merge
microptimize options and default merge and other string key array merges
2014-04-07 21:44:38 -04:00
mark_story
b05ab740d6 Merge branch '2.5-AssetDispatcher-404' into 2.5
Return a 404 much earlier when handling missing theme/plugin assets.

Fixes #2750
2014-04-07 21:43:37 -04:00
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