Thought I'd post my current quick-hack of paths. It is simple but it does what I need. And git makes the process of hacking the core a lot easier. Fast forward rocks.
git diffing looks like this: Just three lines added: diff --git a/cake/config/paths.php b/cake/config/paths.php index 6a6449f..075313a 100644 --- a/cake/config/paths.php +++ b/cake/config/paths.php @@ -46,6 +46,9 @@ if (!defined('APP')) { define('APP', ROOT.DS.APP_DIR.DS); } +if (file_exists(APP . 'config' . DS . 'paths.php')) { + include_once APP . 'config' . DS . 'paths.php'; +} /** * Path to the application's models directory. */ With that I can now use my domain-parsing in app/config/paths.php and point TMP to a domain-specific folder avoiding any and all possible conflicts with logs, caches and everything else I keep in there. On Apr 20, 11:10 am, Martin Westin <martin.westin...@gmail.com> wrote: > I'd like some reactions to this kind of addition to Cake in a future > version. > > cake/config/paths.php is the file that defines the locations of files > and directories. > > Most defines look like this: > define('CSS', WWW_ROOT.'css'.DS); > > Some of them anticipate that they might have been set before, like: > if (!defined('VENDORS')) { > define('VENDORS', CAKE_CORE_INCLUDE_PATH.DS.'vendors'.DS); > > } > > Problem is that you can't choose the locations of all these 100% of > the time. Some of these are set in app/webroot/index.php. As some > might have already figured out index.php is not loaded for shell > tasks, making any edits you make prone to elusive errors where tasks > do not run as expected. And there is currently no other place (that I > know of outside the core) besides index.php to make any modifications > to paths. > > My proposal is for an app-specific paths file. This file would be > included before including the core paths.php for both shells and > browser requests. > > The use of this would be limited. The scenario I personally would use > it in is to enable domain-specific tmp folders. This is part of my > passion for consolidated deployment. I deploy two separate projects > using a single core, a single app (one for each app of-course), > multiple configs, multiple databases. I was hoping for multiple tmp > folders next :) > > You can see a detailed explanation of the setup I like > here:http://bakery.cakephp.org/articles/view/one-core-one-app-multiple-dom... > > There might be other uses in some deployment layouts so instead of > begging for a way to define TMP before reaching paths.php I thought a > broader approach might be in order. > > Do you have any other ideas or thoughts about this or related > "problems"? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---