Commit graph

58 commits

Author SHA1 Message Date
phpnut
d44a364285 merging all changes done in sandbox for next release into the trunk
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1057 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-10-03 04:48:00 +00:00
phpnut
3fb93807a9 Merging [920] [922] [929]
[920]
Small bugfix for after condition in AjaxHelper::remoteFunction

[922]
Fixed Ticket #224
Added patch from Ticket #221
Added patch from Ticket #222
Renamed renderMethod() to requestAction() the name fits better since we are really requesting another objects response.
Added a default setting to turn of autoRender for the class you are requesting the action from, 
this will allow you to request an action and use the return how you like, instead of letting the object output the content
directly to the browser if it would normally do so.

[929]
Adding fix for Itcket #225.

Moved code for beforeFilters to first section of Controller::constructClasses().
Removed current implementaion of  beforeFilters. This will be changed to pass
a reference of the object to the filters through a core filters class.
The core filter class will then load the filters and perform all request on the object in the order the
filters are arranged in var $beforeFilters, each beforeFilter needs to be a class that the core filter class will create
an instance of. If one of the filters fails, it will return the object, untouched and not try to process other filters, an 
failed var will be set on the controller.

This will be done before data base is initialized for the current object that is being filtered.

Modifed the requestAction() changes are noted below

        Using inside of a controller.
        Default
        $this->requestAction('/controller/action/argument/');
        Request Object to render output directly
        $this->requestAction('/controller/action/argument/', a('render'));

        Using a helper object to make request inside of a view:
        Default
        $helpername->requestAction('/controller/action/argument/');
        Request Object to render output directly
        $helpername->requestAction('/controller/action/argument/', a('render'));

        Using the View object "$this" in a view to make request:
        $this->requestAction('/controller/action/argument/');
        Request Object to render output directly
        $this->requestAction('/controller/action/argument/', a('render'));




git-svn-id: https://svn.cakephp.org/repo/trunk/cake@930 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-21 05:48:09 +00:00
phpnut
ea2058256a Merging following revisions to trunk
[913]
Refactoring Dispatcher and Scaffold classes.
Removed Dispatcher::scaffoldView() and added it to
Scaffold::_scaffoldView() less coupling between the 2 classes now

[914]
Adding settings to fix issue when using get_class() in PHP 4.
If value of var $casedClas is set in controller this name will be Inflected to the proper table name if underscores are used
in the database.

