Commit graph

51 commits

Author SHA1 Message Date
nate
df75a06756 Fixing coding standards violations in core, and adding misc tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7222 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-20 20:17:23 +00:00
gwoo
2756634b73 removing deprecated methods from HtmlHelper, File, and Folder
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7182 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-13 18:53:06 +00:00
gwoo
1e231e9511 some cleanup, wrapping uses() in class exists
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7172 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-06-11 15:46:31 +00:00
nate
42da5aba81 Moving Cake folder to correct location
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7063 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-30 11:40:08 +00:00
DarkAngelBGE
e6e0d852a2 deleting cake folder from svn
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7061 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-30 10:59:16 +00:00
nate
7402680cc1 Misc code formatting and whitespace fixes
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7020 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-23 05:11:41 +00:00
DarkAngelBGE
45ed8ffeff bringing the file class to almost 90% coverage
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6926 3807eeeb-6ff5-0310-8944-8be069107fe0
2008-05-18 14:48:48 +00:00
phpnut
cb53dc61b0 "Closes #2897, Built-in file validation.
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
2008-01-01 22:18:17 +00:00
gwoo
3b60dd5d5f adding File::prepare() for fixing line endings
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5899 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-25 03:10:31 +00:00
gwoo
c68aedb9c4 removing line ending code from File::write(), adding it to bake, fixes #3460
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5897 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-25 02:22:40 +00:00
mariano.iglesias
896f62544b Changing @return int to @return integer and @param bool to @param boolean
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5860 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:54:36 +00:00
phpnut
160cd28440 Correcting @return int
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5858 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:11:12 +00:00
phpnut
da97a5c871 Correcting @return bool
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5857 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 16:09:35 +00:00
mariano.iglesias
897825d596 Adding documentation to classes belonging to Cake console.
Standarizing on datatypes used in phpdocblocs and removing unneeded @return types

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5851 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 05:52:20 +00:00
phpnut
7bc3e307b7 Fixes #3420
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5849 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 04:44:39 +00:00
gwoo
aeaece94bf updating File::write() to handle different line endings, closes #3420
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5843 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-22 00:26:54 +00:00
gwoo
be65aa8ee3 adding lock to File class, refactoring FileEngine
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5775 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-17 07:34:16 +00:00
gwoo
74dd4b4832 updating file class and test
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5769 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-16 09:48:59 +00:00
the_undefined
e7bccfe7a8 Implemented File::offset
Added test for it

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5748 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-11 07:49:57 +00:00
the_undefined
6dc279c7b7 Added support for $bytes parameter in File::read
Re-factored write function
Improved test coverage of File class

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5747 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-11 07:19:06 +00:00
the_undefined
d13b0323a9 Fixing typo
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5743 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-09 18:51:47 +00:00
the_undefined
1f0f9d00c0 Tiny docblock correction
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5737 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-09 00:04:44 +00:00
the_undefined
895eeeae72 Implemented new File functions: open, close, opened
Added new $bytes, $mode parameters to File::read()
Added test cases for new functions and the existing read function

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5736 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-09 00:00:46 +00:00
phpnut
d8f2a62057 Fixing return path for file names, name is only set if it is a actual file
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5673 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-09-20 02:54:20 +00:00
gwoo
74d16fc110 adding deprecated notices to file class
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5559 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-21 03:39:02 +00:00
gwoo
c84bbea48b fixing File cache engine expire and path, #3006 and 3021, adding tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5491 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-08-05 16:47:03 +00:00
phpnut
23dfd90b29 Correcting code structure to standards
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5313 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-06-20 06:15:35 +00:00
gwoo
05d5972dee fixing File again adding info property
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5223 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-30 00:09:14 +00:00
gwoo
151bdd04ef fixing File tests and class
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5221 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-29 23:38:36 +00:00
gwoo
aa81a44bb9 updating File class and tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5211 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-27 16:06:49 +00:00
gwoo
ae652431e9 updating file class deprecated getters, fixes for tickets #1838 and #2641, adding tests, changing Folder default directory to TMP
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5203 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-27 00:30:43 +00:00
mariano.iglesias
77da587c11 Fixing visibility based on attribute name convention
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5151 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-22 02:38:12 +00:00
mariano.iglesias
3e8d42bb72 Adding documentation and internationalizing some messages
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5132 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-20 06:30:19 +00:00
gwoo
9bc9ac4b31 updated file class, console classes
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5094 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-14 12:23:25 +00:00
gwoo
c0368b34b4 updating createFile in CakeScript, adding mode to Folder construct in File class
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5000 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-05-03 23:22:02 +00:00
nate
b81d297f5c Adding bootstrap check for unique application salt value, and updating File error message
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4565 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-03-02 20:38:57 +00:00
phpnut
a8a91e35be Correcting all headers in the files
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4407 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-02-02 10:39:45 +00:00
dho
aa6d4959fd Fixing parse error in PHP4
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4216 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-27 09:17:45 +00:00
dho
c25bcd26ab Fixing error messages in File::create (ticket #1770)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4103 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-12-15 12:33:15 +00:00
phpnut
9d19dee879 Renaming branched version directory
git-svn-id: https://svn.cakephp.org/repo/branches/1.1.x.x@3085 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-06-14 18:02:37 +00:00
phpnut
e5c074a0dc Merging fixes into 1.x.x.x branched code:
Revision: [2955]

Revision: [2951]

Revision: [2918]

Revision: [2911]

git-svn-id: https://svn.cakephp.org/repo/branches/1.x.x.x@2958 3807eeeb-6ff5-0310-8944-8be069107fe0
2006-05-26 05:29:17 +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
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
73830ec0dc Merging fixes and enhancements into trunk
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
2006-01-20 07:46:14 +00:00
phpnut
f0fe2102ec Updated VERSION file
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
2005-12-27 17:14:32 +00:00
phpnut
9560f78884 Merging:
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
2005-12-27 03:33:44 +00:00
phpnut
134744b5d6 Merging:
[1613]
Fixing Bake (Ticket #5)

[1612]
Adding new file header

[1611]
Starting to fix Bake (Ticket #5)

[1610]
Adding patch for Ticket #63

[1609]
Fixing ticket #13

[1608]
Fix so only sub classes that have a __destruct() implemented will have it registered

[1607]
Fixing ticket #130

[1606]
Fix for Ticket #190

[1605]
Fixing ticket #136

[1604]
Fixed would throw error if a action was camelCased in the url or in requestAction()

[1603]
fixed a few typos in home view

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1614 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-12-24 07:56:48 +00:00
phpnut
c7d02c8068 Merging changes to the trunk.
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
2005-12-23 21:57:26 +00:00
phpnut
6baaa1120f [1125]
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
2005-10-18 22:27:39 +00:00
phpnut
d62b9ec65e Merging from sandboxes
[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
2005-10-09 01:56:21 +00:00