Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move charset/App.encoding into CakeResponse

  • Loading branch information...
commit b47e3a7d92d8b79ec69fd292165209d5d50748a3 1 parent 76d21c6
@dereuromark dereuromark authored
View
2  app/webroot/index.php
@@ -94,4 +94,4 @@
App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
-$Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
+$Dispatcher->dispatch(new CakeRequest(), new CakeResponse());
View
2  lib/Cake/Console/Templates/skel/webroot/index.php
@@ -98,5 +98,5 @@
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(
new CakeRequest(),
- new CakeResponse(array('charset' => Configure::read('App.encoding')))
+ new CakeResponse()
);
View
2  lib/Cake/Controller/Component/CookieComponent.php
@@ -177,7 +177,7 @@ public function __construct(ComponentCollection $collection, $settings = array()
if ($controller && isset($controller->response)) {
$this->_response = $controller->response;
} else {
- $this->_response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
+ $this->_response = new CakeResponse();
}
}
View
2  lib/Cake/Error/ExceptionRenderer.php
@@ -146,7 +146,7 @@ protected function _getController($exception) {
if (!$request = Router::getRequest(true)) {
$request = new CakeRequest();
}
- $response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
+ $response = new CakeResponse();
if (method_exists($exception, 'responseHeader')) {
$response->header($exception->responseHeader());
View
5 lib/Cake/Network/CakeResponse.php
@@ -384,9 +384,10 @@ public function __construct(array $options = array()) {
if (isset($options['type'])) {
$this->type($options['type']);
}
- if (isset($options['charset'])) {
- $this->charset($options['charset']);
+ if (!isset($options['charset'])) {
+ $options['charset'] = Configure::read('App.encoding');
}
+ $this->charset($options['charset']);
}
/**
View
2  lib/Cake/Test/test_app/Error/TestAppsExceptionRenderer.php
@@ -7,7 +7,7 @@ protected function _getController($exception) {
if (!$request = Router::getRequest(true)) {
$request = new CakeRequest();
}
- $response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
+ $response = new CakeResponse();
try {
$controller = new TestAppsErrorController($request, $response);
$controller->layout = 'banana';
View
2  lib/Cake/View/Helper/CacheHelper.php
@@ -302,7 +302,7 @@ protected function _writeFile($content, $timestamp, $useCallbacks = false) {
$file .= '
$request = unserialize(base64_decode(\'' . base64_encode(serialize($this->request)) . '\'));
- $response = new CakeResponse(array("charset" => Configure::read("App.encoding")));
+ $response = new CakeResponse();
$controller = new ' . $this->_View->name . 'Controller($request, $response);
$controller->plugin = $this->plugin = \'' . $this->_View->plugin . '\';
$controller->helpers = $this->helpers = unserialize(base64_decode(\'' . base64_encode(serialize($this->_View->helpers)) . '\'));
View
2  lib/Cake/View/Helper/HtmlHelper.php
@@ -160,7 +160,7 @@ public function __construct(View $View, $settings = array()) {
if (is_object($this->_View->response)) {
$this->response = $this->_View->response;
} else {
- $this->response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
+ $this->response = new CakeResponse();
}
if (!empty($settings['configFile'])) {
$this->loadConfig($settings['configFile']);
View
2  lib/Cake/View/View.php
@@ -330,7 +330,7 @@ public function __construct(Controller $controller = null) {
if (is_object($controller) && isset($controller->response)) {
$this->response = $controller->response;
} else {
- $this->response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
+ $this->response = new CakeResponse();
}
$this->Helpers = new HelperCollection($this);
$this->Blocks = new ViewBlock();
Please sign in to comment.
Something went wrong with that request. Please try again.