[915]
Added suggestion from ticket #220

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@917 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-19 22:59:06 +00:00
phpnut
5f1d672d5e Some changes to allow calling a method from another controller in the view.
helpers can now use this like a url to get methods return value:
$helpername->renderMethod('/controller/action/param/');
Refactored dispatcher.
Adding bug fix by nate in [894] [896]
Added extra param View::renderMethod()
Fixed bug related to #72, #111, #113, #209
Some of those tickets where closed as duplicates already

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@900 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-19 01:16:05 +00:00
phpnut
a86866a7a1 merging [880] [881] [882] and [883] fixes
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@884 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-18 13:25:20 +00:00
phpnut
7eb53efb5b Added variable correction make in [876]
Ticket #216 closed

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@877 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-18 10:08:10 +00:00
phpnut
02f5dfb43f merging fixes to the trunk,
re syncing sandboxes

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@875 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-17 22:20:28 +00:00
phpnut
00aa3c66d2 merging fixes into trunk from [869]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@870 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-17 12:37:05 +00:00
phpnut
29a1ee9043 merging fixes into trunk from [857] [858] [859] [860] [861]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@862 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-17 07:56:32 +00:00
phpnut
1dce095546 merging changes from sandboxes
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@856 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-17 02:22:07 +00:00
phpnut
24cc71311e merging changes from my sandbox
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@812 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-14 02:58:23 +00:00
phpnut
e640ab7596 merging from my sandbox
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@798 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-11 12:45:10 +00:00
phpnut
731cc517e9 merging changes to tests from my sandbox
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@789 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-11 02:35:47 +00:00
phpnut
6019c0d98d merging changes and bug fixes from sandboxes
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@757 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-07 01:52:45 +00:00
phpnut
7c7a2151ab updating trunk with bug fixes and other modifications
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@737 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-28 16:33:50 +00:00
phpnut
4c5e5ec9a2 Merging changes from [714] [715]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@716 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-26 04:03:51 +00:00
phpnut
9bdd3cf9aa merging fixes from [712]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@713 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-25 23:23:44 +00:00
phpnut
d5ebd2f4b7 merging changes from [692] [693] [697] [699] [701] [704] [706] [707]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@709 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-25 16:40:50 +00:00
phpnut
cdf8fd5812 merging changes from [683] [684] [685] [686] [688] [689] [690]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@691 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-25 03:45:14 +00:00
phpnut
e9358bacbe merging fixes and changes from my sandbox up to last svn commit [675]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@677 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-24 03:08:37 +00:00
phpnut
bf7386ffa0 merging fixes from [652] [653] [656] [658] [659] [663] [666] [667]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@668 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-23 23:21:33 +00:00
phpnut
dcf9a8cc38 forgot to commit these changes to trunk and my own sandbox
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@635 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-22 04:25:26 +00:00
phpnut
650c85809a merging changes from [619] [620] [622] [623] and [630]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@632 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-22 02:48:37 +00:00
phpnut
fbf4d9ee27 merging code from sandboxes since [430]
preparing for release .0.9.2

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@606 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-21 06:49:02 +00:00
phpnut
6fd89c96d5 merging from source:whiteboard/sandbox/phpnut/pre_0.9.2 at [409]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@410 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-21 04:40:30 +00:00
phpnut
9d1d0201ec merging from source:whiteboard/sandbox/phpnut/pre_0.9.2 at [404]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@405 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-21 04:02:32 +00:00
phpnut
36320ff8e4 Merging changes from revisions [353] [354] [355] [356]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@358 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-16 06:10:56 +00:00
phpnut
3c5c99423d merging changes from source:whiteboard/sandbox/phpnut/pre_0.9.2 in revisions [343] and [344]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@345 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-10 07:49:30 +00:00
phpnut
6460f6e83f Merging changes from revisions [337] [338] [339] [340] [341]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@342 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-10 05:08:19 +00:00
phpnut
6ca443861d more cleanup for API docs to be generated without errors
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@323 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-04 04:16:20 +00:00
phpnut
3500ca272c more cleanup for API docs to be generated without errors
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@322 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-04 02:59:39 +00:00
phpnut
c9d9cb8287 cleaning up the file headers so API docs can be created properly
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@320 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-04 02:07:21 +00:00
phpnut
1b30f48607 renaming narray back to NeatArray
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@314 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-04 01:39:06 +00:00
phpnut
8a806d7fc5 going thru trunk and cleaning up the file headers so API docs can be created properly
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@309 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-07-04 01:07:14 +00:00
brego
d9a7885d0f DboFactory comes back, no more global variables. To get actual instance of db, call DboFactory::getInstance(). You can also change the running object with DboFactory::setConfig('configname').
Data validation is still dead, gonna spend a night on that one.



git-svn-id: https://svn.cakephp.org/repo/trunk/cake@276 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-23 20:41:10 +00:00
brego
ba139f10bb Database should work now. I have introduced some semi-singelton magic in dbo. DboFactory is no longer needed. This is not tested properly, and tests will most likely fail! Follow up soon.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@274 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-23 13:59:02 +00:00
pies
27d16ff9b9 I'm sorry, I've reversed two changes. I've changed the error views names to underscored, and I've changed the default DEBUG to 1.
The first one is for consistency (no UppperCase filenames, please), the second is because while I'm no enemy of application security, the application has to be safe _after_ it's written, not before. And to easily write an application, the developer should have the DEBUG mode set to 1 or 2.

