diff --git a/classes/widget/WidgetHandler.class.php b/classes/widget/WidgetHandler.class.php index d1c2c0161..4bd1aa7df 100644 --- a/classes/widget/WidgetHandler.class.php +++ b/classes/widget/WidgetHandler.class.php @@ -121,6 +121,7 @@ $widget_padding_bottom = $args->widget_padding_bottom; $inner_style = sprintf("padding:%dpx %dpx %dpx %dpx !important; padding:none !important;", $widget_padding_top, $widget_padding_right, $widget_padding_bottom, $widget_padding_left); + $oDocumentModel = &getModel('document'); /** * 위젯 출력물을 구함 **/ @@ -129,7 +130,12 @@ switch($widget) { // 내용 직접 추가일 경우 case 'widgetContent' : - $body = base64_decode($args->body); + if($args->document_srl) { + $oDocument = $oDocumentModel->getDocument($args->document_srl); + $body = $oDocument->getContent(false,false,false); + } else { + $body = base64_decode($args->body); + } $output = sprintf('
', $style, $inner_style, $body); break; @@ -149,15 +155,16 @@ switch($widget) { // 내용 직접 추가일 경우 case 'widgetContent' : - $body = base64_decode($args->body); + if($args->document_srl) { + $oDocument = $oDocumentModel->getDocument($args->document_srl); + $body = $oDocument->getContent(false,false,false); + } else { + $body = base64_decode($args->body); + } $oWidgetController = &getController('widget'); $output = sprintf( - '