Commit graph

594 commits

Author SHA1 Message Date
mark_story
a9750264e4 Revert "Add MySQL FULLTEXT support."
This reverts commit 36c99a358f.
2012-09-20 20:39:02 -04:00
Mark Story
f4a639cbfa Merge pull request #862 from bar/mysql-fulltext
Add MySQL FULLTEXT support.

Fixes #262
2012-09-20 17:20:23 -07:00
Ber Clausen
36c99a358f Add MySQL FULLTEXT support.
Minor optimizations and testing added.
2012-09-20 00:35:42 -03:00
ADmad
d12f50a2b6 Removing unneeded App::uses() calls 2012-09-20 02:40:54 +05:30
mark_story
d6e2b6f83e Re-format long lines. 2012-09-14 22:08:52 -04:00
mark_story
7d2cbec79d Revert "Fix null not stopping model callbacks."
This reverts commit 82a8400def.

The previous change broke a number of tests as existing tests expect
that a return value of null will not stop events.
2012-09-13 22:49:17 -04:00
mark_story
82a8400def Fix null not stopping model callbacks.
Add a compatibility shim into CakeEventManager to fix `null` not
breaking model callbacks.  This was a regression created when model
callbacks were re-factored to use the event manager. This code should be
removed in 3.x as its inconsistent with events used everywhere else in
the framework.

Fixes #3123
2012-09-13 22:11:46 -04:00
mark_story
fb9360767e Make connection exceptions more helpful.
Fixes #3204
2012-09-12 22:31:07 -04:00
Kyle Robinson Young
bc40ac7d3f Remove unused variables and code 2012-09-05 17:19:13 -07:00
Kyle Robinson Young
200dd2dc9b Code standards fixes, unneeded break statements 2012-09-04 11:30:52 -07:00
mark_story
3cb501f1c5 Fix issue created in [e8b5d81fd7]
Query conditions with `-` and no surrounding spaces were quoted
incorrectly.

Fixes #3178
2012-09-03 13:24:38 -04:00
mark_story
e8b5d81fd7 Fix quoting of field names containing -.
Fixes #3165
2012-08-31 14:25:02 +01:00
Jose Lorenzo Rodriguez
f6278488af Ensuring list of behavior methods are refreshed between calls of
validates() in the model, fixes #3071
2012-08-25 14:05:19 +02:00
Jose Lorenzo Rodriguez
60eb228ddf Fixing issues with validation rules not being reset after calling
create() on the model or when calling validates() multiple times
This had interesting side effects when deep saving
2012-08-25 13:29:16 +02:00
mark_story
b2f62f46c5 Fix failing tests in postgres. 2012-08-24 22:37:23 -04:00
Ceeram
f06ce1324d Merge branch '2.2-habtmmerge' 2012-08-24 10:45:45 +02:00
mark_story
dcc5a95482 Only split on ; for TABLE related statements.
Fixes #3142
2012-08-23 23:11:00 -04:00
Ceeram
cb80338c7d avoid duplication in return value when saving habtm 2012-08-24 00:50:46 +02:00
Ceeram
c5ebbc991c Revert "Merge pull request #784 from ceeram/habtmmerge"
This reverts commit fa5aa6278f, reversing
changes made to 88604ac757.
2012-08-23 16:00:41 +02:00
Ceeram
fb0053753e avoid duplication in returned results for habtm 2012-08-22 13:03:47 +02:00
Stephen Cuppett
7e5f326300 Fix STRICT warnings on PHP 5.4 2012-08-19 17:00:26 -04:00
mark_story
c96e364cbb Fix incorrect expiry of sessions.
Fixes #3088
2012-08-02 21:03:53 -04:00
mark_story
cffc36e4e0 Fix notice error when impossible conditions are created.
Fixes #3084
2012-08-01 23:05:56 -04:00
Mark Story
2728c6253e Merge pull request #728 from boast/patch-2
TreeBehavior: Changed $Model->alias . '.' . $field to $Model->escapeField($field)
2012-08-01 19:41:04 -07:00
mark_story
27e2132a13 Generated SQL should not contain multi-column primary keys
While totally valid in databases, the Schema system is not designed to
handle multi-column primary keys in a sane way. In MySQL this results in
two auto_increment columns, and in postgres this results in two serial
columns.

Fixes #3069
2012-07-27 22:31:49 -04:00
mark_story
162d3bcb29 Fix whitespace errors. 2012-07-23 22:44:05 -04:00
David Thalmann
f926ae7637 Clean up string concatenations and refactored some reused strings into variables.
Refs #GH-729

Signed-off-by: mark_story <mark@mark-story.com>
2012-07-23 22:30:28 -04:00
mark_story
e6ef218600 Fix associated translations being inserted.
Due to changes introduced in [1c0b6c076a]
associated translations would incorrectly be saved with a value of ''.

Fixes #3057
2012-07-22 20:59:24 -04:00
David Thalmann
78de6e276a Removed inline method calls in curly braced string concat's. 2012-07-22 03:40:49 +03:00
David Thalmann
d9b5ec1a3a Changed all string concatenations like $Model->alias . '.' . $field to the more consistent $Model->escapeField($field). 2012-07-21 22:07:51 +03:00
mark_story
a63dd9ee9d Fix incorrect formatting in TreeBehavior.
Fixes #3045
2012-07-17 21:06:41 -04:00
mark_story
a7c79e5da2 Fix warnings when deleting records that do not exist.
Fixes #3037
2012-07-14 15:54:07 -04:00
mark_story
8fc5726920 Remove trailing whitespace. 2012-07-11 21:39:32 -04:00
Jose Lorenzo Rodriguez
39715bcd89 Adding missing afterValidate callback to behaviors, Fixes #3024 2012-07-10 20:35:26 -04:30
Thomas von Hassel
1c0b6c076a Update afterSave to ensure created entires have all translated fields present
Without all fields being present, find() will be unable to find the
translated records.

Fixes #3009
2012-07-07 12:03:29 -04:00
mark_story
eb7b66b37c Revert default value of allowEmpty.
In 2.1, the default value was null, which does not impart any behavior.
In 2.2 this was changed to false, which makes it hard to validate ''
with validation methods.  Move some tests around and update tests that
probably should have been failing before.

Fixes #2983
2012-06-24 20:06:14 -04:00
mark_story
5e54be4e5a Merge branch '2.1' into 2.2
Conflicts:
	lib/Cake/Error/exceptions.php
2012-06-23 16:41:32 -04:00
Ceeram
b913fe5303 better error message in MissingConnectionException when driver is not enabled 2012-06-23 11:42:26 +02:00
Ceeram
71112d1225 No need to create new instance of ModelValidator when one is already created 2012-06-20 14:57:56 +02:00
Ceeram
60c611fa47 Parse rules in getField() 2012-06-20 14:54:32 +02:00
Ceeram
03e2263b69 Merge branch '2.1' into 2.2 2012-06-19 18:35:36 +02:00
Ceeram
cf18e8d38b avoid unneeded query in delete() 2012-06-19 16:08:36 +02:00
Ceeram
0df1e90eed show all validation errors when saving/validating Associated and primary model fails validation as well, fixes #2925 2012-06-18 14:20:53 +02:00
mark_story
f625742a12 Make CakeSession use httponly by default.
Fixes #2955
2012-06-12 22:10:55 -04:00
Kyle Robinson Young
54745aada9 Fix custom validation methods with CakeValidationSet 2012-06-11 23:28:45 -07:00
mark_story
f3464b002f Remove duplicate code.
Use a shutdown function to close the session off.
This removes a bit of icky code and continues to allow
objects to be used as session handlers.
2012-06-06 21:01:16 -04:00
Jose Lorenzo Rodriguez
51635c2ca6 Merge remote-tracking branch 'origin/2.1' into 2.2
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Model/ModelValidationTest.php
2012-06-06 11:06:06 -04:30
Jose Lorenzo Rodriguez
111a23274e Fixing yet another issue related to beforeValidate and
validateAssociated
2012-06-06 10:07:01 -04:30
Ceeram
4c6453501e Merge branch '2.1' into 2.2 2012-06-02 01:47:21 +02:00
Ceeram
048dc8d254 casting schema to array, fixes error for array_keys when return is null 2012-06-02 01:39:53 +02:00