From 8c6ff8a40592361fe2f4c15708d304b1770bc784 Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 17 Apr 2008 07:29:45 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9C=84=EC=A0=AF=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=8B=9C=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EA=B0=92=EB=93=A4=EC=9D=84=20=EC=A0=9C=EA=B1=B0?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4118 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/widget/widget.controller.php | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/modules/widget/widget.controller.php b/modules/widget/widget.controller.php index ade15ed22..a6a0f728b 100644 --- a/modules/widget/widget.controller.php +++ b/modules/widget/widget.controller.php @@ -26,6 +26,7 @@ unset($vars->module); unset($vars->act); unset($vars->selected_widget); + unset($vars->body); if($vars->widget_sequence) { $cache_path = './files/cache/widget_cache/'; @@ -33,31 +34,19 @@ @unlink($cache_file); } - $vars->widget_sequence = getNextSequence(); - if(!$vars->widget_cache) $vars->widget_cache = 0; + if($vars->widget_cache>0) $vars->widget_sequence = getNextSequence(); $attribute = array(); if($vars) { foreach($vars as $key => $val) { + if(!$val) continue; if(strpos($val,'|@|') > 0) $val = str_replace('|@|', ',', $val); $val = htmlspecialchars($val); $attribute[] = sprintf('%s="%s"', $key, $val); } } - if($vars->widget_fix_width == 'Y') { - $widget_width_type = strtolower($vars->widget_width_type); - if(!$widget_width_type||!in_array($widget_width_type,array("px","%"))) $widget_width_type = "px"; - - $style .= sprintf("%s:%s%s;", "width", trim($vars->widget_width), $widget_width_type); - - if($vars->widget_position) $style .= sprintf("%s:%s;", "float", trim($vars->widget_position)); - else $style .= "float:left;"; - $widget_code = sprintf('', $blank_img_path, $widget, implode(' ',$attribute), $style); - } else { - $style = "clear:both;"; - $widget_code = sprintf('', "100%", $blank_img_path, $style, $widget, implode(' ',$attribute)); - } + $widget_code = sprintf('', $widget, implode(' ',$attribute)); $cache_path = './files/cache/widget_cache/'; $cache_file = sprintf('%s%d.%s.cache', $cache_path, $vars->widget_sequence, Context::getLangType()); @@ -79,8 +68,8 @@ $vars = Context::getRequestVars(); $widget = $vars->selected_widget; unset($vars->module); - unset($vars->body); unset($vars->act); + unset($vars->body); unset($vars->selected_widget); if($vars->widget_sequence) { @@ -88,13 +77,14 @@ $cache_file = sprintf('%s%d.%s.cache', $cache_path, $vars->widget_sequence, Context::getLangType()); @unlink($cache_file); } - $vars->widget_sequence = getNextSequence(); - if(!$vars->widget_cache) $vars->widget_cache = 0; + + if($vars->widget_cache>0) $vars->widget_sequence = getNextSequence(); // args 정리 $attribute = array(); if($vars) { foreach($vars as $key => $val) { + if(!$val) continue; if(strpos($val,'|@|')>0) { $val = str_replace('|@|',',',$val); $vars->{$key} = $val;