Commit graph

4185 commits

Author SHA1 Message Date
Mark Story
5b78a662e8 Adding tests for querystring reversal. 2009-12-27 23:10:29 -05:00
Mark Story
886cd9e719 Adding Router::reverse and basic test case. 2009-12-27 23:09:26 -05:00
tPl0ch
1eff024e7e Removed unnessecary connect keys from all Dbo's _baseConfig. Updated connect methods where needed. Fixes #132
Signed-off-by: Mark Story <mark@mark-story.com>
2009-12-27 12:47:52 -05:00
Mark Story
8b93235847 Fixing auto merge issues. 2009-12-27 12:45:34 -05:00
Mark Story
7a620b62b0 Merge branch '1.3-misc' into mergers
Conflicts:
	cake/libs/model/datasources/dbo_source.php
	cake/libs/view/helpers/js.php
2009-12-27 12:45:12 -05:00
Mark Story
6b2154d961 Merge branch '1.2' into mergers
Conflicts:
	cake/libs/inflector.php
	cake/tests/cases/libs/model/model_validation.test.php
2009-12-27 12:34:27 -05:00
predominant
19924501d1 Updating Inflector to employ internal caching.
Refs #23
2009-12-25 18:53:38 +11:00
Joël Perras
173b4e7b5d Merge branch '1.3-misc' of github.com:cakephp/cakephp1x into 1.3-misc 2009-12-22 23:53:01 -05:00
Joël Perras
8eb9f9e8fd Implenting IPv6 validation using filter_var(), with a regex-based fallback if the aforementioned function does not exist (PHP < 5.2). Fixes #38. 2009-12-22 23:52:06 -05:00
Mark Story
20c02e39d6 Adding doc block for options on NumberHelper::currency() 2009-12-22 19:17:23 -05:00
Mark Story
0b558c6eb0 Adding code to make tests from previous commit pass. 2009-12-22 19:12:11 -05:00
Mark Story
1a387e6b8a Fixing url parameters set with options() or beforeRender not being merged on next() / prev().
Tests added. Fixes #129
This reverses the change made in efa36abdf0 which broke this behavior.
2009-12-22 19:05:06 -05:00
Mark Story
425dcf2df5 Applying patch from 'tPl0ch', connect key is set to 'mysql_connect' when not using persistent connections. Fixes #132 2009-12-22 13:23:55 -05:00
Mark Story
c00cebb0c3 Removing doc for param that no longer exists. 2009-12-21 09:54:35 -05:00
ceeram
6d8fa76bed edit of docblock
Signed-off-by: Mark Story <mark@mark-story.com>
2009-12-21 09:52:33 -05:00
Mark Story
5274dce9f1 Making set vars with Js->set go to the top of the buffered scripts array. Tests added.
Updating doc blocks for JsHelper and JsBaseEngineHelper.
Fixes #131
2009-12-21 09:41:36 -05:00
Mark Story
42fa6ff04a Fixing JsHelper::writeBuffer when inline is set to false. Scripts are now enclosed in a script tag. Fixes #130 2009-12-21 09:29:28 -05:00
Mark Story
850b95900b Adding fix for Cache causing App to do an directory scan when importing a core cache engine. Since these operations occurred before the core configurations had be set, a directory scan was done on every request. This change also makes in not possible to override the core cache engines with app versions. 2009-12-20 18:11:18 -05:00
Mark Story
2e96bfe833 Merge branch '1.3-misc' of git@github.com:cakephp/cakephp1x into 1.3-misc 2009-12-20 16:50:48 -05:00
Mark Story
34410de7c8 Adding property definition for Model::$virtualFields 2009-12-20 16:26:12 -05:00
ADmad
01c31596c8 Cleaning up commented code 2009-12-21 02:50:39 +05:30
ADmad
d561405daa Renaming RequestHandler::getReferrer to RequestHandler::getReferer for (mis)spelling consistency and deprecating the former 2009-12-20 23:06:28 +05:30
ADmad
f36e5eff5f Merge branch '1.3-misc' of github.com:cakephp/cakephp1x into 1.3-misc 2009-12-20 13:22:43 +05:30
Mark Story
c669f8c998 Fixing failing tests in AuthComponent because of required parameter. 2009-12-19 19:58:55 -05:00
Mark Story
4ac0a55aff Merge branch 'virtual-fields' into 1.3-misc
Conflicts:
	cake/tests/cases/libs/controller/controller.test.php
