From a38846b6114877e1e9b7ed8c592e7ff58a8ecf80 Mon Sep 17 00:00:00 2001 From: AD7six Date: Tue, 23 Feb 2010 11:05:38 +0100 Subject: [PATCH] prevent creating tmp dirs all over the file system if running 'anonymous' shells --- cake/console/cake.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cake/console/cake.php b/cake/console/cake.php index 7d65b8346..0f90dbd44 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -244,6 +244,9 @@ class ShellDispatcher { define('APP_DIR', $this->params['app']); define('APP_PATH', $this->params['working'] . DS); define('WWW_ROOT', APP_PATH . $this->params['webroot'] . DS); + if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) { + define('TMP', CORE_PATH . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'tmp' . DS); + } $includes = array( CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php',