summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2006-07-04 13:54:15 +0000
committerxue <>2006-07-04 13:54:15 +0000
commita3871f4b80c244a9967eb98b54b7c8c520a3cade (patch)
treea683172138131673ad6fbda448fbd2dfb44e3758 /framework/Web/UI
parent94e18ca98e6b91c04120b33f5ed7a9b0672afa46 (diff)
Fixed rendering of TStyleSheet
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/WebControls/TStyleSheet.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/framework/Web/UI/WebControls/TStyleSheet.php b/framework/Web/UI/WebControls/TStyleSheet.php
index e5b6ac6d..02ac40cd 100644
--- a/framework/Web/UI/WebControls/TStyleSheet.php
+++ b/framework/Web/UI/WebControls/TStyleSheet.php
@@ -66,10 +66,12 @@ class TStyleSheet extends TControl
*/
public function render($writer)
{
- $textWriter=new TTextWriter;
- parent::renderChildren(new THtmlWriter($textWriter));
- if(($css=trim($textWriter->flush()))!=='')
- $writer->write("<style type=\"text/css\">\n/*<![CDATA[*/\n{$css}\n/*]]>*/\n</style>\n");
+ if($this->getHasControls())
+ {
+ $writer->write("<style type=\"text/css\">\n/*<![CDATA[*/\n");
+ $this->renderChildren($writer);
+ $writer->write("\n/*]]>*/\n</style>\n");
+ }
}
}