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
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
- 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
- "public" cannot be defined as constant (PHP5 keyword)
- Cannot re-assign $this in libs/template.php on line 217...
Other:
- Started on refactoring as described in #27 - but this feels like fooled aproach. We need to modularize HTML and AJAX stuff to be included only on-call.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@256 3807eeeb-6ff5-0310-8944-8be069107fe0
The point is to provide custom error messages for Cake. As you will see, the quality of documentation is astounding.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@255 3807eeeb-6ff5-0310-8944-8be069107fe0
- Dispatcher sets a Controller::here variable with the real URL used to access the page, so that tag generators can that use an url (linkTo and formTag for example) use the real url, not guess it from the controller and action names which often fails
- Log class works more reliably and a LogError() shortcut function was added
- Nstring class added, to store string-related functions (there are just four yet, including a random password generator and an string-to-array splitter
- SimpleTest library (with Rephlux) included in /vendors; I've tweaked SimpleScorer::inCli() function, because it didn't work on my setup, it should work everywhere now (it checks for empty REQUEST_METHOD, which should only be empty in CLI)
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@248 3807eeeb-6ff5-0310-8944-8be069107fe0
- new Controller::linkEmail() tag generator, with binary encoding (not UTF-8 compatibile)
- Controller::parseHtmlOptions() accepts a new second parameter -- options to exclude
- fixed DBO::farr() (ticked #23)
- fixed and cleaned up DBO layers NEEDS TESTING!
- fixed Template::renderElement(), it didn't use the controller's view vars
- models are loaded only if a database configuration is present
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@247 3807eeeb-6ff5-0310-8944-8be069107fe0
- 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
- 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
- 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
removing tabs in file I found them in
all code should use spaces
If your editor allows set tabs to 4 spaces :)
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@132 3807eeeb-6ff5-0310-8944-8be069107fe0
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