Other than that, I think it's a very good idea to put the tag generators in helpers :)

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@271 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-22 23:16:26 +00:00
pies
b717167c4f - changed NeatArray to Narray, it's shorter, easier to use,
- Time::daysAsSql returns SQL limits for a set of days, perhaps should be in DBO,
- cleanups

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@259 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-20 23:08:59 +00:00
pies
6fa1c1b3d4 - fix for Ticket #30
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@254 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-19 04:42:52 +00:00
pies
01b0d81dd2 - Bake pluralized all controller names, fixed.
- vendor() function to load a vendor library
- uses() is simple again
- config() treats database config differently (needs to because database config is a class, not a great idea after all)
- moved DBO layers into their own subfolder in /libs -- there's too many of them already
- AdoDB and Pear::DB support much better, although needs testing
- fixes in Flay URL parsing
- Model::findAll() uses the new DBO::selectLimit() method for wider database compatibility
- changed Template::_page_title into _pageTitle
- /public/index.php cleaned up

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@245 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-12 20:50:12 +00:00
pies
39132f9bcf - I've rebuilt the startup a bit, more libraries are explicitly loaded at startup. They were loaded anyway (Object, Inflector), but implicitly thru uses() calls. I did it to untangle the relationships between files.
- Link tag generator fixed for compatibility with XHTML (& => &)
- prepare() and tables() methods renamed to prepareField() and tablesList() in database layers, prepare() and tables() meta-methods created in Model. The first one so that prepare() can accept both strings and arrays, the second one to fix Ticket #26 (case-sensitive table names didn't work for DB2).
- Few minor changes of includes() to requires() and the other way, to prevent unnecessary program terminations, and potential crashes.
- Time::toAtom() and Time::toRss() to format dates for XML feeds.
- Some code cleanups (unnecessary __construct()'s), also, I'm changing the parentheses into:

if (true)
{
}

I hope that's ok with everybody? I find it easier to understand code with that formatting. Does anyone know a highly configurable tool that would format PHP code automatically?

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@241 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-11 03:45:31 +00:00
pies
3f10d747b7 - Cake didn't work without mod_rewrite, fixed (/index.php, /libs/router.php).
- Controller accepts $params as a constructor parameter (for Larry).
- DBO::prepare() returned an array even when a string was passed to it, fixed.
- Flay and Folder tests fixed, DBO_Factory test disabled (no database config by default, so do database access to test).
- 

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@238 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 19:42:54 +00:00
pies
443a702376 I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?

Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself? 

- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.

- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
pies
85dff45ada - NeatArray::threaded() returns to the repository, it got lost somehow.
- A limit (default: 200 lines) on query log size in DBO.
- A fix for Flay's url guessing.
- Removed application specific code from /libs/legacy.php
- A fix for /libs/model.php
- An unfinished /libs/dbo_pear.php; if anyone can help out finishing it, it would be great -- I don't know Pear::DB too well

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@218 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-02 23:04:20 +00:00
pies
065131205d Merged in Olle's changes (comments). Olle, can you sync with the trunk? It's up to half an hour ago.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@213 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-02 19:37:06 +00:00
pies
9bbe275903 (I don't know what's happening:/ )
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@207 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-31 23:18:22 +00:00
pies
4234bc9488 I've added some fixes and new methods, hope this gets to be in the today's release. If not, at least the fixes should get in as soon as possible.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@192 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-29 19:43:59 +00:00
pies
1f8dd75a34 - default layout uses the new cssTag and charsetTag
- default set of routes no longer routes all unknown requests to Pages controller (/pages/* is used now for that)
- Pages::index is used as default home, I'll try to make it read all the controllers and methods and present them as a website menu
- added tag definitions for cssTag and charsetTag
- extended NeatArray class with some more methods
- DbFactory auto-loads database configuration
- missing error message added (for no action set)
- /logs directory added (at least, I hope)

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@165 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-23 23:08:43 +00:00
pies
4a87a75332 - Two standard controllers -- PageController and TestsController
- Helpers for controllers -- each controller has it's own helper in the /app/helpers directory
- /logs and /modules directories
- The application runs just fine without /config/database.php if controllers don't ask for db access
- Changed the name of /public/dispatch.php to /public/index.php, it's nicer and more standard, won't you agree? Kamil's fix for no-mod_rewrite needs to be re-implemented
- Cleanups, fixes, and even one or two comments ;)

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@158 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-22 23:24:09 +00:00
pies
b5f6dba58e git-svn-id: https://svn.cakephp.org/repo/trunk/cake@148 3807eeeb-6ff5-0310-8944-8be069107fe0 2005-05-21 22:40:51 +00:00