Commit graph

5426 commits

Author SHA1 Message Date
Ber Clausen
026565033b Model objects variables should be CamelCase. 2013-11-12 00:49:06 -03:00
Ber Clausen
6b8a79be6d Remove reference from the signature. 2013-11-12 00:29:36 -03:00
Ber Clausen
cb42b056ac Remove the 'Line indented incorrectly' PHPCS error. 2013-11-12 00:08:39 -03:00
Ber Clausen
7f570f33e4 Unindent, and remove unnecessary getDataSource() call.
Also, objects should be CamelCase.
2013-11-12 00:01:18 -03:00
Ber Clausen
b35c9671ad Explicitly build SQL statements, calling buildAssociationQuery(). 2013-11-11 23:27:50 -03:00
Ber Clausen
f0fcaa1305 Improve generateAssociationQuery():
* bail early when $linkModel is Null (BC for now).
* move SQL fields warmup and SQL statement building to its own functions
 (it will payoff later improving self documentation and readability).
* make assignments and function calls only when needed (depending on the
 association type).
2013-11-11 23:27:50 -03:00
Ber Clausen
64f34b75a2 Fix a couple of failing tests. 2013-11-11 23:27:50 -03:00
Ber Clausen
dcadfcbcab Remove inline assignment. 2013-11-11 23:27:50 -03:00
Ber Clausen
53c6df554c Remove unused $resultSet argument from generateAssociationQuery(). 2013-11-11 23:27:50 -03:00
Ber Clausen
5da05d9216 Remove unneeded test inside conditional. 2013-11-11 23:27:50 -03:00
Ber Clausen
f16695db5f Move variables to logical blocks.
Unindent to ease readability, and avoid assigning variables when
unneeded.
Free a little memory before entering to recursive intensive loops.
2013-11-11 23:27:50 -03:00
Ber Clausen
fdb4b11d0b Remove unnecessary call to getDataSource(). 2013-11-11 23:27:50 -03:00
Ber Clausen
c9e0131d6a Only generate query data for hasOne and belongsTo associations.
Avoid calling generateAssociationQuery():

* when the return value will never be usefull (True in this case)
* to avoid polluting $queryData with uneeded fields

Later, the SQL statement for the primary, and 'hasOne' plus 'belongsTo'
relationships, is built.
2013-11-11 23:27:50 -03:00
Ber Clausen
2532228844 Improve readability and optimize minimizing variable lookups. 2013-11-11 23:27:49 -03:00
mark_story
63d867c98b Restore global event managers that were causing cascading failures.
Refs #2105
2013-11-10 22:35:00 -05:00
Andy Hobbs
3e373771d7 Corrected coding standards violations in CaKeEventManagerTest.php
- Changed combining of arrays in CakeEventManager::listeners() to be more efficient

Refs #2105
2013-11-10 22:34:50 -05:00
Andy Hobbs
7656ffd12e Corrected coding standards violations in CateEventMAnagerTest.pnp
Refs #2105
2013-11-10 22:34:43 -05:00
Andy Hobbs
11db7c1631 Removed EventManager test that tested using a closure as it breaks compatability with php < 5.3.0
Refs #2105
2013-11-10 22:34:35 -05:00
Andy Hobbs
615f700d22 Added EventManager::prioritisedListeners() function to alow the global event manager to return unprocessed listeners array
Refs #2105
2013-11-10 22:34:27 -05:00
Andy Hobbs
e8984a9033 Profiles and optimised EventManager::listeners() function, reducing execution time by 14.5%
Refs #2105
2013-11-10 22:34:05 -05:00
mark_story
3561929be7 Merge branch 'master' into 2.5 2013-11-10 21:53:09 -05:00
José Moreira
b1e366c500 Model.php PHPDoc Description: Chang afterFilter with afterFind 2013-11-10 16:59:28 +00:00
mark_story
8d38861a2e Fix missing HTML encoding on URL's generated by Html->meta().
The input URL was not correctly handled as an asset URL and thus was
not correctly HTML or URL escaped. This created invalid HTML when
favicon URLs included query string arguments.

