Commit graph

4251 commits

Author SHA1 Message Date
José Lorenzo Rodríguez
ef592363d6 Merge pull request #1123 from dogmatic69/model-cache
Breaking out the find so that it can be easily overloaded for caching
2013-02-16 06:05:11 -08:00
Andrei Neacsu
abe57cecd4 Inflector transliteration for S, s, T, t with comma bellow 2013-02-13 20:47:30 +02:00
Mark Story
4879d45115 Merge pull request #1125 from dogmatic69/find-all-overload
Adding the _findAll method
2013-02-12 06:57:02 -08:00
dogmatic69
e9a385e790 Adding the _findAll method
Now there are no special checks for find('all') and the find can be overloaded like you would
with any other find(*) methods.
2013-02-10 21:06:29 +00:00
euromark
23ef13f9c7 adding Kazakh and correcting some locales 2013-02-10 20:07:09 +01:00
dogmatic69
83a11b7189 adjusting the changes and adding some docs 2013-02-10 11:13:22 +00:00
ADmad
49157d83ae Breaking down AuthComponent::startup() into multiple methods for easier management and extension. 2013-02-10 13:49:07 +05:30
dogmatic69
00abe27ef8 Breaking out the find so that it can be easily overloaded for caching
Before this commit you have to do some hacks to cache model finds easily. When using
custom find methods like `find('foo')` => `_findFoo(...)` it is common for the
method to adjust the query params.

Trying to cache a query using a hash of the query params :

	function find($type, $query) {
		$query = $this->_beforeFind($query);
		$cacheKey = $type . '_' . md5(selialize($query));

		$cache = Cache::read($cachKey, 'my_cache');
		if ($cacheKey !== false) {
			return $cache;
		}

		$results = $this->_afterFind($type, $query);
		Cache::write($cacheKey, $results, 'my_cache');

		return $results;
	}

Before this commit you either have to completely overload find and rewrite it in the AppModel or call
the before to get the modified `$query` and let cake run the before again.
2013-02-09 16:20:46 +00:00
ADmad
13029cc2bc Merge branch 'master' into 2.4 2013-02-09 02:20:16 +05:30
Marc Würth
514d9675d8 Updated .gitignore, synced app & skel
Added some good practice rules from https://help.github.com/articles/ignoring-files to gitignore
Changed .gitignore to only ignore /app/Config/database.php instead of all files in /app/Config/ (helps to keep it in sync with its skel folder!)

Brought \app\ and \lib\Cake\Console\Templates\skel\ in sync
Fixed various @package annotations in \app\
Fixed various @package annotations in \lib\Cake\Console\Templates\skel\
2013-02-08 15:54:36 +01:00
ADmad
431e610317 Fix broken tests 2013-02-08 19:04:41 +05:30
Graham Weldon
a3702fcf2b More copyright updates 2013-02-08 21:29:18 +09:00
Graham Weldon
26a08c6780 Updated copyright 2013-02-08 21:28:17 +09:00
Graham Weldon
97a60c28c7 Updated copyright and added references to license file for non-standard copyright references 2013-02-08 21:26:18 +09:00
Graham Weldon
66d856d883 Added extra line for referencing license file for copyright 2013-02-08 21:22:51 +09:00
Graham Weldon
ea4545e914 Formatted CSF address 2013-02-08 21:08:15 +09:00
Graham Weldon
3a0e0181b8 Updated copyright date, added CSF address (Thanks Larry) 2013-02-08 21:06:59 +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
mark_story
fb8c2a5e46 Make paths platform dependent.
This fixes issues with the built-in PHP webserver on windows.

Fixes #3608
2013-02-07 20:41:04 -05:00
mark_story
95bc8be4d5 Make path to router script absolute in server shell.
Relative paths fail when you run the server from inside app/Console
or any other path.
2013-02-07 20:32:26 -05:00
Mark
abf1bd8d12 Merge pull request #1105 from dereuromark/master-fix-disabled
Resolve incomplete regression fix for FormHelper selection and disabled.
2013-02-07 07:09:16 -08:00
euromark
d522f412db Fix disabled elements as array for multiple select and make in_array() work properly here, fix same in_array issues for radio elements and move tests correctly - #1105 2013-02-07 15:36:00 +01:00
mark_story
1ceb17589a Merge branch 'master' into 2.4 2013-02-06 21:05:03 -05:00
mark_story
7d72a6f249 Fix issue where bake was missing habtm associations
If the current model is not the first table, habtm associations would be
missed. This was caused by eff4004261

Refs #3532
Fixes #3605
2013-02-06 20:31:15 -05:00
ADmad
0b46b042b9 Changed params for HtmlHelper::css() to be consistent with HtmlHelper::script().
Closes #3593
2013-02-05 23:22:24 +05:30
Marc Würth
02e2fbe800 Fixed wrong statement in Sqlserver class header
http://www.php.net/manual/en/ref.pdo-sqlsrv.php