2009-12-19 19:40:12 -05:00
ADmad
cea102c357 Updating doc block to reflect that url can be string or array and removing 'escapeTitle' param. Use key 'escape' in options instead 2009-12-20 00:46:47 +05:30
Mark Story
071c6f0e8b Merge branch 'sql-dump' into 1.3-misc 2009-12-19 13:32:01 -05:00
Mark Story
42e13edd85 Adding file header to sql dump element. 2009-12-19 13:24:00 -05:00
Mark Story
13ffcbc0ba Updating doc blocks in Datasource. Adding missing reference operators. 2009-12-19 13:23:46 -05:00
Mark Story
7387cfdf6b Adding @access tags and expanding doc blocks. 2009-12-19 13:06:32 -05:00
Mark Story
7fd9b5ae3b Removing auto dump of sql log. 2009-12-19 12:40:32 -05:00
Mark Story
6efe61d9b2 Removing controller dump and debug = 3 support from View. Controller dumps often cause memory overflow errors, and are generally not useful. 2009-12-19 12:30:31 -05:00
Mark Story
a89fcba243 Updating DboSource::getLog() and showLog() to use a View element.
Updating tests to reflect changes in getLog()
2009-12-19 12:09:01 -05:00
Mark Story
cbb29dcc5d Extracting sql dump generation into a view element.
Changing the behavior of DboSource::getLog().
Adding sql dump element to layout.
2009-12-19 12:09:01 -05:00
Mark Story
3eaff3e021 Correcting FormHelper::minute() to fix issues with extracting values from array formatted data. Fixes #107 2009-12-19 11:55:35 -05:00
Mark Story
959befb6e1 Merge commit 'josezap/virtual-fields' into virtual-fields 2009-12-18 19:11:50 -05:00
Mark Story
6356c6ed87 Fixing issue where forms generated with requestAction would be missing the _Token fields that Security component creates. Test cases added to ensure that token key does not change when requestAction is used.
Fixes #68
2009-12-18 19:05:33 -05:00
José Lorenzo Rodríguez
8f29f59c1a Enclosing virtual fields in parentheses to avoid SQL errors
Added new tests to improve  code coverage on virtual fields
2009-12-17 14:42:46 -04:30
Mark Story
264cdb78c0 Removing unnecessary key. 2009-12-17 10:13:05 -05:00
Mark Story
b190e462b8 Fixing whitespacing. 2009-12-17 00:15:42 -05:00
Mark Story
e8f0ea951a Updating tests and doc blocks for JsHelper::writeBuffer() to return null if no scripts have been buffered. Fixes #108 2009-12-16 23:48:29 -05:00
kleingeist
2d9b13fe88 Prevent JsHelper::writeBuffer() to return empty lines (or empty onDomReady events)
Signed-off-by: Mark Story <mark@mark-story.com>
2009-12-16 23:36:40 -05:00
Mark Story
0bc1126114 Merge branch 'component-settings' into 1.3-misc 2009-12-16 23:08:16 -05:00
Mark Story
8960a01649 Merge branch '1.3-misc' of git@github.com:cakephp/cakephp1x into 1.3-misc 2009-12-16 23:08:00 -05:00
Mark Story
ff74a599c6 Adding ability to set configuration from initialize() for RequestHandler.
Tests added.
2009-12-16 23:06:16 -05:00
Mark Story
e45fcf4337 Adding ability set component configuration from component settings for SecurityComponent. 2009-12-16 23:06:16 -05:00
Mark Story
dffff314e1 Implementing setting of auth configuration through component settings arrays.
Adding test case from Ceeram.
2009-12-16 23:06:16 -05:00
Mark Story
bbc72c3703 Updating use of deprecated split() to use preg_split(). 2009-12-16 21:08:15 -05:00
Mark Story
c8297ff283 Minor optimization on Inflector::variable 2009-12-16 19:23:29 -05:00
real34
bdfb50e6bb Fixed a bug in Set::extract. Wrong key returned when two arrays are at the extraction level.
Signed-off-by: Mark Story <mark@mark-story.com>
2009-12-16 18:33:23 -05:00
Mark Story
7ceb50b696 Removing controller key as a default when Routes are connected. Was causing issues when using regex qualifiers on controller keys.
Tests added.
2009-12-16 15:04:59 -05:00
Mark Story
09966a7f63 Adding support for .ttf, .otf, .eot to MediaView. These are common font assets used with @font-face techniques. 2009-12-16 12:48:34 -05:00
Mark Story
4ac29963a8 Refactoring Model::__validateWithModels. Should be slightly faster as loops are smaller. 2009-12-15 22:55:34 -05:00
Mark Story
a490e249fa Adding test for validation of with models canceling a save.
Adding initial implementation of Model::__validateWithModel().

