diff options
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/THttpResponse.php | 10 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDatePicker.php | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php index d4a62cc6..f76218ca 100644 --- a/framework/Web/THttpResponse.php +++ b/framework/Web/THttpResponse.php @@ -69,7 +69,7 @@ class THttpResponse extends TModule implements ITextWriter /**
* @var string character set, e.g. UTF-8
*/
- private $_charset;
+ private $_charset='';
/**
* Destructor.
@@ -285,10 +285,10 @@ class THttpResponse extends TModule implements ITextWriter */
protected function sendContentTypeHeader()
{
- $charset = $this->getCharset();
- if(empty($charset) && ($globalization=$this->getApplication()->getGlobalization())!==null)
- $charset = $globalization->getCharset();
- if(!empty($charset))
+ $charset=$this->getCharset();
+ if($charset==='' && ($globalization=$this->getApplication()->getGlobalization(false))!==null)
+ $charset=$globalization->getCharset();
+ if($charset==='')
{
$header='Content-Type: '.$this->getContentType().';charset='.$charset;
$this->appendHeader($header);
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 488a3a3b..6b7202f7 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -105,7 +105,7 @@ class TTemplateManager extends TModule */
protected function getLocalizedTemplate($filename)
{
- if(($app=$this->getApplication()->getGlobalization())===null)
+ if(($app=$this->getApplication()->getGlobalization(false))===null)
return $filename;
foreach($app->getLocalizedResource($filename) as $file)
{
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 9bb352d6..c6a2345b 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -406,7 +406,7 @@ class TDatePicker extends TTextBox */
protected function getCurrentCulture()
{
- $app = $this->getApplication()->getGlobalization();
+ $app = $this->getApplication()->getGlobalization(false);
return $this->getCulture() == '' ?
($app ? $app->getCulture() : 'en') : $this->getCulture();
}
|