--> PDO_SQLSRV is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MS SQL Server (starting with SQL Server 2005) and SQL Azure databases.
2013-02-05 18:32:40 +01:00
Marc Würth
fa118a73a9 Fix for CakeShell schema generate for Sqlsrv
Do not generate invalid schema.php when using SQLServer

Refs #3559
2013-02-04 21:19:56 -05:00
ADmad
afb62959ef Added JSONP support for JsonView 2013-02-04 23:20:49 +05:30
euromark
05546aff32 coding standards 2013-02-04 09:26:50 +01:00
mark_story
103bbbc375 Add CakeRequest::param()
This method gives a read accessor to the data in $request->params.
It removes the need to use isset() and empty().
2013-02-03 22:09:52 -05:00
Marc Würth
72765a2afc Brought \app\Config and \lib\Cake\Console\Templates\skel\Config in sync 2013-02-03 20:00:32 +01:00
ravage84
af8b1e22ef Added a note about plugin assets not working witout url rewrite
http://cakephp.lighthouseapp.com/projects/42880/tickets/25-i-installed-but-dont-see-the-images-and-css-of-debugkit

> Plugin assets do not work without url rewriting, this is in the
documentation for CakePHP itself. I guess it could be repeated for this
and every other plugin.

> I could have sworn it was with the Plugin Assets section, but
apparently its not there. Perhaps its just something I know from
experience.

See also:

* http://cakephp.lighthouseapp.com/projects/42648/tickets/1755-plugin-webroot-without-mod_rewrite-problem
* http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/500-plugin-css-directories-bug#ticket-500-8

Signed-off-by: mark_story <mark@mark-story.com>

Refs #GH-1113
2013-02-03 13:12:29 -05:00
Mark Story
80b8e7d98b Merge pull request #1112 from djbobke/2.4-dataavailable-squash
Backported dataAvailable to 2.4 from 3.0
2013-02-02 08:04:03 -08:00
Rik van der Heijden
67a2276763 Backported dataAvailable to 2.4 2013-02-02 14:39:16 +01:00
calinseciu
d2b97f12e8 Update lib/Cake/Utility/Sanitize.php
Correctly use the $start variable in Sanitize::escape().
2013-02-01 18:10:24 +02:00
mark_story
00078e007c Import ClassRegistry before using.
Fixes #3594
2013-02-01 10:46:25 -05:00
Mark Story
e0ce0ac8e3 Merge pull request #1103 from perrywky/master
fix a DboDataSource buildJoinStatement bug that table prefix is appended to subquery

Fixes #3579
2013-02-01 06:36:06 -08:00
Perry
af71d5528f apply code convention 2013-02-01 09:30:45 +08:00
Ceeram
fa1d22dc5e added test to disprove #3588 2013-01-31 16:21:01 +01:00
ADmad
fb7fbcf01b Added option to disable counter caches updating.
Closes #3109
2013-01-31 18:14:39 +05:30
ADmad
8ff59586f6 Merge branch 'master' into 2.4 2013-01-31 18:12:01 +05:30
Perry
5ac5e784de fix a DboDataSource buildJoinStatement bug that table prefix is appended to subquery 2013-01-31 17:01:59 +08:00
euromark
ee08fe5c1f BC fixes for disabled checkboxes
see: d504642
see: #3545

Signed-off-by: Rachman Chavik <rchavik@xintesa.com>
2013-01-31 09:44:35 +07:00
Rachman Chavik
1cb24384cd Merge branch '2.2' 2013-01-31 09:42:55 +07:00
euromark
d504642c9b BC fixes for habtm. Closes #3545.
Signed-off-by: Rachman Chavik <rchavik@xintesa.com>
2013-01-30 21:11:41 +07:00
mark_story
78b23d8e31 Fix issue with inputs() and plugin models.
inputs() should not trigger errors when generating inputs for plugin
models. Previously the internal state of FormHelper was incorrect as
model() returned the plugin name instead of the modelname.

Fixes #3571
2013-01-29 22:02:21 -05:00
Rik van der Heijden
e331ae64ee Fix CrudAuthorizeTest, added Router::reload() in setUp 2013-01-29 21:35:29 +01:00
Ceeram
46aabbd6ae Testsuite header using Configure for current version 2013-01-29 09:45:42 +01:00
Ceeram
267925e9b0 update version.txt to 2.4.0-dev 2013-01-29 09:06:16 +01:00
mark_story
410981296c Fix ServerShell not being able to handle plugin assets.
Fixes #3575
2013-01-28 22:21:58 -05:00