Commit graph

28 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
92d2625186 merging change from [911]
Refactoring Dispatcher::dispatch() created a private Dispatcher::_invoke().
Removed code that was no longer used by Dispatcher
Refactored duplicate code in Object::renderMethod();

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@912 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-19 20:07:16 +00:00
phpnut
59af4d3258 Merging changes from:
[905]
Refactoring renderMethod() moving to object class to make it available to whole system

[908]
Bug fixes to ticket #219.
Added bug fixes I found in code.
Fixed Router::parse(); which only checked lower case strings
Refactored renderAction method. Moved to object class to allow all classes to access the method now.
This will allow a User object to make a request to a Permsissions object checking.
For example: You have a User object that needs to check its permission to access
User object would make are request to Permission object.
$accces = $this->renderAction('/permission/allow/userid/');

You would then be able to use the results of $access in your controller.
To check this in the view
$accces = $html->renderAction('/permission/allow/userid/');

Simple as that.

[906]
Added sortable() to AjaxHelper as a method of creating sortables,
and refactored a fair amount of the code.

[907]
Coding standard corrections.

removed blank line at end of paths.php file

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@910 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-09-19 17:20:24 +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
184e0d06e8 re syncing all sandboxes and updated trunk with all the latest changes
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@634 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-22 04:15:57 +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
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
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
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
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
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
brego
38ddea527e Ok, this one is very big. Firstly, I've outsourced (:]) helper methods like linkTo etc into separate files, located in /libs/helpers/*.
I am not finished with copying methods out of template.php, but it will come - also data validation would not be a problem helpers inclusion happens in the Template::_render().

Also, there was a bug with error functions (as Controller::missingView) - on linux, calling $this->render('../errors/missingController'); rsulted in an error - beacouse apparently is_file() cannot work with '..'. I added a simple fix in Template::_getViewFn.

I've also made some cleanups. Will continue to work tonight.



git-svn-id: https://svn.cakephp.org/repo/trunk/cake@264 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-21 23:44:49 +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
a8eed860b2 - added the csspp library that automatically reduces the size of CSS files; it is activated by prefixing an CSS file URL with /ccss/ instead of /css/ and there's a switch in the /config/core.php to activate it in Controller::cssTag()
- added a new class, File, currently only used by the Log class and Compressed CSS (CCSS) caching; aims to support easy reading and writing of files

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@252 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-19 03:35:19 +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
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
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
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
3dd8d77b09 Fixed a bug in log.php and object.php, deleted 'components' dir (it's now 'modules').
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@150 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-21 22:51:26 +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
phpnut
a04f96df6b modifying file headers
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@130 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-17 21:27:56 +00:00
pies
a778f3c3c3 Merging my changes into trunk. This should give us a nice clean trunk to continue with. It's strongly recommended that you merge this version with your sandboxes -- I've added all the phpdoc fields and changed a lot.
I've removed the author/licence information from some files -- such as app/app_controller.php and config/database.php -- as they are not our code and those files need to remain as clean as possible for people not to get lost in them.

I've run the tests on this one, but the tests are not as extensive as they should be. If you want to get the test controller etc. check out the version in my sandbox. But we'll probably be moving to SimpleTest  soon anyway.

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@114 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-16 23:14:37 +00:00
phpnut
bb71238ec1 change license to The MIT License
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@109 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-16 00:52:42 +00:00
phpnut
cd86555549 moving cake to a sub directory
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@106 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-05-15 21:41:38 +00:00