Correcting error in previous commit.  Adding tests for saveAll and validating habtm with models.
2009-12-15 22:55:22 -05:00
ADmad
33038c75ac Removing redundant 'isset' check from DboMysql::connect 2009-12-15 20:41:44 +05:30
ceeram
64045e1e18 Apply new Helper syntax to remaining files
Signed-off-by: Mark Story <mark@mark-story.com>
2009-12-14 18:52:13 -05:00
Mark Story
ecc38f0aed Adding additional tests for CakeRoute::persistParams(). Ensures that url params can overwrite persisted values.
Tests added.
2009-12-14 18:43:29 -05:00
Joël Perras
86cba7dc50 Fixing wrong header message text for ErrorHandler::error500() header sent. Refs #70."" 2009-12-14 16:21:30 -05:00
Mark Story
4f985e465b Applying patch from 'kleingeist'. JsHelper::set() now generates a variable that is assigned to window.$var instead of creating a local variable by default.
Tests updated.
Fixes #96
2009-12-13 23:53:20 -05:00
predominant
aaddd0d394 Moving certain datasources to the Datasources Plugin (http://github.com/cakephp/datasources) 2009-12-13 23:53:20 -05:00
predominant
d550a5e82c Code formatting cleanup. Fixes #92. 2009-12-13 23:53:20 -05:00
renan.saddam
b273981915 Checking for french error on dbo_mssql. Fixes #77. 2009-12-13 23:53:19 -05:00
Joël Perras
7b1ccfff57 Changing error handler to send a HTTP/1.1 500 error when missingTable, missingDatabase or missingConnection is encountered. Increased test coverage of libs/error.php to 100%. Fixes #70. 2009-12-13 23:53:19 -05:00
Joël Perras
96c245c6a7 Moving list of http codes out of Controller::redirect() and into a new method, Controller::httpCodes() for better reusability. See doc blocks for usage details. 2009-12-13 18:04:55 -05:00
Mark Story
02330b2d9c Making DboSource::fields() accept an expression object. Fixes issues with sql parsing over quoting special SQL syntax.
Tests added
Fixes #66
2009-12-13 15:52:07 -05:00
Mark Story
904b9f5f1c Adding test and fix to ensure the debug = 0, log = false leaves error_reporting set to 0.
Fixes #89
2009-12-11 00:46:13 -05:00
Mark Story
f26d5efd0c Applying patch from 'kleingeist'. JsHelper::set() now generates a variable that is assigned to window.$var instead of creating a local variable by default.
Tests updated.
Fixes #96
2009-12-10 23:37:55 -05:00
José Lorenzo Rodríguez
c65e2f3f18 Quoting virtual fields in automatically
Updating test cases
2009-12-10 20:46:55 -04:30
José Lorenzo Rodríguez
8c4cad86c2 Fixing erroris due to bad rebase 2009-12-10 20:35:24 -04:30
José Lorenzo Rodríguez
4b9e03c9f7 Creating accesor methods for virtual fields and replacing direct access from DboSource with new methods 2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
7a7d0de988 Adding support for virtual fields in DboSourse::calculate 2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
d06ff5d10a Adding support for virtual fields in conditions array 2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
cf359a38b3 Re-adding ability to order by virtual fields in DboSource::order
Adding support for paginating virtual model fields in controller
2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
051d352eab Reimplementing DboSource::order() to avoid recursion so it can be more easily manipulated to add virtual fields (and hopefully to make it a little bit faster) 2009-12-10 20:08:14 -04:30
José Lorenzo Rodríguez
5a58813031 Making DboSource order by virtual fields 2009-12-10 20:08:13 -04:30
José Lorenzo Rodríguez
7efafc685e Fixing virtual fields fetching for Model::field() calls
Adding doc blocks
2009-12-10 20:08:13 -04:30
José Lorenzo Rodríguez
22e36cb057 Fixing bug where sometimes key($data[0]) returned empty string instead of first key in array 2009-12-10 20:08:12 -04:30
José Lorenzo Rodríguez
a81edb6080 Extending virtual fields implementation to work on queries with field list 2009-12-10 20:07:46 -04:30
José Lorenzo Rodríguez
53765312df Initial implementation of model virtual fields 2009-12-10 20:07:07 -04:30
José Lorenzo Rodríguez
285329e7a4 Fake commit 2009-12-10 20:05:11 -04:30
José Lorenzo Rodríguez
2503632327 Working on virtual fields on order clause. 2009-12-10 20:05:10 -04:30
José Lorenzo Rodríguez
0ab2078284 Changing Model::hasField() api to accept second parameter for checking existance of virtual field 2009-12-10 20:05:10 -04:30
José Lorenzo Rodríguez
ec672e99e8 Fixing virtual fields fetching for Model::field() calls
Adding doc blocks
2009-12-10 20:05:10 -04:30
José Lorenzo Rodríguez
4685daf299 Fixing bug where sometimes key($data[0]) returned empty string instead of first key in array 2009-12-10 20:05:10 -04:30
José Lorenzo Rodríguez
f7a113d2b0 Convertig old-style find call to new api 2009-12-10 20:01:58 -04:30
José Lorenzo Rodríguez
00c0bb4d62 Extending virtual fields implementation to work on queries with field list 2009-12-10 20:01:58 -04:30
José Lorenzo Rodríguez
19c91f1f70 Initial implementation of model virtual fields 2009-12-10 20:01:58 -04:30
predominant
df151395c5 Moving certain datasources to the Datasources Plugin (http://github.com/cakephp/datasources) 2009-12-11 01:07:23 +11:00
predominant
8df7e34965 Code formatting cleanup. Fixes #92. 2009-12-10 13:04:11 +11:00
renan.saddam
c3bf6bc0e8 Checking for french error on dbo_mssql. Fixes #77. 2009-12-09 21:20:55 -02:00
renan.saddam
931606f7f5 Checking for french error on dbo_mssql. Fixes #77. 2009-12-09 21:10:37 -02:00
Mark Story
ecea49f823 Updating AuthComponent's mapped actions features to use Router::prefixes()
Adding tests for prefix interactions.
Adding tests for AuthComponent::logout, increasing code coverage.
2009-12-09 00:25:21 -05:00
Mark Story
6b657d9a9d Fixing failing tests due to incorrect merging. 2009-12-08 23:07:43 -05:00
Mark Story
de7658e78b Modifying FormHelper::create() and FormHelper::secure() to use hidden divs instead of hidden fieldsets. This improves the semantics of FormHelper and allows generated html to more easily pass HTML4.0 validation.
Test cases updated.
2009-12-08 22:58:08 -05:00
Mark Story
17777af3d3 Adding test case, and removing unreachable code. 2009-12-08 21:43:29 -05:00
Mark Story
4421fe6dc3 Fixing issues in router where plugin => null would not always exit a plugin route. Test cases added. 2009-12-08 21:36:25 -05:00
Mark Story
efa36abdf0 Fixing double merging of url options in paginator helper. This was causing duplicate passed url parameters in next()/prev().
Test cases added.
Fixes #391
2009-12-08 10:01:33 -05:00
predominant
13ffd76178 Removing "Long description for file" from /cake/libs tree. 2009-12-08 20:19:02 +11:00
mark_story
24b636cc71 Merge branch 'mergers' into 1.2-merger
Conflicts:
	cake/libs/view/helpers/text.php
	cake/tests/cases/libs/view/helpers/text.test.php
2009-12-06 22:03:17 -05:00
mark_story
1f5c6eac2e Fixing issues in tests caused by overwritten columns.
Fixing issue where mysqli had errors using getCharsetName, moving DboMysqlBase::getCharset down to DboMysql.
2009-12-06 21:46:05 -05:00
mark_story
7259a1b920 Merge branch '1.2' into 1.2-merger
Conflicts:
	cake/libs/model/datasources/dbo/dbo_mysql.php
	cake/libs/model/datasources/dbo/dbo_mysqli.php
	cake/libs/view/helpers/text.php
	cake/libs/view/theme.php
2009-12-06 21:43:53 -05:00
mark_story
360810a1cf Merge branch '1.3-router' into mergers 2009-12-06 21:11:47 -05:00
mark_story
bbb61b28f7 Merge branch '1.3-misc' into mergers 2009-12-06 21:11:26 -05:00
mark_story
4cefb5fbd0 Applying patch from kleingeist to fix Js->value incorrectly calling Helper::value() 2009-12-06 20:45:12 -05:00
mark_story
626f2e86de Adding trigger_error for incorrect class use. 2009-12-03 21:29:02 -05:00
mark_story
0047ac8f34 Renaming RouterRoute to CakeRoute 2009-12-03 21:20:08 -05:00
mark_story
8c4d389760 Implementing the ability to use custom Route classes when connecting routes. Tests added. 2009-12-03 20:50:13 -05:00
mark_story
218af686d7 Renaming parameters. 2009-12-03 20:32:28 -05:00
mark_story
aff7d61277 Merge branch '1.3-misc' into 1.3-router 2009-12-03 19:13:28 -05:00
AD7six
9cd7888991 removing reference to unused variable __bare 2009-12-03 21:33:56 +01:00
mark_story
3b74c93582 Changing how helpers are extracted, fixes issues with view variables not overwriting local helper variables. Fixes #381 2009-12-03 09:55:49 -05:00
mark_story
be64f26f9f Updating doc blocks for model::validates. 2009-12-03 00:53:31 -05:00
mark_story
0806545f35 Adding passthrough to localized Validation class for Validation::ssn. Tests added. Fixes #378 2009-12-02 20:57:14 -05:00
mark_story
16f6d4d408 Making the various SecurityComponent::requireXX methods accept a single array or a list of strings as their arguments. Unifies the use of these functions with AuthComponent. Fixes #354 2009-12-02 17:56:52 -05:00
mark_story
cc1ba32f50 Removing call to RouterRoute::compile() 2009-12-02 01:10:50 -05:00
mark_story
61b70f1b44 Removing parameters from RouterRoute::_writeRoute(). 2009-12-02 00:26:43 -05:00
mark_story
494875cca2 Renaming RouterRouter::$params to $options. 2009-12-02 00:20:51 -05:00
mark_story
728613a34d Removing use of Set::filter() as its slowish. 2009-12-01 23:05:04 -05:00
mark_story
67ccac1f57 Adding omitted reference operator. 2009-12-01 22:31:18 -05:00
mark_story
63cd1a3326 Renaming method and removing Set::filter() call. 2009-12-01 22:21:33 -05:00
mark_story
78773020d1 Moving route failure handling to a separate method. 2009-12-01 21:56:03 -05:00
mark_story
4c175cc0bc Removing code. 2009-12-01 21:43:36 -05:00
mark_story
02ed766874 All tests passing in RouterTest. 2009-12-01 21:37:39 -05:00
mark_story
e741e0e4cb Adding test for previously broken reverse routing feature, where parameters that only partially passed the pattern would be accepted. 2009-12-01 15:04:53 -05:00
mark_story
e36631091d Fixing a failing test. 2009-12-01 14:58:36 -05:00
mark_story
21dd7fd4ca Fixing connection of plugin routes, the were being connected in the wrong spot.
Moving admin route + plugin tests to correct place.
Fixing order of methods in tests. parse() should only be called after routes are connected otherwise the default routes will precede the custom routes.
2009-12-01 14:39:23 -05:00
mark_story
a8f79f9fe5 Removing defaults that are also keys this makes the actions with the default index key work much better. Also things can't be both a variable and a constant routing parameter. 2009-12-01 13:37:03 -05:00
mark_story
6046528744 Moving XmlNode::__killParent() to a protected method so Xml can access it. Adding _killParent(true) call to Xml::__destruct. Forces destruction of circular references held in child objects when an xml object is garbage collected. Fixes #369 2009-12-01 10:01:36 -05:00
mark_story
547ed839d9 Correcting constructor of MediaView to fix issues with viewVars not being set.
Correcting use of MediaView in Dispatcher.  Fixes #366
2009-12-01 09:50:27 -05:00
mark_story
393038816c More tests passing in RouterTest now. 2009-11-30 10:15:39 -05:00
mark_story
cd46f4db2e Fixing function signature of ThemeView constructor. Fixes issues where ThemeView would always be registered causing issues with EmailComponent and themed views. Fixes #370 2009-11-30 09:19:25 -05:00
mark_story
fccfe14e8d Expanding doc block for ClassRegistry. 2009-11-30 09:18:24 -05:00
mark_story
11dd7898c4 Fixing tests + adding tests for passed args order preservation when passed args are part of default route parameters. 2009-11-30 00:23:41 -05:00
mark_story
e41c408378 Adding parameter pattern matching back into RouterRoute::match(), fixes failing tests in RouterRoute test case. 2009-11-29 23:46:02 -05:00
mark_story
5999264f10 Most of RouterRoute::match() working now. Failing tests for params with patterns included. 2009-11-29 22:57:10 -05:00
mark_story
de0b90db4a Moving addition of plugin and controller keys to Router instead of RouterRoute. 2009-11-29 16:21:33 -05:00
mark_story
9e9559b350 Working on RouterRoute::match(). Adding tests for RouterRoute::match() and removing defaults from routes that don't need defaults. 2009-11-29 16:09:45 -05:00
mark_story
0834cb47ab Removing code from RouterRoute::__mapRoute. All tests passing. 2009-11-29 12:10:09 -05:00
mark_story
b242dc9531 Moving parameter persist to RouterRoute.
Tests updated.
2009-11-29 10:59:38 -05:00
mark_story
f59b8daf2e Expanding tests for passed arguments in route defaults working correctly. Refactoring passed arguments in route default handling. 2009-11-29 09:49:19 -05:00
mark_story
889e367510 Expanding and correcting doc block for router::connect. 2009-11-28 23:37:40 -05:00
mark_story
7216925394 Updating doc blocks. 2009-11-28 23:12:44 -05:00
mark_story
a86e414adc Removing Router::stripEscape() and all uses of it.
Router::stripEscape() removed escape patterns supported in DboSource.  Since those escape patterns no longer exist, neither does the need for the escaping of those patterns.
2009-11-28 23:08:52 -05:00
mark_story
d70689ecda Merge branch '1.3-misc' into write-route 2009-11-28 23:04:22 -05:00
mark_story
02f9275e20 Removing automagic -! sql no-escape string handling. Removing use of Router::stripEscape() from Dispatcher, as this method removed -! from url + post data. 2009-11-28 23:02:59 -05:00
mark_story
5cbe3dbd39 Removing unused variables. Making loop easier to read. 2009-11-28 21:58:02 -05:00
mark_story
5b4d15dc3b Removing support for mid route * elements. Mid-route lazy * behaved in a sometimes erratic fashion making routes employing mid-route lazy * hard to depend on. 2009-11-28 21:54:33 -05:00
mark_story
33c67f7c47 More tests passing and more code moved from Router to RouterRoute. Switching RouterRoute to used named capture groups. This simplifies the route processing internals as there are fewer loops used to merge array sets together. 2009-11-28 09:40:15 -05:00
mark_story
4cb055ff0a Removing tests for features no longer supported. Path elements containing only regular expressions are no longer supported. They did not effectively reverse route. And they provided an inconsistent behavior when combined with the full gamut of regular expressions and routing parameters. 2009-11-27 17:12:35 -05:00
mark_story
26aa3731e0 Fixing _name_ elements being inserted into serialized xml from Xml lib. Test case added. Fixes #367 2009-11-27 14:27:32 -05:00