Commit graph

4065 commits

Author SHA1 Message Date
phpnut
856065056c Merging fixes and enhancements into trunk Added fix for Ticket #492.
Revision: [2301]
"Moving the check for cached pages after the models are loaded.
Some issues where found when using acl components"


git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2302 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-14 13:58:29 +00:00
phpnut
9f9c84de52 Merging fixes and enhancements into trunk Added fix for Ticket #492.
Revision: [2299]
Added fix for Ticket #494.
Added fix for Ticket #489.

Revision: [2298]
Fixed regex that would match more than one <cake:nocache></cake:nocache> group and cause a  wrong replace of the tags

Revision: [2297]
Corrected error in the convertSlash() function

Revision: [2296]
Another bug found and corrected after last commit.
This is working as expected now, and will be refactored.

Revision: [2295]
Fixed undefined index in CacheHelper::__parseFile();
Fixed caching when method is cached without params being set in the key

Revision: [2294]
Corrected caching for index method when accessing www.example.com/controller this would not use default index method.
Removed auto setting of the data variable in Controller::render();
Added additional check for cached index view in bootstrap.php

Revision: [2293]
Refactoring caching code.
Fixed problem with files being cached for all methods.
Added code to cache files to create helpers. 
Moved duplicate code to basics.php as a function

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2300 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-14 11:54:03 +00:00
phpnut
a5a96c9268 Revision: [2291]
Fixed error when using caching in PHP 4



git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2292 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-14 03:04:28 +00:00
phpnut
3f3ec6d42d Revision: [2289]
Removing unused var setting

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2290 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-14 02:32:58 +00:00
phpnut
fc0854e397 Merging fixes and enhancements into trunk.
Revision: [2287]
Merging changes from model_php4.php

Revision: [2286]
Added serialized object data to the cached file.
Instances of the view helpers are available in the views now.
You also have access to the Controller::<component>, example $this->controller->Session;

Revision: [2285]
Adding Controller::postConditions() to convert a POST'ed data array to a Model conditions array

Revision: [2284]
Adding Model::invalidate() and refactoring Model::invalidFields().  Adding a fix for RequestHandler::accepts()

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2288 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-14 02:26:08 +00:00
phpnut
f9197dc7a5 Merging fixes and enhancements into trunk.
Revision: [2282]
Fixed caching of content when wrapped with the <cake:nocache> tags </cake:nocache>

Revision: [2281]
Fixing DBO compatibility in AclNode::_resolveID(), adding docblock and fixing code for stripslashes_deep(), and adding request detection helper methods to RequestHandler

Revision: [2280]
Added fix for empty pages being cached

Revision: [2279]
Fixed undefined index in CacheHelper::cache()

Revision: [2278]
Fixed bug in CacheHelper::__parseFile() regex pattern did not match properly

Revision: [2277]
Adding CacheHelper class.
Refactored View::_render() to use new CacheHelper.

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2283 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-13 03:48:39 +00:00
phpnut
de46dc7fdc Merging fixes and enhancements into trunk.
Revision: [2275]
Change the way the cacheAction arrays can be set.

var $cacheAction = array('action/params/' => time); Multiple params are allowed, will only cache params level and deeper (action/params/params/)
var $cacheAction = array('action/' => time); Setting to just the method without any params will cache all request to that method.
var $cacheAction = string; Will set cache time for entire class.

Both settings can be used in the Controller::method().
$this->cacheAction = array() or string;

Revision: [2274]
Changed clearCache function to allow using url like param setting for cache.