Refs #2233
2013-11-09 14:31:09 -05:00
mark_story
bf2f2e772e Split existing tests up, and add tests for Router based image URL's
Refs #2233
2013-11-09 12:00:56 -05:00
mark_story
3c1f775ab2 Merge branch 'master' into 2.5 2013-11-09 09:37:27 -05:00
mark_story
ada0ec4c77 Fix formatting of decimal values when there is no fractionSymbol.
When a currency format does not include a fractionSymbol it should be
able to format fractional values.

Fixes #2253
2013-11-09 09:36:38 -05:00
mark_story
407c420176 Remove CRLF from To headers in MailTransport.
Like other header fields To should not contain CRLF.

Refs #2209
2013-11-08 13:25:51 -05:00
mark_story
2e7d687b98 Merge branch 'master' into 2.5 2013-11-07 23:01:25 -05:00
Bryan Crowe
9ee5efaa2d Add missing return type 2013-11-07 22:14:11 -05:00
mark_story
145dbacb78 Fix incorrectly encoded headers in MailTransport.
When encoded values are present in header fields, they need to have
newlines removed as leaving the newlines in place and interfere with
delivery on Qmail based SMTP servers.

Fixes #2209
2013-11-04 22:17:21 -05:00
ADmad
d647fe8a91 Added buffering of form tags generated by FormHelper::postLink() 2013-11-03 23:11:11 +05:30
mark_story
afd182898f Merge branch 'master' into 2.5 2013-11-01 16:54:57 -04:00
mark_story
d8acf531cb Merge branch 'postgres-sequence'
Merge changes for pull request #2248
2013-10-31 19:53:51 -04:00
mark_story
9e4ac31dc3 Correctly identifier quote column names before adding them to queries.
Closes #2248
2013-10-31 19:53:42 -04:00
davidsteinsland
94998763a5 Fixing whitespace 2013-10-31 23:58:52 +01:00
davidsteinsland
e68a61c375 Added configurable default value to Hash::get() 2013-10-31 23:31:48 +01:00
Rachman Chavik
fb436644c3 RedisEngine: Support for selecting database number
Closes GH-2254
2013-10-31 20:45:39 +07:00
Bryan Crowe
94d7ac1dd6 Correct spelling of retrieve 2013-10-30 23:13:07 -04:00
Luis Ramos
e33653a8d7 Add test case 2013-10-30 16:06:27 -06:00
Luis Ramos
db63ba2d8f Parse cookie values "{}" & "[]" as array 2013-10-30 15:26:50 -06:00
mark_story
aaac360833 Merge branch 'master' into 2.5 2013-10-30 14:58:20 -04:00
Mark Story
d6f5f2f0bb Merge pull request #2244 from dereuromark/2.5-debugger
Pass depth through for Debugger::dump().
2013-10-30 11:26:28 -07:00
Zach Gambino
927a4933d1 Fix for #2247 | Use correct column when calculating next sequence value
See #2247 for more details.
2013-10-30 11:25:06 -07:00
euromark
fecbef5949 Pass depth through for Debugger::dump(). 2013-10-30 18:31:48 +01:00
Mark Story
9d87f6fcb5 Merge pull request #2239 from bcrowe/hotfix-strictTimeCompare
Update date comparisons to be strict in CakeTime
2013-10-29 20:14:19 -07:00
Bryan Crowe
507bb44301 Update date comparisons to be strict in CakeTime 2013-10-29 23:02:14 -04:00
mark_story
16be5722ba Fix COUNT(DISTINCT x) queries from getting corrupted in Sqlserver.
Add into the tower of hacks that is the SQL generation and stop breaking
COUNT(DISTINCT foo) style queries. Previously these would be converted
into DISTINCT COUNT(foo) which will give the non-distinct results.
2013-10-29 23:01:55 -04:00
mark_story
0f8dae55c9 Add missing trim() around Sqlserver queries.
This solves issues with queries failing.

Fixes #2222
2013-10-29 23:01:49 -04:00
Bryan Crowe
00c5e88570 Make use of timezone parameter in CakeTime::dayAsSql() 2013-10-29 20:29:01 -04:00
mark_story
525efcb808 Remove use of deprecated constants.
Fixes #2232
2013-10-29 17:49:16 -04:00