mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
PHP 5.4 reduce error of Create default object.
This commit is contained in:
parent
38b3fd2ce5
commit
eec20ea827
8 changed files with 22 additions and 4 deletions
|
|
@ -48,6 +48,7 @@ class communicationAdminModel extends communication
|
|||
|
||||
$oModuleModel = getModel('module');
|
||||
$communication_config = $oModuleModel->getModuleConfig('communication');
|
||||
if(!is_object($communication_config)) $communication_config = new stdClass;
|
||||
if(!$communication_config->colorset)
|
||||
{
|
||||
$communication_config->colorset = "white";
|
||||
|
|
|
|||
|
|
@ -221,6 +221,7 @@ class editorController extends editor
|
|||
$xml_obj->attrs = new stdClass;
|
||||
for($i=0,$c=count($m[0]);$i<$c;$i++)
|
||||
{
|
||||
if(!isset($xml_obj->attrs)) $xml_obj->attrs = new stdClass;
|
||||
$xml_obj->attrs->{$m[1][$i]} = $m[2][$i];
|
||||
}
|
||||
$xml_obj->body = $match[4];
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class integration_searchAdminController extends integration_search
|
|||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args = new stdClass;
|
||||
$args->skin = Context::get('skin');
|
||||
$args->target = Context::get('target');
|
||||
$args->target_module_srl = Context::get('target_module_srl');
|
||||
|
|
@ -51,6 +52,7 @@ class integration_searchAdminController extends integration_search
|
|||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args = new stdClass;
|
||||
$args->skin = $config->skin;
|
||||
$args->target_module_srl = $config->target_module_srl;
|
||||
// Get skin information (to check extra_vars)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<!--// 컬러셋 체크 -->
|
||||
<!--@if($module_info->colorset != "white")-->
|
||||
{@if(!is_object($module_info)) $module_info = new stdClass;}
|
||||
{@$module_info->colorset = "white"}
|
||||
<!--@end-->
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ class layoutAdminController extends layout
|
|||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$start_module = $oModuleModel->getSiteInfo(0, $columnList);
|
||||
$tmpArgs = new stdClass;
|
||||
$tmpArgs->url = $start_module->mid;
|
||||
$tmpArgs->site_srl = 0;
|
||||
$output = executeQuery('menu.getMenuItemByUrl', $tmpArgs);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class messageMobile extends messageView
|
|||
// Get configurations (using module model object)
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
if(!is_object($config)) $config = new stdClass;
|
||||
if(!$config->mskin) $config->mskin = 'default';
|
||||
// Set the template path
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $config->mskin);
|
||||
|
|
|
|||
|
|
@ -608,6 +608,7 @@ class pointController extends point
|
|||
// Remove linkage group
|
||||
if($del_group_list && count($del_group_list))
|
||||
{
|
||||
$del_group_args = new stdClass;
|
||||
$del_group_args->member_srl = $member_srl;
|
||||
$del_group_args->group_srl = implode(',', $del_group_list);
|
||||
$del_group_output = executeQuery('point.deleteMemberGroup', $del_group_args);
|
||||
|
|
@ -615,6 +616,7 @@ class pointController extends point
|
|||
// Grant a new group
|
||||
foreach($new_group_list as $group_srl)
|
||||
{
|
||||
$new_group_args = new stdClass;
|
||||
$new_group_args->member_srl = $member_srl;
|
||||
$new_group_args->group_srl = $group_srl;
|
||||
executeQuery('member.addMemberToGroup', $new_group_args);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class widgetModel extends widget
|
|||
$xml_obj = $tmp_xml_obj->widget;
|
||||
if(!$xml_obj) return;
|
||||
|
||||
$buff = '';
|
||||
$buff = '$widget_info = new stdClass;';
|
||||
|
||||
if($xml_obj->version && $xml_obj->attrs->version == '0.2')
|
||||
{
|
||||
|
|
@ -166,6 +166,7 @@ class widgetModel extends widget
|
|||
|
||||
for($i=0; $i < count($author_list); $i++)
|
||||
{
|
||||
$buff .= '$widget_info->author['.$i.'] = new stdClass;';
|
||||
$buff .= sprintf('$widget_info->author['.$i.']->name = "%s";', $author_list[$i]->name->body);
|
||||
$buff .= sprintf('$widget_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address);
|
||||
$buff .= sprintf('$widget_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
|
||||
|
|
@ -185,6 +186,7 @@ class widgetModel extends widget
|
|||
$buff .= sprintf('$widget_info->widget_srl = $widget_srl;');
|
||||
$buff .= sprintf('$widget_info->widget_title = $widget_title;');
|
||||
// Author information
|
||||
$buff .= '$widget_info->author[0] = new stdClass;';
|
||||
$buff .= sprintf('$widget_info->author[0]->name = "%s";', $xml_obj->author->name->body);
|
||||
$buff .= sprintf('$widget_info->author[0]->email_address = "%s";', $xml_obj->author->attrs->email_address);
|
||||
$buff .= sprintf('$widget_info->author[0]->homepage = "%s";', $xml_obj->author->attrs->link);
|
||||
|
|
@ -203,6 +205,7 @@ class widgetModel extends widget
|
|||
$extra_var_count = count($extra_vars);
|
||||
|
||||
$buff .= sprintf('$widget_info->extra_var_count = "%s";', $extra_var_count);
|
||||
$buff .= '$widget_info->extra_var = new stdClass;';
|
||||
for($i=0;$i<$extra_var_count;$i++)
|
||||
{
|
||||
unset($var);
|
||||
|
|
@ -212,8 +215,12 @@ class widgetModel extends widget
|
|||
$id = $var->attrs->id?$var->attrs->id:$var->attrs->name;
|
||||
$name = $var->name->body?$var->name->body:$var->title->body;
|
||||
$type = $var->attrs->type?$var->attrs->type:$var->type->body;
|
||||
if($type =='filebox') $buff .= sprintf('$widget_info->extra_var->%s->filter = "%s";', $id, $var->type->attrs->filter);
|
||||
if($type =='filebox') $buff .= sprintf('$widget_info->extra_var->%s->allow_multiple = "%s";', $id, $var->type->attrs->allow_multiple);
|
||||
$buff .= sprintf('$widget_info->extra_var->%s = new stdClass;', $id);
|
||||
if($type =='filebox')
|
||||
{
|
||||
$buff .= sprintf('$widget_info->extra_var->%s->filter = "%s";', $id, $var->type->attrs->filter);
|
||||
$buff .= sprintf('$widget_info->extra_var->%s->allow_multiple = "%s";', $id, $var->type->attrs->allow_multiple);
|
||||
}
|
||||
|
||||
$buff .= sprintf('$widget_info->extra_var->%s->group = "%s";', $id, $group->title->body);
|
||||
$buff .= sprintf('$widget_info->extra_var->%s->name = "%s";', $id, $name);
|
||||
|
|
@ -299,6 +306,7 @@ class widgetModel extends widget
|
|||
|
||||
for($i=0; $i < count($author_list); $i++)
|
||||
{
|
||||
$buff .= '$widgetStyle_info->author['.$i.'] = new stdClass;';
|
||||
$buff .= sprintf('$widgetStyle_info->author['.$i.']->name = "%s";', $author_list[$i]->name->body);
|
||||
$buff .= sprintf('$widgetStyle_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address);
|
||||
$buff .= sprintf('$widgetStyle_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
|
||||
|
|
@ -317,7 +325,7 @@ class widgetModel extends widget
|
|||
{
|
||||
$extra_var_count = count($extra_vars);
|
||||
|
||||
$buff .= sprintf('$widgetStyle_info->extra_var_count = "%s";', $extra_var_count);
|
||||
$buff .= sprintf('$widgetStyle_info->extra_var_count = "%s";$widgetStyle_info->extra_var = new stdClass;', $extra_var_count);
|
||||
for($i=0;$i<$extra_var_count;$i++)
|
||||
{
|
||||
unset($var);
|
||||
|
|
@ -328,6 +336,7 @@ class widgetModel extends widget
|
|||
$name = $var->name->body?$var->name->body:$var->title->body;
|
||||
$type = $var->attrs->type?$var->attrs->type:$var->type->body;
|
||||
|
||||
$buff .= sprintf('$widgetStyle_info->extra_var->%s = new stdClass;', $id);
|
||||
$buff .= sprintf('$widgetStyle_info->extra_var->%s->group = "%s";', $id, $group->title->body);
|
||||
$buff .= sprintf('$widgetStyle_info->extra_var->%s->name = "%s";', $id, $name);
|
||||
$buff .= sprintf('$widgetStyle_info->extra_var->%s->type = "%s";', $id, $type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue