|
@@ -51,11 +51,7 @@ class Response extends \CApplicationComponent
|
|
|
{
|
|
{
|
|
|
if ($this->format === static::FORMAT_JSON) {
|
|
if ($this->format === static::FORMAT_JSON) {
|
|
|
header('Content-type: application/json; charset=utf-8');
|
|
header('Content-type: application/json; charset=utf-8');
|
|
|
- $options = 0;
|
|
|
|
|
- if (YII_DEBUG) {
|
|
|
|
|
- $options |= JSON_PRETTY_PRINT;
|
|
|
|
|
- }
|
|
|
|
|
- $this->_result = json_encode($this->_result, $options);
|
|
|
|
|
|
|
+ $this->_result = \CJSON::encode($this->_result);
|
|
|
}
|
|
}
|
|
|
if ($this->format === static::FORMAT_XML) {
|
|
if ($this->format === static::FORMAT_XML) {
|
|
|
header('Content-type: application/xml; charset=utf-8');
|
|
header('Content-type: application/xml; charset=utf-8');
|