Example:
One of the following can be used.
clearCache('controller'); Will remove all cached pages that have the controller name.
clearCache('controller/action/'); Will remove all cached pages that have the controller_action name.
clearCache('controller/action/params'); Will remove all cached pages that have the controller_action_params name. Note you can have multiple params
clearCache(array('controller/action/params','controller2/action/params)); You can also use and array to set more than one value, same setting as above apply to arrays.


git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2276 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 18:32:09 +00:00
phpnut
2572317443 Merging fixes and enhancements into trunk.
Revision: [2272]
Fixed missing view not rendering an error page when DEBUG > 0

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2273 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 15:59:46 +00:00
phpnut
2862d11796 Merging fixes and enhancements into trunk.
Revision: [2270]
Refactored clearCache()

Revision: [2269]
Removed timestamp in file name.
Removed debug code in model_php5.php


git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2271 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 09:31:36 +00:00
phpnut
54df7c300f Merging fixes and enhancements into trunk.
Revision: [2267]
Removed the 50 record limit on the Model::findAll().
Added _ between file and timestamp
Fixed error thrown when variable was not an array


git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2268 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 08:56:11 +00:00
phpnut
61730a94c5 Merging fixes and enhancements into trunk.
Revision: [2265]
Corrected error when cached file was found with partial matching name.

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2266 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 08:06:12 +00:00
phpnut
c439ed8742 Merging fixes and enhancements into trunk.
Revision: [2263]
Fixed Model::_clearCache() not having the name of the current model in the $assoc array

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2264 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 07:23:40 +00:00
phpnut
3d3d083f30 Merging fixes and enhancements into trunk.
Revision: [2261]
Adding fix for Ticket #479.
Removed unused $alias variable.

Revision: [2260]
Merging changes from model_php4.php

Revision: [2259]
Added Model::_clearCache(). This is used to delete cached pages when changes are made to a model,
will also be used to delete cached queries

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2262 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 06:58:53 +00:00
phpnut
7c8df25770 Merging fixes and enhancements into trunk.
Revision: [2257]
Refactored cache code in view class.
Removed adding the timestamp to the file contents, it is now
added to the file name

Revision: [2256]
Refactored cache checking code.
Time stamp is not added to file name so we check this 
instead of reading the file and finding timestamp

Revision: [2255]
Adding clearCache function to delete contents of cache

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2258 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 05:56:07 +00:00
phpnut
265386fc2a Merging fixes and enhancements into trunk.
Revision: [2253]
"Changing define to false by default"

Revision: [2251][2252]
"Adding check if define is not set"

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2254 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 00:32:20 +00:00
phpnut
89fbf1c8bf Merging fixes and enhancements into trunk.
Changing version number to 1.x.x.x, 0.10.x.x code base had been changed to the version number 1.x.x.x, and what was planned for 1.x.x.x code has
now been moved to 2.x.x.x, and 2.x.x.x moved to 3.x.x.x. This will give us easier to track version numbers from now on.

Revision: [2248]
Merging changes from model_php5.php

Revision: [2247]
"Removing test code from view class"

Revision: [2246]
Removed cache time define from core.php.
Modified the __() function in basics.php to echo string like it will in later versions of cake with translations.
Refactored the cache checking in bootstrap.php to read the files embedded time stamp and delete or output the cached version.
Added View::cacheView() for caching pages.


Revision: [2245]
Moving column formatting from DBO to Sanitize

Revision: [2244]
Adding beforeValidate() Model callback, and allowing query data to be modified in beforeFind()

Revision: [2243]
"Adding caching changes to Controller class "

Revision: [2242]
"Added check to delete cached version if it has expired"

Revision: [2241]
Adding app/cache/views directory

Revision: [2240]
"Fixed missing variable"

Revision: [2239]
"Adding full page caching to view class."

Revision: [2238]
"Adding defines for caching"

Revision: [2237]
"Adding caching check too bootstrap.php"

Revision: [2236]
Adding ClassRegistry::removeObject from Ticket #477

Revision: [2235]
"Correcting setting in DATABASE_CONFIG class"

Revision: [2231]
Adding convenience function am(), which allows merging an infinite number of arrays merged into one

Revision: [2207]
Change Model::save() to call beforeSave() before validations

Revision: [2199]
Removing conditions method call in Model::field()

Revision: [2196]
Setting proper mime type again

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2250 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 00:11:40 +00:00
phpnut
0f8f8243d5 Added SecurityComponent class missed in merge from revision [2186]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2249 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-12 00:03:24 +00:00
phpnut
03ba042f41 Merging fixes and enhancements into trunk.
Revision: [2193]
Adding fix for Ticket #471

Revision: [2192]
Adding fix from Ticket #464.

Revision: [2191]
Adding fix for Ticket #461

Revision: [2190]
Adding fix for array_merge_recursive() error when unbindModelis used

Revision: [2189]
merging changes made in model_php5.php

Revision: [2188]
Fixing controller so $viewPath can be set as a var

Revision: [2186]
Adding Security component

Revision: [2185]
Adding additional RequestHandler detection, form security authentication, and automagic view variable $data

Revision: [2183]
Fixing Ticket #473

Revision: [2182]
Adding fix for Ticket #261

Revision: [2181]
Changing MySQL column defs from 12 hour times to 24 (#465)

Revision: [2180]
Fixing Tickets #463 and #462, and an error in Controller::setAction()

Revision: [2179]
Fixing a bug I found in AjaxHelper::link(), and changing the stopwatch time to 4 decimals

Revision: [2177]
Added patch from Ticket #459

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2195 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-08 03:13:32 +00:00
phpnut
f6cf220c40 Merging fixes and enhancements into trunk.
Revision: [2175]
Merging changes made to model_php5.php

Revision: [2174]
Adding fix for empty values being set for an update.
Fixed problem with view paths being set wrong on Windows.

Revision: [2173]
Adding additional condition operators

Revision: [2172]
Adding fix for Ticket #455

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2176 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-02 06:23:16 +00:00
phpnut
26fbf4a287 Merging fixes and enhancements into trunk.
Revision: [2170]
Adding column formatting for create() and update()
This is also a fix for Ticket #450




git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2171 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-01 21:24:19 +00:00
phpnut
9c5e3bb979 Merging fixes and enhancements into trunk.
Revision: [2168]
Added patch from Ticket #458

Revision: [2167]
Merging changes made to model_php5.php

Revision: [2166]
Added methods to allow what is discussed in Ticket #452

Revision: [2165]
Added fix for Ticket #453

Revision: [2164]
Added DBO column abstraction and column-based data formatting/escaping

Revision: [2163]
Added patch from Ticket #457.
Added fix for Ticket #456.

Revision: [2162]
"Added fix suggested in Ticket #454"

Revision: [2161]
"Diff added + symbol, removed it"

Revision: [2160]
"Added all fixes for Ticket #448"

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2169 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-03-01 19:13:48 +00:00
phpnut
2cb80a132f Merging fixes and enhancements into trunk.
Revision: [2158]
Changing vendors() to user require_once().

Revision: [2157]
Fixed missing directory separator.

Revision: [2156]
Added a few more fixes for Ticket #447

Revision: [2155]
Reverting changes in [2153]
Adding fix for Ticket #447

Revision: [2154]
Adding patch from Ticket #448


git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2159 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-28 19:45:28 +00:00
phpnut
6cc1cf8b80 Merging fixes and enhancements into trunk.
Revision: [2151]
Merging changes made to model_php5.php into model_php4.php.

Revision: [2150]
Cleaning up code, removing in line comments

Revision: [2149]
Fixed wrong params passed to SessionComponent::setFlash() in Scaffold class.
Changed View::_render() to only suppress errors in the view when DEBUG is set to 0.

Revision: [2148]
Adding suggestion from Ticket #446.

Revision: [2147]
Added fix for Ticket #443

Revision: [2146]
Added fix for Ticket #444.
Added table.field in the CakeSession class database methods

Revision: [2145]
Renamed _new to _blank in default.thtml.
Starting to refactor changes that broke self joined associations.

Revision: [2144]
Adding fix for Ticket #202

Revision: [2143]
Adding support for nested array-based conditions

Revision: [2141]
Updating View for Session flash changes

Revision: [2140]
Adding Session flash enhancements for a ticket that I took but can't find because someone else closed it

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2152 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-28 07:35:01 +00:00
phpnut
f37dfb6302 Merging fixes and enhancements into trunk.
Revision: [2133]
Fixing sub package doc tag

Revision: [2132]
Added fixes when ini_set() is disabled.                   
Problem reported here:
    http://groups.google.com/group/cake-php/browse_thread/thread/f8e537b165da733e/06888a4112345f59

Revision: [2131]
"Correcting subpackage doc block tags "

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2134 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-25 19:20:18 +00:00
phpnut
80d6673717 Merging fixes and enhancements into trunk.
Revision: [2129]
Removed Scaffold::__renderScaffold();
Added more detailed Page Title.

Revision: [2128]
Renamed Scaffold::__scaffoldView to Scaffold::__scaffoldIndex
Removed all Scaffold::__scaffoldIndex ()

Revision: [2127]
Removing Scaffold::__scaffoldNew() and Scaffold::__scaffoldEdit()

Revision: [2126]
Added Scaffold::__scaffoldForm() to replace
Scaffold::__scaffoldNew()  and Scaffold::__scaffoldEdit()

Revision: [2125]
Removed Scaffold::__scaffoldCreate()  and Scaffold::__scaffoldUpdate()

Revision: [2124]
Refactoring Scaffold class. Added Scaffold::__scaffoldSave() to replace
Scaffold::__scaffoldCreate()  and Scaffold::__scaffoldUpdate()

Revision: [2123]
Removed debug code

Revision: [2122]
Added fix for Ticket #435.
Select boxes now repopulate with the selected values pass in the form

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2130 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-25 09:36:52 +00:00
phpnut
7a9fff407a Merging fixes and enhancements into trunk.
Revision: [2120]
Added fix for error in Controller::cleanUpFields().
Fixed typo in Scaffold::__scaffoldUpdate().

Revision: [2119]
Added fix for missing view error.
Added changes to allow SessionComponent::flash() to return similar to what was suggested in Ticket #430.
Changed delimiter to -! in the arrays used in DboSource::conditions().
Fixed single quotes being added when value was empty

Revision: [2118]
Corrected some bugs found in DboSource::conditions();
Added loading of app/config/bootstrap.php to index.php after the core bootstrap.php loads.
Changed doc block comment in app/config/bootstrap.php

Revision: [2117]
"Adding  app/config/bootstrap.php.
Used for application wide settings"

Revision: [2116]
"Added better regex to the DboSource::fields()"

Revision: [2115]
Moving the DIRECTORY_SEPARATOR to top section of the file

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2121 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-25 04:42:31 +00:00
phpnut
a1170b57d4 updating version number
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2114 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-23 21:53:38 +00:00
phpnut
8eeff93637 Merging fixes and enhancements into trunk.
Revision: [2112]
Fixing path to tmp/logs

Revision: [2106]
Fixing $disableStartup

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2113 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-23 21:50:08 +00:00
phpnut
e45d19e199 Merging fixes and enhancements into trunk.
Revision: [2104]
Correct changes of names in scaffold.

Revision: [2103]
Changed methods to protected methods
Controller::_beforeScaffold($method)
Controller::_scaffoldError($method)

Revision: [2102]
Added 2 methods to Controller class that must be overridden in child classes if you place to use Scaffold in production applications.
This will allow you to perform checks before displaying the forms, and also before performing any Scaffold methods.

Each of these methods are passed the name of the method they represent in Scaffold.
Controller::beforeScaffold($method)
Controller::scaffoldError($method)

These 3 name are passed to the methods above, but are not view related 
'create' when creating a new record in the database
'update' when updating a record in the database.
'delete' name says what it does

These are view related names passed to the methods above
'index' the list of all records shown in scaffold.
'edit' the edit record form.
'show' when displaying a specific record.
'add' add record form.


Scaffold can now be used to generate forms and customize these on a per app or per controller basis.
Scaffold will first look:
Example: app/views/posts/
Then: app/views/scaffold/

There are also specific naming used for these views each related to a scaffold method.

scaffold.list.thtml
scaffold.edit.thtml
scaffold.new.thtml
scaffold.show.thtml

Added scaffold_error.thtml that is used if a controller does not implement Controller::scaffoldError() when using scaffold and Controller::beforeScaffold() is implemented and returns false

Revision: [2101]
Corrected some bugs found in View that would cause errors when using scaffold.

Revision: [2100]
Added fix for Ticket #427 

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2105 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-23 11:40:52 +00:00
phpnut
d2bd117486 Merging fixes and enhancements into trunk.
Revision: [2098]
Removed check for database class to load model classes from the models directory.
Fixed missing views not being found.

Revision: [2097]
Fixed the WWW_ROOT setting

Revision: [2096]
Changed the way Sessions component is added to the components array

Revision: [2095]
Moved the WWW_ROOT define.

Revision: [2094]
Components/Helpers etc. in AppController are now automatically added to all controllers

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2099 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-23 08:24:23 +00:00
phpnut
e16bb286e0 Merging fixes and enhancements into trunk.
Revision: [2092]
Added fix for = not being added the conditions.
Corrected paths for test suite.
  Test are now located in app/test/

Revision: [2090]
Added fix to DboSource::conditions() that will check for the escaped single quotes.
Before this fix any matching single quote pair could cause failure

Revision: [2089]
Fixed duplicate WHERE being added to the sql string

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2093 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-22 18:35:41 +00:00
phpnut
8ab148a598 Merging fixes and enhancements into trunk.
Revision: [2087]
Removed array setting that is not needed

Revision: [2086]
Added unbindModel to turn off associations on the fly.
These are reset after a call to a find<*> method.
Added one more level key to isset check in DboSource::conditions.
Previous check would always return true.

Revision: [2085]
Refactored DboSource::fields()

Revision: [2084]
Added fix for Ticket #419    

Revision: [2083]
Refactoring DboSource::conditions.

Revision: [2082]
Deleted a few methods by accident adding them back

Revision: [2081]
Added fix for Ticket #420
Added $startQuote and $endQuote vars to the MySql class, these must be added to each Dbo<database> if the database uses
a quote char around fields. Example MySql uses this ` MSSQL uses [ and ].

Revision: [2080]
Added delete() alias for del() in Model and SessionComponent classes.
This is suggestion from Ticket #421

Revision: [2079]
Added fix for Ticket #106.
This was added before but lost in a merge.
This fix allows adding a custom tags.ini.php file to app/config.
This file will be merged with the core, overwriting any keys that match, and adding those that do not.

Revision: [2078]
Refactoring DboSource::conditions().

This method will now return the Model.field properly when passed a string.
You can also set you own clause.
WHERE, GROUP BY, HAVING, and ORDER BY.
If one of these in not the first characters in the string, WHERE will be added by deafult.

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2088 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-22 09:15:12 +00:00
phpnut
27c5a4919a Merging fixes and enhancements into trunk.
Revision: [2076]
Correcting a few more bugs found in the CakeSession class

Revision: [2075]
Adding fix fro Ticket #417

Revision: [2074]
Corrected name of method

Revision: [2073]
Added patch submitted by lemp on IRC channel

Revision: [2072]
Added fix for Ticket #418.
Bug fix added for session_destroy();

Revision: [2071]
Updated DboSource::conditions() with regex discussed in IRC channel.
Added --return delimiter to allow returning the value of an array key without
the string being wrapped by $this->Model->value();

It is used like:
    $this->Model->find(array('Model.field' => '--return STRING'))

Revision: [2070]
Changed the DboSource::condition().
New syntax has been added.
By default all conditions are joined using AND.
    array('Model.field' => ' = value','Model.field' => ' > value');
    `Model`.`field` = 'value' AND `Model`.`field` = 'value'

To change this you would add a space CONDITIONAL space to the array key
Incorrect: array('Model.field' => ' = value','OR Model.field' => ' > value');
Correct: array('Model.field' => ' = value',' OR Model.field' => ' > value');

would produce
    `Model`.`field` = 'value' OR `Model`.`field` = 'value'

Change where also made the the value of the key space OPERATION space is now needed.
Incorrect: array('Model.field' => '= value';
Correct: array('Model.field' => ' = value';

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2077 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-20 22:19:21 +00:00
phpnut
4af9614115 Merging fixes and enhancements into trunk.
Revision: [2068]
Fixed typo in method names.
Updated DboSource::conditions().

Added a delimiter --return that would be used in a complex condition string.
NOTE: You limit your self to database specific code using this. Cake will not add the name() wrap around any of the 
Model.field.
    $this->Model->find('--return MY CUSTOM CONDITION STRING);

Added ability to use a array key that will not have $this->value() called to wrap the $value.
It is used like this (The word status will not have the value() called) 
Also note you can add Conditional selections used in the where clause:
=  	Equal
> 	Greater than
< 	Less than
>= 	Greater than or equal
<= 	Less than or equal
<> 	Not equal to
LIKE 	can also use % with this
    $this->Model->find(array('Model.field' => '= value', 
                             'Model.field' => '> value',
                             'Model.field' => '< value',
                             'Model.field' => '>= value',
                             'Model.field' => '<= value',
                             'Model.field' => '<> value',
                             'Model.field' => 'LIKE value',
                             'Model.field' => 'LIKE %value%',
                             'status',
                             'any key withou a => "value" wil not be wrapped'));

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2069 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-20 08:45:44 +00:00
phpnut
35997a1e84 Merging fixes and enhancements into trunk.
Revision: [2066]
Change the bindTo<ModelName>() to bindModel()
This works similar to before but has sytax as follows.

        $this->Book->bindModel(array('belongsTo' => 
                               array('Author' =>
                               array('conditions' => 'these conditions',
                                     'order' => 'this order by DESC',
                                     'foreignKey' => 'foreign key',))));




git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2067 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-20 05:09:48 +00:00
phpnut
02d90348f8 Merging fixes and enhancements into trunk.
Revision: [2064]
Added doc block for Model::__resetAssocitions();
Removed unused params in Model::__constructLinkedModel();

Revision: [2063]
Refactored bindTo<ModelName> to allow method to be used to change associations settings.                    
This method will change the association on the fly, and reset them back once the query has completed.
This will allow something like this simple example.

        $this->Book->bindToAuthor(array('belongsTo' => array('conditions'  => array('Author.active'=>'1'))));
        $this->set('changed', $this->Book->findAll());
        $this->set('original', $this->Book->findAll());

$changed would have the associated for Books/Authors where Author.active = 1.
$original would have the associations for Books that where set in the Book class association vars.

Revision: [2062]
Added magic method to allow late binding of association model.

Revision: [2058]
Adding fix for error in acl.php reported in google group

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2065 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-20 03:03:05 +00:00
phpnut
91525f00ab Merging fixes and enhancements into trunk.
Revision: [2056]
Corrected typo in a variable name

Revision: [2055]
Added regex to remove ORDER BY if it is passed in the string

Revision: [2054]
A little refactoring to changes made in [2053]

Revision: [2053]
Adding fix for Ticket #413

Revision: [2052]
Reverting changes made in [2050]

Revision: [2051]
Fixing Ticket #410

Revision: [2050]
Fixing Ticket #409, and adding additional column functions

Revision: [2049]
Removing old DBO class. Fixes Ticket #408
Updated all Dbo* database classes to extent DboSource.
Corrected formatting of code in CakeSession 

Revision: [2048]
Adding fix for Ticket #411.
Updating variables and method to use coding standards.
Updated CakeSession doc blocks

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2057 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-19 22:14:21 +00:00
phpnut
9be62bcb7e Merging fixes and enhancements into trunk.
Revision: [2046]
One last refactoring of Dispatcher

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2047 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-19 06:26:05 +00:00
phpnut
528d0e837f Merging fixes and enhancements into trunk.
Revision: [2044]
Refactored and removed uneeded regex checks

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2045 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-19 06:10:12 +00:00
phpnut
49ca527459 Merging fixes and enhancements into trunk.
Revision: [2035]
Cleaning up code formating

Revision: [2034]
Added fix for parse error when using PHP 4

Revision: [2033]
Fixed dispatcher to set the proper paths when app/webroot is moved outside of a normal cake install path  
and placed deeper in the web path of the DOCUMNET ROOT

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2036 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-19 03:56:54 +00:00
phpnut
a6051579d7 Merging fixes and enhancements into trunk.
Revision: [2031]
Added ability to turn off the cascading deletes when using Model::del($id, false);

Revision: [2030]
Corrected association cascading for hasOne and hasMany.

Revision: [2029]
Implemented cascading delete for hasMany, and hasOne associations.

Revision: [2028]
Renamed Model::__deleteJoins() to Model::__deleteMulti();

Revision: [2027]
Implemented Model::__deleteJoins() to delete HABTM associations.

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2032 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-19 01:54:39 +00:00
phpnut
a75e08976f Merging fixes and enhancements into trunk
Revision: [2025]
A little more work on plugin to set some default routing.

Revision: [2024]
Changed DboSource::field() so the name() is not called for some field variables.

Revision: [2023]
Changes made in [2022] should only check if the $conditions is not empty.

Revision: [2022]
Changed DboSource::conditions() so it will add the "ticks" needed around the Model.field names.
The Model.field name conventions must be used for this to work.

Revision: [2021]
Adding fix for Ticket #405

Revision: [2020]
Added fix for Ticket #403

Revision: [2019]
Added patch from Ticket #404.
Fixing formatting of files.

Revision: [2018]
Fixing formatting of files 

Revision: [2017]
Fixed bad search and replace

Revision: [2016]
Fixing formatting of files 

Revision: [2015]
Replaced all 3 space indents with 4 space indents

Revision: [2014]
Updating variables to use the naming proper conventions

Revision: [2013]
Added patch from Ticket #406

Revision: [2012]
Adding fix for Ticket #407.
Fix variables that where not formatted per the coding conventions

Revision: [2011]
Adding patch from Ticket #401

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2026 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-18 23:42:21 +00:00
phpnut
9a8d5c15fe Merging fixes and enhancements into trunk
Revision: [2009]
Adding fixes for session errors posted in the google group.
Changed the header for PHP version in the model classes.
Change uses() back to require_once 

Revision: [2008]
Adding reference back to the PHP 4 model

Revision: [2007]
Merging changes from model_php5

Revision: [2006]
Fixing recursive associations, adding whitelist to Model::save

Revision: [2005]
Added fix for error in CakeSession class.
Updated home.thtml

Revision: [2004]
Rearranged  some of the defines moving the most often changed ones to the top of the script

Revision: [2003]
Moved SQL files distributed with the core to app/config/sql/
Removed app/config/routes.php.default
Fixed class_exists check in TextHelper

Revision: [2002]
adding sql directory

Revision: [2001]
Fixed error when cake distribution is installed inside of the DOCUMENT ROOT 

Revision: [2000]
Adding checks for classes that are already loaded so the require() calls will not error

Revision: [1999]
Replacing all require_once() with require()

Revision: [1998]
Moved creation of the Dispatcher object to app/webroot/index.php

Revision: [1997]
Adding session sql file

Revision: [1996]
Revision: [1995]
Fixing session db queries

Revision: [1994]
Change the require_once in bootstrap to require.
Merged changes John made to the CakeSession database methods

Revision: [1993]
Removing some constants that are not needed

Revision: [1992]
Adding fix for Ticket #400

Revision: [1991]
Fixing Ticket #348

Revision: [1990]
Fixing Tickets #397 and #399

Revision: [1989]
Fixed callbacks in JavaScript events and Ajax, fixed Controller::beforeRender so you can set view variables, and fixed Ticket #394

Revision: [1988]
Renamed the $dir param to $direction.
Added default value to the DboSource::order() $direction param.

Revision: [1987]
Adding changes back to the sessions class I reverted in [1984]

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@2010 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-17 10:12:15 +00:00
phpnut
818806195f Merging fixes and enhancements into trunk
Revision: [1985]
Changed DboSource?::order() to allow passing an array in the order param

Revision: [1984]
Reverting changes from [1983]

Revision: [1983]
Merging change from [1966] and [1967]

Revision: [1982]
Adding fix for DboSource::order().
This allows setting the order in the find methods.

Revision: [1981]
cleaned up code

Revision: [1980]
Corrected the array keys in the regex I added

Revision: [1979]
Added check to DboMysql::value() that does not add quotes around a numerical value.
Refactored DboSource::conditions() adding better regex. 

Revision: [1978]
Added check for LIKE in a condition array this fixes the = being added.

Revision: [1977]
Added fix for Ticket #392

Revision: [1976]
Adding changes suggested in Ticket #381.
These have not been fully tested.

Revision: [1975]
Added fix for Ticket #391

Revision: [1974]
Added patch from Ticket #390

Revision: [1973]
Adding patch from Ticket #386

Revision: [1972]
Added patch from Ticket #385.
Changed wording of a comment.

Revision: [1971]
Added patch from Ticket #383

Revision: [1970]
Adding fix for Ticket #395

Revision: [1969]
Adding more detailed comment to path defines

Revision: [1968]
Making a few more changes to the path settings

Revision: [1965]
fixing path issue with loading PagesController

Revision: [1964]
Added model method for getting column types by field

Revision: [1963]
Corrected paths to the tmp directory.
Making a few more changes to the defines in index.php

Revision: [1962]
Moving tmp directory to app

Revision: [1961]
Starting separation of core from the application.

Revision: [1960]
Adding vendors directory to app directory

Revision: [1959]
Finished support for recursive associations.  Still needs some testing...

Revision: [1958]
Adding fix for Ticket #387, and automagic id's for form inputs

Revision: [1957]

Revision: [1956]
Adding fix for error reported in Google Group: http://groups.google.com/group/cake-php/browse_thread/thread/395593a3cea34174

Revision: [1955]
Adding fix for Controller::referer()

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1986 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-16 09:29:28 +00:00
phpnut
40f3a01d1e Merging fixes and enhancements into trunk
Revision: [1953]
Added @ before session_destroy() in CakeSession::_destroyInvalid() to suppress warning 

Revision: [1952]
Fixing Ticket #380, and adding JSON object generator to JavascriptHelper

Revision: [1951]
Removing code that is not used in Inflector class

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1954 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-09 05:23:26 +00:00
phpnut
e51b3d4915 Merging fixes and enhancements into trunk
Revision: [1948]
Added fix for Ticket #376

Revision: [1947]
Renamed log.php to cake_log.php

Revision: [1946]
Added fix for Ticket #371;
Moved LogError to bascis.php from log.php
Renaming Log class to CakeLog to avoid conflicts with Pear Log class or any other Log class.
Added check to File class to load Folder class if it is not in memory already
Moved LOG_ERROR define to app/config/core.php

Revision: [1945]
Updated Inflector::pluralize(); and Inflector::singularize(); to use some code that is in the new Inflector class from version 1.x.x.x
Added fix for Ticket #373
Added fix for Ticket #357
Added patch from Ticket #363

Revision: [1944]
Added fix for Ticket #349 PHP 5 version

Revision: [1943]
Added fix for Ticket #349

Revision: [1942]
Adding patches from Ticket #377

Revision: [1941]
Quick URL fix for AjaxHelper::editor

Revision: [1940]
Fixing Ticket #375

Revision: [1939]
Adding fix for Ticket #369, plus slider control and Ajax In-Place editor

Revision: [1938]
diff patched applied from gwoo



git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1949 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-08 15:25:34 +00:00
phpnut
ab34891751 Merging fixes and enhancements into trunk
Revision: [1936]
Adding fix for Ticket #364

Revision: [1935]
Adding script.ac slider control and fixing Ticket #188 for real this time

Revision: [1934] [1933] [1932] [1931] [1930]
Docstrings, and some inconsistency fixed. Wrong parameters in one case. Moved them into the signature. Also some code standards fiddling.
Some outdated parameters. Added a todo in docstrings.


git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1937 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-07 02:19:53 +00:00
phpnut
cd2d68a6c8 Merging fixes and enhancements into trunk
Revision: [1927]
A little refactoring on the findBy<field> and findAllBy<field>.
These should both work on PHP 4 now without an issue.
Change the condition to be built as an array in DboMysql::query().
Still want to refactor the DboSource::conditions() which is note around line 1058 TODO:

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1928 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-04 08:13:59 +00:00
phpnut
c2dcc10996 Merging fixes and enhancements into trunk
Revision: [1925]
Adding fix for association conditions when set in the association array

Revision: [1924]
Adding fixes for $recursive

Revision: [1923]
Adding fix from Ticket #362

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1926 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-04 07:33:20 +00:00
phpnut
934cfe1dac Merging fixes and enhancements into trunk
Revision: [1921]
Adding fix on default pages controller that does not use a model

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1922 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-02-03 15:05:46 +00:00