mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Added CAKEPHP_SHELL constant to shell dispatcher making it easy to recognize when in shell mode
Fixed #4599 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6834 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
52ec5467c6
commit
24d8878ab6
2 changed files with 2 additions and 1 deletions
|
@ -150,6 +150,7 @@ class ShellDispatcher {
|
|||
define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(__FILE__))));
|
||||
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
|
||||
define('DISABLE_DEFAULT_ERROR_HANDLING', false);
|
||||
define('CAKEPHP_SHELL', true);
|
||||
}
|
||||
/**
|
||||
* Defines current working environment.
|
||||
|
|
|
@ -633,7 +633,7 @@ class RequestHandlerComponent extends Object {
|
|||
if (!empty($options['attachment'])) {
|
||||
header('Content-Disposition: attachment; filename="' . $options['attachment'] . '"');
|
||||
}
|
||||
if (Configure::read() < 2) {
|
||||
if (Configure::read() < 2 && !defined('CAKEPHP_SHELL')) {
|
||||
header($header);
|
||||
foreach ($headers as $h) {
|
||||
header($h);
|
||||
|
|
Loading…
Reference in a new issue