mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add widget directive for Template v2
This commit is contained in:
parent
3e052d2d00
commit
e192bc0ff6
3 changed files with 22 additions and 7 deletions
|
|
@ -450,14 +450,21 @@ class WidgetController extends Widget
|
|||
// Save for debug run-time widget
|
||||
$start = microtime(true);
|
||||
|
||||
// urldecode the value of args haejum
|
||||
$object_vars = get_object_vars($args);
|
||||
if(count($object_vars))
|
||||
// Type juggling
|
||||
if (is_array($args))
|
||||
{
|
||||
foreach($object_vars as $key => $val)
|
||||
$args = (object)$args;
|
||||
}
|
||||
|
||||
// Apply urldecode for backward compatibility
|
||||
if ($escaped)
|
||||
{
|
||||
foreach (get_object_vars($args) ?: [] as $key => $val)
|
||||
{
|
||||
if(in_array($key, array('widgetbox_content','body','class','style','widget_sequence','widget','widget_padding_left','widget_padding_top','widget_padding_bottom','widget_padding_right','widgetstyle','document_srl'))) continue;
|
||||
if($escaped) $args->{$key} = utf8RawUrlDecode($val);
|
||||
if (!in_array($key, ['body', 'class', 'style', 'document_srl', 'widget', 'widget_sequence', 'widgetstyle', 'widgetbox_content', 'widget_padding_left', 'widget_padding_top', 'widget_padding_bottom', 'widget_padding_right']))
|
||||
{
|
||||
$args->{$key} = utf8RawUrlDecode($val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue