Implemented Validation::extension(); and Vaidation::range();
Updated copyright notices in all files"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6296 3807eeeb-6ff5-0310-8944-8be069107fe0
Closes#2213, Support multiple plugin paths.
Closes#2234, filepaths to behavior classes should be cached in class.paths.php also
Closes#2345, ability to group components into subfolders
Closes#2645, Improvement to basic.php for class loading.
Fixes#3526, Cache::write, when using just the config name, it fails.
Fixes#3559, loading plugin model as assoc don't work.
Closes#3567 Controller Folders (Note this does not need routing to work, but controller names can not conflict with others in the same application so naming must still be unique)
Fixes#3579, email.php component: Parse error with php 4.
Adding new class and file importer.
Updated most of the core to use the importer.
Added ClassRegsitry::init() that will create and instance of an object and store it in the registry.
Deprecated most of the load functions in basics.php
Plugin model loading now forces using the dot notation, to use models within a plugin, all the model associations must be in the PluginName.Model syntax, if this is not used, the plugin will look for the models in the main app/models directory first, if not found then it will search the plugin directories recursively until it finds a model.
var $belongsTo = array('SomeModel'); will look for some_model.php in the app/models
var $belongsTo = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $belongsTo = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
The controllers of the plugin will still look for the default models inside the plugin if var $uses is not set:
var $uses = array('SomeModel'); will look for some_model.php in the app/models
var $uses = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $uses = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
All of the above will work between plugins and main app
These changes also allow placing model and controllers is sub directories
Removed old class.paths.php file generation
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6001 3807eeeb-6ff5-0310-8944-8be069107fe0
Added ability to turn off HTTP_USER_AGENT check in a Controller::beforeFilter(),
Added id() to Session helper and component to return current Session id, the component accepts a $id parameter to force setting the Session id which must be called in a Controller::beforeFilter().
Sessions id are not longer renewed if a request is from Ajax, or from requestAction();
When Security.level (1.2) or CAKE_SECURITY (1.1) is set the 'high' renewing of Session id only happens if request is 2 seconds after the last request.
Added $_Session[Config][timeout] which forces renewing Session if request are within the 2 second limit and over 10 request.
If an application is expected to make multiple request (more than 10) to the server in a single proccess, Configure::write('Security.level', 'medium'); (1.2) or $this->Session->security = 'medium'; (1.1) should be used in a beforeFilter for the specific methods.
1.2 Sessions allow using CacheEngines to store Sessions, be aware that using memory caching as the only storage of Sessions is not reliable. Further work will be done to allow using the CacheEngines with database Sessions, etc.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5982 3807eeeb-6ff5-0310-8944-8be069107fe0
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
Revision: [1841]
Merging changes made in model_php5.php to model_php4.php
Revision: [1840]
Adding fix for PHP 5 when using mysql_connect setting.
Commented out the call to Dbo*::disconnect(). This was closing connections early.
Adding fixe for Ticket #302.
Adding Enhancement for Ticket #300.
Adding fix for Ticket #299
Adding Enhancement for Ticket #298
Adding fix for Ticket #297
Adding Enhancement/Patch from Ticket #296
Revision: [1838]
working on deeper recursive joins
Revision: [1837]
Updating copyright information in all files
Revision: [1836]
Adding fix when setting a field value to 0.
Before it would set this to NULL, which was not expected result.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1842 3807eeeb-6ff5-0310-8944-8be069107fe0
Merging:
Revision: [1644]
Bad merge last commit had second param in the class_exists() call
Revision: [1643]
Fixed errors introduced in last changes:
Variable that was passed the loadController function was not expected controller class name,
It was the name fo the class without Controller. This would cause the loading to fail, since
it was possible that a class was already loaded with the name that was passed.
Example NewsController and a model called News.
Revision: [1642]
Added patch for MySql 5
Revision: [1641]
removing second parameter in the class_exists function calls.
closes Ticket #209
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1645 3807eeeb-6ff5-0310-8944-8be069107fe0
Revision: [1638]
removing php short tags
Revision: [1637]
Remove renderElememnts loading of helpers also, forgot it in the last commit
Revision: [1636]
Refactoring after profiling code.
Session was creating a new instance of Dispatcher removed the need for it.
Added a check to the Component class to pass the base to the SessionComponent class, will refactor that at a later time.
Changed View class so it would not load helpers when rending a layout, no need for that.
A great performance boost after the change.
Change the loadModels method call in app/webroot/index.php.
Will only attempt the loadModels call if the AppModel class is not in memory, and the Database class is in memory.
Removed all unnecessary calls to basics uses(). Again another big performance increase.
Added fix to the Html::guiListTree() after discussing the output that is expected.
A ticket was closed on this already.
Revision: [1635]
Removing calls to basic uses()
Revision: [1634]
Removing calls to basics uses() that are not needed.
Revision: [1633]
Removing calls to basics uses() that are not needed.
Moved Object class further up in the loading order
Revision: [1632]
adding fix for Ticket #132
Revision: [1631]
Added fix from Ticket #122
Revision: [1630]
Scaffold views can now be placed in a view directory.
These will override the core.
Example (Must have the scaffold dot name):
app/views/posts/scaffold.list.thtml
app/views/posts/scaffold.new.thtml
app/views/posts/scaffold.edit.thtml
app/views/posts/scaffold.show.thtml
Revision: [1629]
Think I fixed the issue with scaffold showing proper dates prior to January 1 1970 00:00:00.
Revision: [1628]
Added a few more change to allow saving dates prior to January 1 1970 00:00:00.
Still a few issues with this, but will get them figured out soon.
Changed scaffold to use only one form view.
Revision: [1627]
Added fix for Ticket #189
Revision: [1626]
Added fix for Ticket #120.
Revision: [1625]
left justified doc blocks
Revision: [1624]
remove files from uses() that are loaded by default in app/webroot/index.php no reason to attempt to load them again in the classes
Revision: [1623]
adding check to the loadModels and loadController that will only attempt to load files if the classes are not already in memory
Revision: [1622]
Adding fix to time helper that was lost in a previous merge
Removing all tabs from code
Revision: [1621]
Addtional model validation fixes
Revision: [1620]
fixed parse error
Revision: [1619]
Fixing ticket #102
Revision: [1618]
correcting mime types and keywords
Revision: [1617]
correcting mime types and keywords
Revision: [1616]
fixed link in footer
Revision: [1615]
Fixing ticket #207
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1639 3807eeeb-6ff5-0310-8944-8be069107fe0
Updated headers.
beginning to clean up files that are not used in this version of Cake
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1593 3807eeeb-6ff5-0310-8944-8be069107fe0
Adding empty directories where overrides for the core views can be placed.
Adding an empty directory for elements
[1127]
Adding directory to hold core inflection files
[1128]
More work on the new inflector.
This still is not completed but should be soon
[1130]
Documentation strings, du jour.
[1131]
Docstringed and ready. Inflector lacks one docstring. It is noted in its todo
[1132]
Incomplete documentation, and some corrections to previous documentation.
Gwoo noted that there'll be more changes in the Helpers soon, so I back off here.
[1134]
Adding before filters back to code.
Commented out a regex in Inflector::pluralize(); that os causing problems.
Removed a duplicate define in index.php.
Removed the bare array being set automatically when using requestAction().
With this change you must use requestAction(); like this.
$object->requestAction('/bare/controller/action/param');
Added GOTCHAS file with links to problems people may have with CakePHP.
Some more work done on new Inflector.
[1135]
Added a check when trying to access a private method of a controller.
This will now display an error page informing user that this is not allowed.
[1137]
Fixed a few undefined variable errors in the code
Corrected problem with double layout display when an error is returned and caught.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1138 3807eeeb-6ff5-0310-8944-8be069107fe0
[1079]
Merged [1005] committed by nate but not added to core prior to release.
Merged [1078] prior to modifying all developers sandboxes.
[1081]
adding view and template directories
[1082]
adding base files for view generator
[1083]
correcting all package and sub package tags for in doc blocks.
Making sure every file in the core has doc block in them
[1084]
renaming working copy of latest release
[1093]
Added fix for associations using underscores if var $useTable is set in the associated models.
This closes ticket #11.
[1094]
Fix for Ticket #24.
The problem was tracked to a variable in View::_render();
$loadedHelpers was being assigned a reference when it when it should not have been.
[1096]
Initial work on controller components needs testing.
Also added a work around for the basics.php uses().
Using the define DS where the files from the original version are now located in deeper libs directories.
[1097]
committing a few typos in the code I added
[1098]
reformatting code in component.php
[1104]
changed the test route and corrected a regex in inflector.
[1111]
removing the contructor from dispatcher, it is not needed
[1112]
Changes made for errors when a file is not present in webroot.
Fixed the regex used in Router::parse().
Change the error layout template.
[1113]
Changes to Folder class to allow setting the permissions mode when constructing.
This class needs to be refactored and move everything that is in the contructor out.
The constructor should set the vars for use in other Folder::"methods"().
Will work on this at a later time.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1114 3807eeeb-6ff5-0310-8944-8be069107fe0