@@ -47,11 +47,15 @@ |
||
47 | 47 | { |
48 | 48 | $poll_srl = $xml_obj->attrs->poll_srl; |
49 | 49 | $skin = $xml_obj->attrs->skin; |
50 | - if(!$skin) $skin = 'default'; |
|
50 | + if(!$skin) { |
|
51 | + $skin = 'default'; |
|
52 | + } |
|
51 | 53 | |
52 | 54 | preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches); |
53 | 55 | $width = $matches[2]; |
54 | - if(!$width) $width = 400; |
|
56 | + if(!$width) { |
|
57 | + $width = 400; |
|
58 | + } |
|
55 | 59 | $style = sprintf('width:%dpx', $width); |
56 | 60 | // poll model object creation to come get it return html |
57 | 61 | $oPollModel = getModel('poll'); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | // Wanted Skins survey |
29 | 29 | $oModuleModel = getModel('module'); |
30 | - $skin_list = $oModuleModel->getSkins(_XE_PATH_ . 'modules/poll/'); |
|
30 | + $skin_list = $oModuleModel->getSkins(_XE_PATH_.'modules/poll/'); |
|
31 | 31 | Context::set('skin_list', $skin_list); |
32 | 32 | // Pre-compiled source code to compile template return to |
33 | 33 | $tpl_path = $this->component_path.'tpl'; |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | { |
48 | 48 | $poll_srl = $xml_obj->attrs->poll_srl; |
49 | 49 | $skin = $xml_obj->attrs->skin; |
50 | - if(!$skin) $skin = 'default'; |
|
50 | + if (!$skin) $skin = 'default'; |
|
51 | 51 | |
52 | - preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches); |
|
52 | + preg_match('/width([^[:digit:]]+)([0-9]+)/i', $xml_obj->attrs->style, $matches); |
|
53 | 53 | $width = $matches[2]; |
54 | - if(!$width) $width = 400; |
|
54 | + if (!$width) $width = 400; |
|
55 | 55 | $style = sprintf('width:%dpx', $width); |
56 | 56 | // poll model object creation to come get it return html |
57 | 57 | $oPollModel = getModel('poll'); |
@@ -35,12 +35,24 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | //editor_config init |
38 | - if(!$editor_config->editor_height) $editor_config->editor_height = 300; |
|
39 | - if(!$editor_config->comment_editor_height) $editor_config->comment_editor_height = 100; |
|
40 | - if(!$editor_config->editor_skin) $editor_config->editor_skin = 'ckeditor'; |
|
41 | - if(!$editor_config->comment_editor_skin) $editor_config->comment_editor_skin = 'ckeditor'; |
|
42 | - if(!$editor_config->sel_editor_colorset) $editor_config->sel_editor_colorset= 'moono'; |
|
43 | - if(!$editor_config->sel_comment_editor_colorset) $editor_config->sel_comment_editor_colorset= 'moono'; |
|
38 | + if(!$editor_config->editor_height) { |
|
39 | + $editor_config->editor_height = 300; |
|
40 | + } |
|
41 | + if(!$editor_config->comment_editor_height) { |
|
42 | + $editor_config->comment_editor_height = 100; |
|
43 | + } |
|
44 | + if(!$editor_config->editor_skin) { |
|
45 | + $editor_config->editor_skin = 'ckeditor'; |
|
46 | + } |
|
47 | + if(!$editor_config->comment_editor_skin) { |
|
48 | + $editor_config->comment_editor_skin = 'ckeditor'; |
|
49 | + } |
|
50 | + if(!$editor_config->sel_editor_colorset) { |
|
51 | + $editor_config->sel_editor_colorset= 'moono'; |
|
52 | + } |
|
53 | + if(!$editor_config->sel_comment_editor_colorset) { |
|
54 | + $editor_config->sel_comment_editor_colorset= 'moono'; |
|
55 | + } |
|
44 | 56 | |
45 | 57 | $component_list = $oEditorModel->getComponentList(false, $site_srl, true); |
46 | 58 | $editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins'); |
@@ -65,14 +77,20 @@ discard block |
||
65 | 77 | $xml_info->path = './modules/editor/components/'.$xml_info->component_name; |
66 | 78 | $xml_info->delete_url = $oAutoinstallModel->getRemoveUrlByPath($xml_info->path); |
67 | 79 | $xml_info->package_srl = $oAutoinstallModel->getPackageSrlByPath($xml_info->path); |
68 | - if($xml_info->package_srl) $targetpackages[$xml_info->package_srl] = 0; |
|
80 | + if($xml_info->package_srl) { |
|
81 | + $targetpackages[$xml_info->package_srl] = 0; |
|
82 | + } |
|
69 | 83 | } |
70 | 84 | |
71 | - if(is_array($targetpackages)) $packages = $oAutoinstallModel->getInstalledPackages(array_keys($targetpackages)); |
|
85 | + if(is_array($targetpackages)) { |
|
86 | + $packages = $oAutoinstallModel->getInstalledPackages(array_keys($targetpackages)); |
|
87 | + } |
|
72 | 88 | |
73 | 89 | foreach($component_list as $component_name => $xml_info) |
74 | 90 | { |
75 | - if($packages[$xml_info->package_srl]) $xml_info->need_update = $packages[$xml_info->package_srl]->need_update; |
|
91 | + if($packages[$xml_info->package_srl]) { |
|
92 | + $xml_info->need_update = $packages[$xml_info->package_srl]->need_update; |
|
93 | + } |
|
76 | 94 | } |
77 | 95 | $editor_config_default = array( "editor_height" => "300", "comment_editor_height" => "100","content_font_size"=>"13"); |
78 | 96 | |
@@ -162,13 +180,16 @@ discard block |
||
162 | 180 | // Get a list of module category |
163 | 181 | $module_categories = $oModuleModel->getModuleCategories(); |
164 | 182 | |
165 | - if(!is_array($mid_list)) $mid_list = array($mid_list); |
|
183 | + if(!is_array($mid_list)) { |
|
184 | + $mid_list = array($mid_list); |
|
185 | + } |
|
166 | 186 | foreach($mid_list as $module_srl => $module) |
167 | 187 | { |
168 | - if($module) $module_categories[$module->module_category_srl]->list[$module_srl] = $module; |
|
188 | + if($module) { |
|
189 | + $module_categories[$module->module_category_srl]->list[$module_srl] = $module; |
|
190 | + } |
|
169 | 191 | } |
170 | - } |
|
171 | - else |
|
192 | + } else |
|
172 | 193 | { |
173 | 194 | $module_categories[0]->list = $mid_list; |
174 | 195 | } |
@@ -22,59 +22,59 @@ discard block |
||
22 | 22 | { |
23 | 23 | $component_count = 0; |
24 | 24 | $site_module_info = Context::get('site_module_info'); |
25 | - $site_srl = (int)$site_module_info->site_srl; |
|
25 | + $site_srl = (int) $site_module_info->site_srl; |
|
26 | 26 | |
27 | 27 | // Get a type of component |
28 | 28 | $oEditorModel = getModel('editor'); |
29 | 29 | $oModuleModel = getModel('module'); |
30 | 30 | $editor_config = $oModuleModel->getModuleConfig('editor'); |
31 | 31 | |
32 | - if(!$editor_config) |
|
32 | + if (!$editor_config) |
|
33 | 33 | { |
34 | 34 | $editor_config = new stdClass(); |
35 | 35 | } |
36 | 36 | |
37 | 37 | //editor_config init |
38 | - if(!$editor_config->editor_height) $editor_config->editor_height = 300; |
|
39 | - if(!$editor_config->comment_editor_height) $editor_config->comment_editor_height = 100; |
|
40 | - if(!$editor_config->editor_skin) $editor_config->editor_skin = 'ckeditor'; |
|
41 | - if(!$editor_config->comment_editor_skin) $editor_config->comment_editor_skin = 'ckeditor'; |
|
42 | - if(!$editor_config->sel_editor_colorset) $editor_config->sel_editor_colorset= 'moono'; |
|
43 | - if(!$editor_config->sel_comment_editor_colorset) $editor_config->sel_comment_editor_colorset= 'moono'; |
|
38 | + if (!$editor_config->editor_height) $editor_config->editor_height = 300; |
|
39 | + if (!$editor_config->comment_editor_height) $editor_config->comment_editor_height = 100; |
|
40 | + if (!$editor_config->editor_skin) $editor_config->editor_skin = 'ckeditor'; |
|
41 | + if (!$editor_config->comment_editor_skin) $editor_config->comment_editor_skin = 'ckeditor'; |
|
42 | + if (!$editor_config->sel_editor_colorset) $editor_config->sel_editor_colorset = 'moono'; |
|
43 | + if (!$editor_config->sel_comment_editor_colorset) $editor_config->sel_comment_editor_colorset = 'moono'; |
|
44 | 44 | |
45 | 45 | $component_list = $oEditorModel->getComponentList(false, $site_srl, true); |
46 | 46 | $editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins'); |
47 | 47 | |
48 | - $skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->editor_skin); |
|
48 | + $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $editor_config->editor_skin); |
|
49 | 49 | |
50 | 50 | $contents = FileHandler::readDir(_XE_PATH_.'modules/editor/styles'); |
51 | 51 | $content_style_list = array(); |
52 | - for($i=0,$c=count($contents);$i<$c;$i++) |
|
52 | + for ($i = 0, $c = count($contents); $i < $c; $i++) |
|
53 | 53 | { |
54 | 54 | $style = $contents[$i]; |
55 | - $info = $oModuleModel->loadSkinInfo($this->module_path,$style,'styles'); |
|
55 | + $info = $oModuleModel->loadSkinInfo($this->module_path, $style, 'styles'); |
|
56 | 56 | $content_style_list[$style] = new stdClass(); |
57 | 57 | $content_style_list[$style]->title = $info->title; |
58 | 58 | } |
59 | 59 | |
60 | 60 | // Get install info, update info, count |
61 | 61 | $oAutoinstallModel = getModel('autoinstall'); |
62 | - foreach($component_list as $component_name => $xml_info) |
|
62 | + foreach ($component_list as $component_name => $xml_info) |
|
63 | 63 | { |
64 | 64 | $component_count++; |
65 | 65 | $xml_info->path = './modules/editor/components/'.$xml_info->component_name; |
66 | 66 | $xml_info->delete_url = $oAutoinstallModel->getRemoveUrlByPath($xml_info->path); |
67 | 67 | $xml_info->package_srl = $oAutoinstallModel->getPackageSrlByPath($xml_info->path); |
68 | - if($xml_info->package_srl) $targetpackages[$xml_info->package_srl] = 0; |
|
68 | + if ($xml_info->package_srl) $targetpackages[$xml_info->package_srl] = 0; |
|
69 | 69 | } |
70 | 70 | |
71 | - if(is_array($targetpackages)) $packages = $oAutoinstallModel->getInstalledPackages(array_keys($targetpackages)); |
|
71 | + if (is_array($targetpackages)) $packages = $oAutoinstallModel->getInstalledPackages(array_keys($targetpackages)); |
|
72 | 72 | |
73 | - foreach($component_list as $component_name => $xml_info) |
|
73 | + foreach ($component_list as $component_name => $xml_info) |
|
74 | 74 | { |
75 | - if($packages[$xml_info->package_srl]) $xml_info->need_update = $packages[$xml_info->package_srl]->need_update; |
|
75 | + if ($packages[$xml_info->package_srl]) $xml_info->need_update = $packages[$xml_info->package_srl]->need_update; |
|
76 | 76 | } |
77 | - $editor_config_default = array( "editor_height" => "300", "comment_editor_height" => "100","content_font_size"=>"13"); |
|
77 | + $editor_config_default = array("editor_height" => "300", "comment_editor_height" => "100", "content_font_size"=>"13"); |
|
78 | 78 | |
79 | 79 | //editor preview |
80 | 80 | $config = $oEditorModel->getEditorConfig(); |
@@ -138,14 +138,14 @@ discard block |
||
138 | 138 | function dispEditorAdminSetupComponent() |
139 | 139 | { |
140 | 140 | $site_module_info = Context::get('site_module_info'); |
141 | - $site_srl = (int)$site_module_info->site_srl; |
|
141 | + $site_srl = (int) $site_module_info->site_srl; |
|
142 | 142 | |
143 | 143 | $component_name = Context::get('component_name'); |
144 | 144 | // Get information of the editor component |
145 | 145 | $oEditorModel = getModel('editor'); |
146 | - $component = $oEditorModel->getComponent($component_name,$site_srl); |
|
146 | + $component = $oEditorModel->getComponent($component_name, $site_srl); |
|
147 | 147 | |
148 | - if(!$component->component_name) { |
|
148 | + if (!$component->component_name) { |
|
149 | 149 | $this->stop('msg_invalid_request'); |
150 | 150 | return; |
151 | 151 | } |
@@ -158,20 +158,20 @@ discard block |
||
158 | 158 | // Get a mid list |
159 | 159 | $oModuleModel = getModel('module'); |
160 | 160 | |
161 | - $args =new stdClass(); |
|
161 | + $args = new stdClass(); |
|
162 | 162 | $args->site_srl = $site_srl; |
163 | 163 | $columnList = array('module_srl', 'mid', 'module_category_srl', 'browser_title'); |
164 | 164 | $mid_list = $oModuleModel->getMidList($args, $columnList); |
165 | 165 | // Combination of module_category and module |
166 | - if(!$args->site_srl) |
|
166 | + if (!$args->site_srl) |
|
167 | 167 | { |
168 | 168 | // Get a list of module category |
169 | 169 | $module_categories = $oModuleModel->getModuleCategories(); |
170 | 170 | |
171 | - if(!is_array($mid_list)) $mid_list = array($mid_list); |
|
172 | - foreach($mid_list as $module_srl => $module) |
|
171 | + if (!is_array($mid_list)) $mid_list = array($mid_list); |
|
172 | + foreach ($mid_list as $module_srl => $module) |
|
173 | 173 | { |
174 | - if($module) $module_categories[$module->module_category_srl]->list[$module_srl] = $module; |
|
174 | + if ($module) $module_categories[$module->module_category_srl]->list[$module_srl] = $module; |
|
175 | 175 | } |
176 | 176 | } |
177 | 177 | else |
@@ -179,13 +179,13 @@ discard block |
||
179 | 179 | $module_categories[0]->list = $mid_list; |
180 | 180 | } |
181 | 181 | |
182 | - Context::set('mid_list',$module_categories); |
|
182 | + Context::set('mid_list', $module_categories); |
|
183 | 183 | |
184 | 184 | //Security |
185 | 185 | $security = new Security(); |
186 | 186 | $security->encodeHTML('group_list..title'); |
187 | 187 | $security->encodeHTML('component...', 'component_name'); |
188 | - $security->encodeHTML('mid_list..title','mid_list..list..browser_title'); |
|
188 | + $security->encodeHTML('mid_list..title', 'mid_list..list..browser_title'); |
|
189 | 189 | |
190 | 190 | $this->setTemplatePath($this->module_path.'tpl'); |
191 | 191 | $this->setTemplateFile('setup_component'); |
@@ -36,8 +36,7 @@ discard block |
||
36 | 36 | Context::set('message', sprintf(Context::getLang('msg_component_is_not_founded'), $component)); |
37 | 37 | $this->setTemplatePath($this->module_path.'tpl'); |
38 | 38 | $this->setTemplateFile('component_not_founded'); |
39 | - } |
|
40 | - else |
|
39 | + } else |
|
41 | 40 | { |
42 | 41 | // Get the result after executing a method to display popup url of the component |
43 | 42 | $popup_content = $oComponent->getPopupContent(); |
@@ -82,7 +81,9 @@ discard block |
||
82 | 81 | // Get information of the current module |
83 | 82 | $current_module_info = Context::get('current_module_info'); |
84 | 83 | $current_module_srl = $current_module_info->module_srl; |
85 | - if(!$current_module_srl) return new Object(); |
|
84 | + if(!$current_module_srl) { |
|
85 | + return new Object(); |
|
86 | + } |
|
86 | 87 | } |
87 | 88 | // Get editors settings |
88 | 89 | $oEditorModel = getModel('editor'); |
@@ -172,8 +173,7 @@ discard block |
||
172 | 173 | $option_com->content_style = $config->comment_content_style; |
173 | 174 | $option_com->colorset = $config->sel_comment_editor_colorset; |
174 | 175 | $editor = $oEditorModel->getEditor(0, $option_com); |
175 | - } |
|
176 | - else |
|
176 | + } else |
|
177 | 177 | { |
178 | 178 | $option = new stdClass(); |
179 | 179 | $option->allow_fileupload = false; |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | $component = Context::get('component'); |
28 | 28 | |
29 | 29 | $site_module_info = Context::get('site_module_info'); |
30 | - $site_srl = (int)$site_module_info->site_srl; |
|
30 | + $site_srl = (int) $site_module_info->site_srl; |
|
31 | 31 | // Get compoenet object |
32 | 32 | $oEditorModel = getModel('editor'); |
33 | 33 | $oComponent = &$oEditorModel->getComponentObject($component, $editor_sequence, $site_srl); |
34 | - if(!$oComponent->toBool()) |
|
34 | + if (!$oComponent->toBool()) |
|
35 | 35 | { |
36 | 36 | Context::set('message', sprintf(Context::getLang('msg_component_is_not_founded'), $component)); |
37 | 37 | $this->setTemplatePath($this->module_path.'tpl'); |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | $component_name = Context::get('component_name'); |
59 | 59 | |
60 | 60 | $site_module_info = Context::get('site_module_info'); |
61 | - $site_srl = (int)$site_module_info->site_srl; |
|
61 | + $site_srl = (int) $site_module_info->site_srl; |
|
62 | 62 | |
63 | 63 | $oEditorModel = getModel('editor'); |
64 | 64 | $component = $oEditorModel->getComponent($component_name, $site_srl); |
65 | 65 | |
66 | - if(!$component->component_name) { |
|
66 | + if (!$component->component_name) { |
|
67 | 67 | $this->stop('msg_invalid_request'); |
68 | 68 | return; |
69 | 69 | } |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | $current_module_srl = Context::get('module_srl'); |
84 | 84 | $current_module_srls = Context::get('module_srls'); |
85 | 85 | |
86 | - if(!$current_module_srl && !$current_module_srls) |
|
86 | + if (!$current_module_srl && !$current_module_srls) |
|
87 | 87 | { |
88 | 88 | // Get information of the current module |
89 | 89 | $current_module_info = Context::get('current_module_info'); |
90 | 90 | $current_module_srl = $current_module_info->module_srl; |
91 | - if(!$current_module_srl) return new Object(); |
|
91 | + if (!$current_module_srl) return new Object(); |
|
92 | 92 | } |
93 | 93 | // Get editors settings |
94 | 94 | $oEditorModel = getModel('editor'); |
@@ -101,17 +101,17 @@ discard block |
||
101 | 101 | $editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins'); |
102 | 102 | Context::set('editor_skin_list', $editor_skin_list); |
103 | 103 | |
104 | - $skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->editor_skin); |
|
104 | + $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $editor_config->editor_skin); |
|
105 | 105 | Context::set('editor_colorset_list', $skin_info->colorset); |
106 | - $skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->comment_editor_skin); |
|
106 | + $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $editor_config->comment_editor_skin); |
|
107 | 107 | Context::set('editor_comment_colorset_list', $skin_info->colorset); |
108 | 108 | |
109 | 109 | $contents = FileHandler::readDir(_XE_PATH_.'modules/editor/styles'); |
110 | 110 | $content_style_list = array(); |
111 | - for($i=0,$c=count($contents);$i<$c;$i++) |
|
111 | + for ($i = 0, $c = count($contents); $i < $c; $i++) |
|
112 | 112 | { |
113 | 113 | $style = $contents[$i]; |
114 | - $info = $oModuleModel->loadSkinInfo($this->module_path,$style,'styles'); |
|
114 | + $info = $oModuleModel->loadSkinInfo($this->module_path, $style, 'styles'); |
|
115 | 115 | $content_style_list[$style] = new stdClass(); |
116 | 116 | $content_style_list[$style]->title = $info->title; |
117 | 117 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | { |
149 | 149 | $skin = Context::get('skin'); |
150 | 150 | $oModuleModel = getModel('module'); |
151 | - $skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin); |
|
151 | + $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin); |
|
152 | 152 | $colorset = $skin_info->colorset; |
153 | 153 | Context::set('colorset', $colorset); |
154 | 154 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | $mode = Context::get('mode'); |
162 | 162 | |
163 | - if($mode != 'main') |
|
163 | + if ($mode != 'main') |
|
164 | 164 | { |
165 | 165 | $option_com = new stdClass(); |
166 | 166 | $option_com->allow_fileupload = false; |
@@ -64,16 +64,13 @@ discard block |
||
64 | 64 | if($document_list[$target_srl]) |
65 | 65 | { |
66 | 66 | $file->upload_target_type = 'doc'; |
67 | - } |
|
68 | - else if($comment_list[$target_srl]) |
|
67 | + } else if($comment_list[$target_srl]) |
|
69 | 68 | { |
70 | 69 | $file->upload_target_type = 'com'; |
71 | - } |
|
72 | - else if($module_list[$target_srl]) |
|
70 | + } else if($module_list[$target_srl]) |
|
73 | 71 | { |
74 | 72 | $file->upload_target_type = 'mod'; |
75 | - } |
|
76 | - else |
|
73 | + } else |
|
77 | 74 | { |
78 | 75 | // document |
79 | 76 | $document = $oDocumentModel->getDocument($target_srl); |
@@ -115,15 +112,21 @@ discard block |
||
115 | 112 | // Check if data is already obtained |
116 | 113 | for($i = 0; $i < $com_srls_count; ++$i) |
117 | 114 | { |
118 | - if($comment_list[$com_srls[$i]]) delete($com_srls[$i]); |
|
115 | + if($comment_list[$com_srls[$i]]) { |
|
116 | + delete($com_srls[$i]); |
|
117 | + } |
|
119 | 118 | } |
120 | 119 | for($i = 0; $i < $doc_srls_count; ++$i) |
121 | 120 | { |
122 | - if($document_list[$doc_srls[$i]]) delete($doc_srls[$i]); |
|
121 | + if($document_list[$doc_srls[$i]]) { |
|
122 | + delete($doc_srls[$i]); |
|
123 | + } |
|
123 | 124 | } |
124 | 125 | for($i = 0; $i < $mod_srls_count; ++$i) |
125 | 126 | { |
126 | - if($module_list[$mod_srls[$i]]) delete($mod_srls[$i]); |
|
127 | + if($module_list[$mod_srls[$i]]) { |
|
128 | + delete($mod_srls[$i]); |
|
129 | + } |
|
127 | 130 | } |
128 | 131 | } |
129 | 132 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | , 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress', 'member.member_srl', 'member.nick_name', 'uploaded_filename'); |
37 | 37 | $output = $oFileAdminModel->getFileList($args, $columnList); |
38 | 38 | // Get the document for looping a list |
39 | - if($output->data) |
|
39 | + if ($output->data) |
|
40 | 40 | { |
41 | 41 | $oCommentModel = getModel('comment'); |
42 | 42 | $oDocumentModel = getModel('document'); |
@@ -45,31 +45,31 @@ discard block |
||
45 | 45 | $file_list = array(); |
46 | 46 | $document_list = array(); |
47 | 47 | $comment_list = array(); |
48 | - $module_list= array(); |
|
48 | + $module_list = array(); |
|
49 | 49 | |
50 | 50 | $doc_srls = array(); |
51 | 51 | $com_srls = array(); |
52 | - $mod_srls= array(); |
|
52 | + $mod_srls = array(); |
|
53 | 53 | |
54 | - foreach($output->data as $file) |
|
54 | + foreach ($output->data as $file) |
|
55 | 55 | { |
56 | 56 | $file_srl = $file->file_srl; |
57 | 57 | $target_srl = $file->upload_target_srl; |
58 | 58 | $file_update_args = new stdClass(); |
59 | 59 | $file_update_args->file_srl = $file_srl; |
60 | 60 | // Find and update if upload_target_type doesn't exist |
61 | - if(!$file->upload_target_type) |
|
61 | + if (!$file->upload_target_type) |
|
62 | 62 | { |
63 | 63 | // Pass if upload_target_type is already found |
64 | - if($document_list[$target_srl]) |
|
64 | + if ($document_list[$target_srl]) |
|
65 | 65 | { |
66 | 66 | $file->upload_target_type = 'doc'; |
67 | 67 | } |
68 | - else if($comment_list[$target_srl]) |
|
68 | + else if ($comment_list[$target_srl]) |
|
69 | 69 | { |
70 | 70 | $file->upload_target_type = 'com'; |
71 | 71 | } |
72 | - else if($module_list[$target_srl]) |
|
72 | + else if ($module_list[$target_srl]) |
|
73 | 73 | { |
74 | 74 | $file->upload_target_type = 'mod'; |
75 | 75 | } |
@@ -77,17 +77,17 @@ discard block |
||
77 | 77 | { |
78 | 78 | // document |
79 | 79 | $document = $oDocumentModel->getDocument($target_srl); |
80 | - if($document->isExists()) |
|
80 | + if ($document->isExists()) |
|
81 | 81 | { |
82 | 82 | $file->upload_target_type = 'doc'; |
83 | 83 | $file_update_args->upload_target_type = $file->upload_target_type; |
84 | 84 | $document_list[$target_srl] = $document; |
85 | 85 | } |
86 | 86 | // comment |
87 | - if(!$file->upload_target_type) |
|
87 | + if (!$file->upload_target_type) |
|
88 | 88 | { |
89 | 89 | $comment = $oCommentModel->getComment($target_srl); |
90 | - if($comment->isExists()) |
|
90 | + if ($comment->isExists()) |
|
91 | 91 | { |
92 | 92 | $file->upload_target_type = 'com'; |
93 | 93 | $file->target_document_srl = $comment->document_srl; |
@@ -97,39 +97,39 @@ discard block |
||
97 | 97 | } |
98 | 98 | } |
99 | 99 | // module (for a page) |
100 | - if(!$file->upload_target_type) |
|
100 | + if (!$file->upload_target_type) |
|
101 | 101 | { |
102 | 102 | $module = $oModuleModel->getModulesInfo($target_srl); |
103 | - if($module) |
|
103 | + if ($module) |
|
104 | 104 | { |
105 | 105 | $file->upload_target_type = 'mod'; |
106 | 106 | $file_update_args->upload_target_type = $file->upload_target_type; |
107 | 107 | $module_list[$module->comment_srl] = $module; |
108 | 108 | } |
109 | 109 | } |
110 | - if($file_update_args->upload_target_type) |
|
110 | + if ($file_update_args->upload_target_type) |
|
111 | 111 | { |
112 | 112 | executeQuery('file.updateFileTargetType', $file_update_args); |
113 | 113 | } |
114 | 114 | } |
115 | 115 | // Check if data is already obtained |
116 | - for($i = 0; $i < $com_srls_count; ++$i) |
|
116 | + for ($i = 0; $i < $com_srls_count; ++$i) |
|
117 | 117 | { |
118 | - if($comment_list[$com_srls[$i]]) delete($com_srls[$i]); |
|
118 | + if ($comment_list[$com_srls[$i]]) delete($com_srls[$i]); |
|
119 | 119 | } |
120 | - for($i = 0; $i < $doc_srls_count; ++$i) |
|
120 | + for ($i = 0; $i < $doc_srls_count; ++$i) |
|
121 | 121 | { |
122 | - if($document_list[$doc_srls[$i]]) delete($doc_srls[$i]); |
|
122 | + if ($document_list[$doc_srls[$i]]) delete($doc_srls[$i]); |
|
123 | 123 | } |
124 | - for($i = 0; $i < $mod_srls_count; ++$i) |
|
124 | + for ($i = 0; $i < $mod_srls_count; ++$i) |
|
125 | 125 | { |
126 | - if($module_list[$mod_srls[$i]]) delete($mod_srls[$i]); |
|
126 | + if ($module_list[$mod_srls[$i]]) delete($mod_srls[$i]); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
130 | - if($file->upload_target_type) |
|
130 | + if ($file->upload_target_type) |
|
131 | 131 | { |
132 | - if(!in_array($file->upload_target_srl, ${$file->upload_target_type.'_srls'})) |
|
132 | + if (!in_array($file->upload_target_srl, ${$file->upload_target_type.'_srls'})) |
|
133 | 133 | { |
134 | 134 | ${$file->upload_target_type.'_srls'}[] = $target_srl; |
135 | 135 | } |
@@ -144,10 +144,10 @@ discard block |
||
144 | 144 | $mod_srls = array_unique($mod_srls); |
145 | 145 | // Comment list |
146 | 146 | $com_srls_count = count($com_srls); |
147 | - if($com_srls_count) |
|
147 | + if ($com_srls_count) |
|
148 | 148 | { |
149 | 149 | $comment_output = $oCommentModel->getComments($com_srls); |
150 | - foreach($comment_output as $comment) |
|
150 | + foreach ($comment_output as $comment) |
|
151 | 151 | { |
152 | 152 | $comment_list[$comment->comment_srl] = $comment; |
153 | 153 | $doc_srls[] = $comment->document_srl; |
@@ -155,12 +155,12 @@ discard block |
||
155 | 155 | } |
156 | 156 | // Document list |
157 | 157 | $doc_srls_count = count($doc_srls); |
158 | - if($doc_srls_count) |
|
158 | + if ($doc_srls_count) |
|
159 | 159 | { |
160 | 160 | $document_output = $oDocumentModel->getDocuments($doc_srls); |
161 | - if(is_array($document_output)) |
|
161 | + if (is_array($document_output)) |
|
162 | 162 | { |
163 | - foreach($document_output as $document) |
|
163 | + foreach ($document_output as $document) |
|
164 | 164 | { |
165 | 165 | $document_list[$document->document_srl] = $document; |
166 | 166 | } |
@@ -168,22 +168,22 @@ discard block |
||
168 | 168 | } |
169 | 169 | // Module List |
170 | 170 | $mod_srls_count = count($mod_srls); |
171 | - if($mod_srls_count) |
|
171 | + if ($mod_srls_count) |
|
172 | 172 | { |
173 | 173 | $columnList = array('module_srl', 'mid', 'browser_title'); |
174 | 174 | $module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList); |
175 | - if($module_output && is_array($module_output)) |
|
175 | + if ($module_output && is_array($module_output)) |
|
176 | 176 | { |
177 | - foreach($module_output as $module) |
|
177 | + foreach ($module_output as $module) |
|
178 | 178 | { |
179 | 179 | $module_list[$module->module_srl] = $module; |
180 | 180 | } |
181 | 181 | } |
182 | 182 | } |
183 | 183 | |
184 | - foreach($file_list as $srl => $file) |
|
184 | + foreach ($file_list as $srl => $file) |
|
185 | 185 | { |
186 | - if($file->upload_target_type == 'com') |
|
186 | + if ($file->upload_target_type == 'com') |
|
187 | 187 | { |
188 | 188 | $file_list[$srl]->target_document_srl = $comment_list[$file->upload_target_srl]->document_srl; |
189 | 189 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | { |
217 | 217 | $oFileModel = getModel('file'); |
218 | 218 | $config = $oFileModel->getFileConfig(); |
219 | - Context::set('config',$config); |
|
219 | + Context::set('config', $config); |
|
220 | 220 | $iniPostMaxSize = FileHandler::returnbytes(ini_get('post_max_size')); |
221 | 221 | $iniUploadMaxSize = FileHandler::returnbytes(ini_get('upload_max_filesize')); |
222 | 222 | $iniMinSize = min($iniPostMaxSize, $iniUploadMaxSize); |
@@ -31,7 +31,9 @@ |
||
31 | 31 | // Get information of the current module |
32 | 32 | $current_module_info = Context::get('current_module_info'); |
33 | 33 | $current_module_srl = $current_module_info->module_srl; |
34 | - if(!$current_module_srl) return new Object(); |
|
34 | + if(!$current_module_srl) { |
|
35 | + return new Object(); |
|
36 | + } |
|
35 | 37 | } |
36 | 38 | // Get file configurations of the module |
37 | 39 | $oFileModel = getModel('file'); |
@@ -26,12 +26,12 @@ |
||
26 | 26 | $current_module_srl = Context::get('module_srl'); |
27 | 27 | $current_module_srls = Context::get('module_srls'); |
28 | 28 | |
29 | - if(!$current_module_srl && !$current_module_srls) |
|
29 | + if (!$current_module_srl && !$current_module_srls) |
|
30 | 30 | { |
31 | 31 | // Get information of the current module |
32 | 32 | $current_module_info = Context::get('current_module_info'); |
33 | 33 | $current_module_srl = $current_module_info->module_srl; |
34 | - if(!$current_module_srl) return new Object(); |
|
34 | + if (!$current_module_srl) return new Object(); |
|
35 | 35 | } |
36 | 36 | // Get file configurations of the module |
37 | 37 | $oFileModel = getModel('file'); |
@@ -19,12 +19,16 @@ discard block |
||
19 | 19 | // Specify the template path |
20 | 20 | $this->setTemplatePath($this->module_path.'tpl'); |
21 | 21 | // Error occurs if already installed |
22 | - if(Context::isInstalled()) return $this->stop('msg_already_installed'); |
|
22 | + if(Context::isInstalled()) { |
|
23 | + return $this->stop('msg_already_installed'); |
|
24 | + } |
|
23 | 25 | // Install a controller |
24 | 26 | $oInstallController = getController('install'); |
25 | 27 | $this->install_enable = $oInstallController->checkInstallEnv(); |
26 | 28 | // If the environment is installable, execute installController::makeDefaultDirectory() |
27 | - if($this->install_enable) $oInstallController->makeDefaultDirectory(); |
|
29 | + if($this->install_enable) { |
|
30 | + $oInstallController->makeDefaultDirectory(); |
|
31 | + } |
|
28 | 32 | } |
29 | 33 | |
30 | 34 | /** |
@@ -68,7 +72,9 @@ discard block |
||
68 | 72 | Context::set('install_config', true, true); |
69 | 73 | $oInstallController = getController('install'); |
70 | 74 | $output = $oInstallController->procInstall(); |
71 | - if (!$output->toBool()) return $output; |
|
75 | + if (!$output->toBool()) { |
|
76 | + return $output; |
|
77 | + } |
|
72 | 78 | header("location: ./"); |
73 | 79 | Context::close(); |
74 | 80 | exit; |
@@ -101,7 +107,9 @@ discard block |
||
101 | 107 | Context::set('use_rewrite', $useRewrite); |
102 | 108 | |
103 | 109 | // nginx 체크, rewrite 사용법 안내 |
104 | - if($useRewrite == 'N' && stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) Context::set('use_nginx', 'Y'); |
|
110 | + if($useRewrite == 'N' && stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) { |
|
111 | + Context::set('use_nginx', 'Y'); |
|
112 | + } |
|
105 | 113 | |
106 | 114 | $this->setTemplateFile('check_env'); |
107 | 115 | } |
@@ -112,14 +120,15 @@ discard block |
||
112 | 120 | function dispInstallSelectDB() |
113 | 121 | { |
114 | 122 | // Display check_env if it is not installable |
115 | - if(!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
123 | + if(!$this->install_enable) { |
|
124 | + return $this->dispInstallCheckEnv(); |
|
125 | + } |
|
116 | 126 | // Enter ftp information |
117 | 127 | if(ini_get('safe_mode') && !Context::isFTPRegisted()) |
118 | 128 | { |
119 | 129 | Context::set('progressMenu', '3'); |
120 | 130 | $this->setTemplateFile('ftp'); |
121 | - } |
|
122 | - else |
|
131 | + } else |
|
123 | 132 | { |
124 | 133 | $defaultDatabase = 'mysqli'; |
125 | 134 | $disableList = DB::getDisableList(); |
@@ -147,9 +156,13 @@ discard block |
||
147 | 156 | function dispInstallDBForm() |
148 | 157 | { |
149 | 158 | // Display check_env if not installable |
150 | - if(!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
159 | + if(!$this->install_enable) { |
|
160 | + return $this->dispInstallCheckEnv(); |
|
161 | + } |
|
151 | 162 | // Return to the start-up screen if db_type is not specified |
152 | - if(!Context::get('db_type')) return $this->dispInstallSelectDB(); |
|
163 | + if(!Context::get('db_type')) { |
|
164 | + return $this->dispInstallSelectDB(); |
|
165 | + } |
|
153 | 166 | |
154 | 167 | // Output the file, disp_db_info_form.html |
155 | 168 | $tpl_filename = sprintf('form.%s', Context::get('db_type')); |
@@ -163,9 +176,15 @@ discard block |
||
163 | 176 | // Error occured when using https protocol at "ModuleHandler::init() ' |
164 | 177 | $parsedUrl = parse_url($error_return_url); |
165 | 178 | $error_return_url = ''; |
166 | - if(isset($parsedUrl['path'])) $error_return_url .= $parsedUrl['path']; |
|
167 | - if(isset($parsedUrl['query'])) $error_return_url .= '?' . $parsedUrl['query']; |
|
168 | - if(isset($parsedUrl['fragment'])) $error_return_url .= '?' . $parsedUrl['fragment']; |
|
179 | + if(isset($parsedUrl['path'])) { |
|
180 | + $error_return_url .= $parsedUrl['path']; |
|
181 | + } |
|
182 | + if(isset($parsedUrl['query'])) { |
|
183 | + $error_return_url .= '?' . $parsedUrl['query']; |
|
184 | + } |
|
185 | + if(isset($parsedUrl['fragment'])) { |
|
186 | + $error_return_url .= '?' . $parsedUrl['fragment']; |
|
187 | + } |
|
169 | 188 | } |
170 | 189 | Context::set('error_return_url', $error_return_url); |
171 | 190 | |
@@ -178,7 +197,9 @@ discard block |
||
178 | 197 | function dispInstallConfigForm() |
179 | 198 | { |
180 | 199 | // Display check_env if not installable |
181 | - if(!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
200 | + if(!$this->install_enable) { |
|
201 | + return $this->dispInstallCheckEnv(); |
|
202 | + } |
|
182 | 203 | |
183 | 204 | include _XE_PATH_.'files/config/tmpDB.config.php'; |
184 | 205 |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | // Specify the template path |
20 | 20 | $this->setTemplatePath($this->module_path.'tpl'); |
21 | 21 | // Error occurs if already installed |
22 | - if(Context::isInstalled()) return $this->stop('msg_already_installed'); |
|
22 | + if (Context::isInstalled()) return $this->stop('msg_already_installed'); |
|
23 | 23 | // Install a controller |
24 | 24 | $oInstallController = getController('install'); |
25 | 25 | $this->install_enable = $oInstallController->checkInstallEnv(); |
26 | 26 | // If the environment is installable, execute installController::makeDefaultDirectory() |
27 | - if($this->install_enable) $oInstallController->makeDefaultDirectory(); |
|
27 | + if ($this->install_enable) $oInstallController->makeDefaultDirectory(); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | function dispInstallIntroduce() |
34 | 34 | { |
35 | 35 | $install_config_file = FileHandler::getRealPath('./config/install.config.php'); |
36 | - if(file_exists($install_config_file)) |
|
36 | + if (file_exists($install_config_file)) |
|
37 | 37 | { |
38 | 38 | /** |
39 | 39 | * If './config/install.config.php' file created and write array shown in the example below, XE installed using config file. |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | ); |
58 | 58 | */ |
59 | 59 | include $install_config_file; |
60 | - if(is_array($install_config)) |
|
60 | + if (is_array($install_config)) |
|
61 | 61 | { |
62 | - foreach($install_config as $k => $v) |
|
62 | + foreach ($install_config as $k => $v) |
|
63 | 63 | { |
64 | 64 | $v = ($k == 'db_table_prefix') ? $v.'_' : $v; |
65 | - Context::set($k,$v,true); |
|
65 | + Context::set($k, $v, true); |
|
66 | 66 | } |
67 | 67 | unset($GLOBALS['__DB__']); |
68 | 68 | Context::set('install_config', true, true); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | Context::set('use_rewrite', $useRewrite); |
102 | 102 | |
103 | 103 | // nginx 체크, rewrite 사용법 안내 |
104 | - if($useRewrite == 'N' && stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) Context::set('use_nginx', 'Y'); |
|
104 | + if ($useRewrite == 'N' && stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) Context::set('use_nginx', 'Y'); |
|
105 | 105 | |
106 | 106 | $this->setTemplateFile('check_env'); |
107 | 107 | } |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | function dispInstallSelectDB() |
113 | 113 | { |
114 | 114 | // Display check_env if it is not installable |
115 | - if(!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
115 | + if (!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
116 | 116 | // Enter ftp information |
117 | - if(ini_get('safe_mode') && !Context::isFTPRegisted()) |
|
117 | + if (ini_get('safe_mode') && !Context::isFTPRegisted()) |
|
118 | 118 | { |
119 | 119 | Context::set('progressMenu', '3'); |
120 | 120 | $this->setTemplateFile('ftp'); |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | { |
124 | 124 | $defaultDatabase = 'mysqli'; |
125 | 125 | $disableList = DB::getDisableList(); |
126 | - if(is_array($disableList)) |
|
126 | + if (is_array($disableList)) |
|
127 | 127 | { |
128 | - foreach($disableList AS $key=>$value) |
|
128 | + foreach ($disableList AS $key=>$value) |
|
129 | 129 | { |
130 | - if($value->db_type == $defaultDatabase) |
|
130 | + if ($value->db_type == $defaultDatabase) |
|
131 | 131 | { |
132 | 132 | $defaultDatabase = 'mysql'; |
133 | 133 | break; |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | function dispInstallDBForm() |
148 | 148 | { |
149 | 149 | // Display check_env if not installable |
150 | - if(!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
150 | + if (!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
151 | 151 | // Return to the start-up screen if db_type is not specified |
152 | - if(!Context::get('db_type')) return $this->dispInstallSelectDB(); |
|
152 | + if (!Context::get('db_type')) return $this->dispInstallSelectDB(); |
|
153 | 153 | |
154 | 154 | // Output the file, disp_db_info_form.html |
155 | 155 | $tpl_filename = sprintf('form.%s', Context::get('db_type')); |
@@ -158,14 +158,14 @@ discard block |
||
158 | 158 | Context::set('title', $title); |
159 | 159 | |
160 | 160 | $error_return_url = getNotEncodedUrl('', 'act', Context::get('act'), 'db_type', Context::get('db_type')); |
161 | - if($_SERVER['HTTPS'] == 'on') |
|
161 | + if ($_SERVER['HTTPS'] == 'on') |
|
162 | 162 | { |
163 | 163 | // Error occured when using https protocol at "ModuleHandler::init() ' |
164 | 164 | $parsedUrl = parse_url($error_return_url); |
165 | 165 | $error_return_url = ''; |
166 | - if(isset($parsedUrl['path'])) $error_return_url .= $parsedUrl['path']; |
|
167 | - if(isset($parsedUrl['query'])) $error_return_url .= '?' . $parsedUrl['query']; |
|
168 | - if(isset($parsedUrl['fragment'])) $error_return_url .= '?' . $parsedUrl['fragment']; |
|
166 | + if (isset($parsedUrl['path'])) $error_return_url .= $parsedUrl['path']; |
|
167 | + if (isset($parsedUrl['query'])) $error_return_url .= '?'.$parsedUrl['query']; |
|
168 | + if (isset($parsedUrl['fragment'])) $error_return_url .= '?'.$parsedUrl['fragment']; |
|
169 | 169 | } |
170 | 170 | Context::set('error_return_url', $error_return_url); |
171 | 171 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | function dispInstallConfigForm() |
179 | 179 | { |
180 | 180 | // Display check_env if not installable |
181 | - if(!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
181 | + if (!$this->install_enable) return $this->dispInstallCheckEnv(); |
|
182 | 182 | |
183 | 183 | include _XE_PATH_.'files/config/tmpDB.config.php'; |
184 | 184 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | function useRewriteModule() |
192 | 192 | { |
193 | - if(function_exists('apache_get_modules') && in_array('mod_rewrite',apache_get_modules())) |
|
193 | + if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) |
|
194 | 194 | { |
195 | 195 | return true; |
196 | 196 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | function dispInstallManagerForm() |
210 | 210 | { |
211 | 211 | // Display check_env if not installable |
212 | - if(!$this->install_enable) |
|
212 | + if (!$this->install_enable) |
|
213 | 213 | { |
214 | 214 | return $this->dispInstallCheckEnv(); |
215 | 215 | } |
@@ -140,8 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | Context::set('is_shortcut', $item['is_shortcut'], TRUE); |
142 | 142 | Context::set('shortcut_target', $item['shortcut_target'], TRUE); |
143 | - } |
|
144 | - else |
|
143 | + } else |
|
145 | 144 | { |
146 | 145 | Context::set('is_shortcut', 'N', TRUE); |
147 | 146 | Context::set('shortcut_target', null, TRUE); |
@@ -155,7 +154,9 @@ discard block |
||
155 | 154 | $menu_srl = $oMenuAdminController->get('menu_item_srl'); |
156 | 155 | $item['menu_srl'] = $menu_srl; |
157 | 156 | |
158 | - if($item['list']) __makeMenu($item['list'], $menu_srl); |
|
157 | + if($item['list']) { |
|
158 | + __makeMenu($item['list'], $menu_srl); |
|
159 | + } |
|
159 | 160 | } |
160 | 161 | } |
161 | 162 | |
@@ -191,12 +192,16 @@ discard block |
||
191 | 192 | |
192 | 193 | $oLayoutAdminController = getAdminController('layout'); |
193 | 194 | $output = $oLayoutAdminController->insertLayout($args); |
194 | -if(!$output->toBool()) return $output; |
|
195 | +if(!$output->toBool()) { |
|
196 | + return $output; |
|
197 | +} |
|
195 | 198 | |
196 | 199 | // update Layout (PC) |
197 | 200 | $args->extra_vars = serialize($extra_vars); |
198 | 201 | $output = $oLayoutAdminController->updateLayout($args); |
199 | -if(!$output->toBool()) return $output; |
|
202 | +if(!$output->toBool()) { |
|
203 | + return $output; |
|
204 | +} |
|
200 | 205 | |
201 | 206 | //create mobile layout |
202 | 207 | $mlayout_srl = $args->layout_srl = getNextSequence(); |
@@ -206,12 +211,16 @@ discard block |
||
206 | 211 | $extra_vars->main_menu = $sitemap['GNB']['menu_srl']; |
207 | 212 | |
208 | 213 | $output = $oLayoutAdminController->insertLayout($args); |
209 | -if(!$output->toBool()) return $output; |
|
214 | +if(!$output->toBool()) { |
|
215 | + return $output; |
|
216 | +} |
|
210 | 217 | |
211 | 218 | // update mobile Layout |
212 | 219 | $args->extra_vars = serialize($extra_vars); |
213 | 220 | $output = $oLayoutAdminController->updateLayout($args); |
214 | -if(!$output->toBool()) return $output; |
|
221 | +if(!$output->toBool()) { |
|
222 | + return $output; |
|
223 | +} |
|
215 | 224 | |
216 | 225 | |
217 | 226 | $siteDesignPath = _XE_PATH_.'files/site_design/'; |
@@ -274,14 +283,18 @@ discard block |
||
274 | 283 | $obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/welcome_content', 'welcome_content_'.$lang); |
275 | 284 | |
276 | 285 | $output = $oDocumentController->insertDocument($obj, true); |
277 | -if(!$output->toBool()) return $output; |
|
286 | +if(!$output->toBool()) { |
|
287 | + return $output; |
|
288 | +} |
|
278 | 289 | |
279 | 290 | $document_srl = $output->get('document_srl'); |
280 | 291 | |
281 | 292 | unset($obj->document_srl); |
282 | 293 | $obj->title = 'Welcome mobile XE'; |
283 | 294 | $output = $oDocumentController->insertDocument($obj, true); |
284 | -if(!$output->toBool()) return $output; |
|
295 | +if(!$output->toBool()) { |
|
296 | + return $output; |
|
297 | +} |
|
285 | 298 | |
286 | 299 | // save PageWidget |
287 | 300 | $oModuleController = getController('module'); /* @var $oModuleController moduleController */ |
@@ -290,7 +303,9 @@ discard block |
||
290 | 303 | $module_info->content = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$document_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" />'; |
291 | 304 | $module_info->mcontent = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$mdocument_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" />'; |
292 | 305 | $output = $oModuleController->updateModule($module_info); |
293 | -if(!$output->toBool()) return $output; |
|
306 | +if(!$output->toBool()) { |
|
307 | + return $output; |
|
308 | +} |
|
294 | 309 | |
295 | 310 | // insertFirstModule |
296 | 311 | $site_args = new stdClass(); |
@@ -311,7 +326,9 @@ discard block |
||
311 | 326 | $obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/xeicon_content', 'xeicon_content_ko_' . $i); |
312 | 327 | |
313 | 328 | $output = $oDocumentController->insertDocument($obj, true); |
314 | - if(!$output->toBool()) return $output; |
|
329 | + if(!$output->toBool()) { |
|
330 | + return $output; |
|
331 | + } |
|
315 | 332 | |
316 | 333 | $xeicon_document_srl[$i] = $output->get('document_srl'); |
317 | 334 | } |
@@ -321,7 +338,9 @@ discard block |
||
321 | 338 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($xeicon_module_srl); |
322 | 339 | $module_info->content = '<div widget="widgetBox" style="float:left;width:100%;" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" css_class="XEicon" ><div><div><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[1].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[2].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[3].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[4].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /></div></div></div>'; |
323 | 340 | $output = $oModuleController->updateModule($module_info); |
324 | -if(!$output->toBool()) return $output; |
|
341 | +if(!$output->toBool()) { |
|
342 | + return $output; |
|
343 | +} |
|
325 | 344 | |
326 | 345 | |
327 | 346 | // create menu cache |
@@ -130,13 +130,13 @@ discard block |
||
130 | 130 | function __makeMenu(&$list, $parent_srl) |
131 | 131 | { |
132 | 132 | $oMenuAdminController = getAdminController('menu'); |
133 | - foreach($list as $idx => &$item) |
|
133 | + foreach ($list as $idx => &$item) |
|
134 | 134 | { |
135 | 135 | Context::set('parent_srl', $parent_srl, TRUE); |
136 | 136 | Context::set('menu_name', $item['menu_name'], TRUE); |
137 | 137 | Context::set('module_type', $item['module_type'], TRUE); |
138 | 138 | Context::set('module_id', $item['module_id'], TRUE); |
139 | - if($item['is_shortcut'] === 'Y') |
|
139 | + if ($item['is_shortcut'] === 'Y') |
|
140 | 140 | { |
141 | 141 | Context::set('is_shortcut', $item['is_shortcut'], TRUE); |
142 | 142 | Context::set('shortcut_target', $item['shortcut_target'], TRUE); |
@@ -148,23 +148,23 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | $output = $oMenuAdminController->procMenuAdminInsertItem(); |
151 | - if($output instanceof Object && !$output->toBool()) |
|
151 | + if ($output instanceof Object && !$output->toBool()) |
|
152 | 152 | { |
153 | 153 | return $output; |
154 | 154 | } |
155 | 155 | $menu_srl = $oMenuAdminController->get('menu_item_srl'); |
156 | 156 | $item['menu_srl'] = $menu_srl; |
157 | 157 | |
158 | - if($item['list']) __makeMenu($item['list'], $menu_srl); |
|
158 | + if ($item['list']) __makeMenu($item['list'], $menu_srl); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
162 | 162 | |
163 | 163 | // 사이트맵 생성 |
164 | -foreach($sitemap as $id => &$val) |
|
164 | +foreach ($sitemap as $id => &$val) |
|
165 | 165 | { |
166 | 166 | $output = $oMenuAdminController->addMenu($val['title']); |
167 | - if(!$output->toBool()) |
|
167 | + if (!$output->toBool()) |
|
168 | 168 | { |
169 | 169 | return $output; |
170 | 170 | } |
@@ -191,12 +191,12 @@ discard block |
||
191 | 191 | |
192 | 192 | $oLayoutAdminController = getAdminController('layout'); |
193 | 193 | $output = $oLayoutAdminController->insertLayout($args); |
194 | -if(!$output->toBool()) return $output; |
|
194 | +if (!$output->toBool()) return $output; |
|
195 | 195 | |
196 | 196 | // update Layout (PC) |
197 | 197 | $args->extra_vars = serialize($extra_vars); |
198 | 198 | $output = $oLayoutAdminController->updateLayout($args); |
199 | -if(!$output->toBool()) return $output; |
|
199 | +if (!$output->toBool()) return $output; |
|
200 | 200 | |
201 | 201 | //create mobile layout |
202 | 202 | $mlayout_srl = $args->layout_srl = getNextSequence(); |
@@ -206,12 +206,12 @@ discard block |
||
206 | 206 | $extra_vars->main_menu = $sitemap['GNB']['menu_srl']; |
207 | 207 | |
208 | 208 | $output = $oLayoutAdminController->insertLayout($args); |
209 | -if(!$output->toBool()) return $output; |
|
209 | +if (!$output->toBool()) return $output; |
|
210 | 210 | |
211 | 211 | // update mobile Layout |
212 | 212 | $args->extra_vars = serialize($extra_vars); |
213 | 213 | $output = $oLayoutAdminController->updateLayout($args); |
214 | -if(!$output->toBool()) return $output; |
|
214 | +if (!$output->toBool()) return $output; |
|
215 | 215 | |
216 | 216 | |
217 | 217 | $siteDesignPath = _XE_PATH_.'files/site_design/'; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | |
225 | 225 | $moduleList = array('page', 'board', 'editor'); |
226 | 226 | $moutput = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList); |
227 | -if($moutput->toBool()) |
|
227 | +if ($moutput->toBool()) |
|
228 | 228 | { |
229 | 229 | $moduleList = array_unique($moduleList); |
230 | 230 | } |
@@ -234,10 +234,10 @@ discard block |
||
234 | 234 | $designInfo->module = new stdClass(); |
235 | 235 | |
236 | 236 | $oModuleModel = getModel('module'); /* @var $oModuleModel moduleModel */ |
237 | -foreach($skinTypes as $key => $dir) |
|
237 | +foreach ($skinTypes as $key => $dir) |
|
238 | 238 | { |
239 | 239 | $skinType = $key == 'skin' ? 'P' : 'M'; |
240 | - foreach($moduleList as $moduleName) |
|
240 | + foreach ($moduleList as $moduleName) |
|
241 | 241 | { |
242 | 242 | $designInfo->module->{$moduleName} = new stdClass(); |
243 | 243 | $designInfo->module->{$moduleName}->{$key} = $oModuleModel->getModuleDefaultSkin($moduleName, $skinType, 0, false); |
@@ -271,17 +271,17 @@ discard block |
||
271 | 271 | Context::set('version', __XE_VERSION__); |
272 | 272 | $obj->title = 'Welcome XE'; |
273 | 273 | |
274 | -$obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/welcome_content', 'welcome_content_'.$lang); |
|
274 | +$obj->content = $oTemplateHandler->compile(_XE_PATH_.'modules/install/script/welcome_content', 'welcome_content_'.$lang); |
|
275 | 275 | |
276 | 276 | $output = $oDocumentController->insertDocument($obj, true); |
277 | -if(!$output->toBool()) return $output; |
|
277 | +if (!$output->toBool()) return $output; |
|
278 | 278 | |
279 | 279 | $document_srl = $output->get('document_srl'); |
280 | 280 | |
281 | 281 | unset($obj->document_srl); |
282 | 282 | $obj->title = 'Welcome mobile XE'; |
283 | 283 | $output = $oDocumentController->insertDocument($obj, true); |
284 | -if(!$output->toBool()) return $output; |
|
284 | +if (!$output->toBool()) return $output; |
|
285 | 285 | |
286 | 286 | // save PageWidget |
287 | 287 | $oModuleController = getController('module'); /* @var $oModuleController moduleController */ |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $module_info->content = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$document_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" />'; |
291 | 291 | $module_info->mcontent = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$mdocument_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" />'; |
292 | 292 | $output = $oModuleController->updateModule($module_info); |
293 | -if(!$output->toBool()) return $output; |
|
293 | +if (!$output->toBool()) return $output; |
|
294 | 294 | |
295 | 295 | // insertFirstModule |
296 | 296 | $site_args = new stdClass(); |
@@ -304,14 +304,14 @@ discard block |
||
304 | 304 | $xeicon_module_srl = $moduleInfo->module_srl; |
305 | 305 | |
306 | 306 | $xeicon_document_srl = array(); |
307 | -for($i = 1; $i <=4; $i++) |
|
307 | +for ($i = 1; $i <= 4; $i++) |
|
308 | 308 | { |
309 | 309 | unset($obj->document_srl); |
310 | 310 | $obj->title = "XEIcon ({$i})"; |
311 | - $obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/xeicon_content', 'xeicon_content_ko_' . $i); |
|
311 | + $obj->content = $oTemplateHandler->compile(_XE_PATH_.'modules/install/script/xeicon_content', 'xeicon_content_ko_'.$i); |
|
312 | 312 | |
313 | 313 | $output = $oDocumentController->insertDocument($obj, true); |
314 | - if(!$output->toBool()) return $output; |
|
314 | + if (!$output->toBool()) return $output; |
|
315 | 315 | |
316 | 316 | $xeicon_document_srl[$i] = $output->get('document_srl'); |
317 | 317 | } |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($xeicon_module_srl); |
322 | 322 | $module_info->content = '<div widget="widgetBox" style="float:left;width:100%;" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" css_class="XEicon" ><div><div><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[1].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[2].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[3].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[4].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /></div></div></div>'; |
323 | 323 | $output = $oModuleController->updateModule($module_info); |
324 | -if(!$output->toBool()) return $output; |
|
324 | +if (!$output->toBool()) return $output; |
|
325 | 325 | |
326 | 326 | |
327 | 327 | // create menu cache |
@@ -31,7 +31,9 @@ discard block |
||
31 | 31 | $args->skin = Context::get('skin'); |
32 | 32 | $args->target = Context::get('target'); |
33 | 33 | $args->target_module_srl = Context::get('target_module_srl'); |
34 | - if(!$args->target_module_srl) $args->target_module_srl = ''; |
|
34 | + if(!$args->target_module_srl) { |
|
35 | + $args->target_module_srl = ''; |
|
36 | + } |
|
35 | 37 | $args->skin_vars = $config->skin_vars; |
36 | 38 | |
37 | 39 | $oModuleController = getController('module'); |
@@ -67,7 +69,9 @@ discard block |
||
67 | 69 | { |
68 | 70 | foreach($skin_info->extra_vars as $vars) |
69 | 71 | { |
70 | - if($vars->type!='image') continue; |
|
72 | + if($vars->type!='image') { |
|
73 | + continue; |
|
74 | + } |
|
71 | 75 | |
72 | 76 | $image_obj = $obj->{$vars->name}; |
73 | 77 | // Get a variable on a request to delete |
@@ -99,7 +103,9 @@ discard block |
||
99 | 103 | // Upload the file to a path |
100 | 104 | $path = sprintf("./files/attach/images/%s/", $module_srl); |
101 | 105 | // Create a directory |
102 | - if(!FileHandler::makeDir($path)) return false; |
|
106 | + if(!FileHandler::makeDir($path)) { |
|
107 | + return false; |
|
108 | + } |
|
103 | 109 | |
104 | 110 | $filename = $path.$image_obj['name']; |
105 | 111 | // Move the file |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | $args->skin = Context::get('skin'); |
32 | 32 | $args->target = Context::get('target'); |
33 | 33 | $args->target_module_srl = Context::get('target_module_srl'); |
34 | - if(!$args->target_module_srl) $args->target_module_srl = ''; |
|
34 | + if (!$args->target_module_srl) $args->target_module_srl = ''; |
|
35 | 35 | $args->skin_vars = $config->skin_vars; |
36 | 36 | |
37 | 37 | $oModuleController = getController('module'); |
38 | - $output = $oModuleController->insertModuleConfig('integration_search',$args); |
|
38 | + $output = $oModuleController->insertModuleConfig('integration_search', $args); |
|
39 | 39 | |
40 | 40 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminContent'); |
41 | 41 | return $this->setRedirectUrl($returnUrl, $output); |
@@ -63,35 +63,35 @@ discard block |
||
63 | 63 | unset($obj->module_srl); |
64 | 64 | unset($obj->page); |
65 | 65 | // Separately handle if the extra_vars is an image type in the original skin_info |
66 | - if($skin_info->extra_vars) |
|
66 | + if ($skin_info->extra_vars) |
|
67 | 67 | { |
68 | - foreach($skin_info->extra_vars as $vars) |
|
68 | + foreach ($skin_info->extra_vars as $vars) |
|
69 | 69 | { |
70 | - if($vars->type!='image') continue; |
|
70 | + if ($vars->type != 'image') continue; |
|
71 | 71 | |
72 | 72 | $image_obj = $obj->{$vars->name}; |
73 | 73 | // Get a variable on a request to delete |
74 | 74 | $del_var = $obj->{"del_".$vars->name}; |
75 | 75 | unset($obj->{"del_".$vars->name}); |
76 | - if($del_var == 'Y') |
|
76 | + if ($del_var == 'Y') |
|
77 | 77 | { |
78 | 78 | FileHandler::removeFile($module_info->{$vars->name}); |
79 | 79 | continue; |
80 | 80 | } |
81 | 81 | // Use the previous data if not uploaded |
82 | - if(!$image_obj['tmp_name']) |
|
82 | + if (!$image_obj['tmp_name']) |
|
83 | 83 | { |
84 | 84 | $obj->{$vars->name} = $module_info->{$vars->name}; |
85 | 85 | continue; |
86 | 86 | } |
87 | 87 | // Ignore if the file is not successfully uploaded, and check uploaded file |
88 | - if(!is_uploaded_file($image_obj['tmp_name']) || !checkUploadedFile($image_obj['tmp_name'])) |
|
88 | + if (!is_uploaded_file($image_obj['tmp_name']) || !checkUploadedFile($image_obj['tmp_name'])) |
|
89 | 89 | { |
90 | 90 | unset($obj->{$vars->name}); |
91 | 91 | continue; |
92 | 92 | } |
93 | 93 | // Ignore if the file is not an image |
94 | - if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) |
|
94 | + if (!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) |
|
95 | 95 | { |
96 | 96 | unset($obj->{$vars->name}); |
97 | 97 | continue; |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | // Upload the file to a path |
100 | 100 | $path = sprintf("./files/attach/images/%s/", $module_srl); |
101 | 101 | // Create a directory |
102 | - if(!FileHandler::makeDir($path)) return false; |
|
102 | + if (!FileHandler::makeDir($path)) return false; |
|
103 | 103 | |
104 | 104 | $filename = $path.$image_obj['name']; |
105 | 105 | // Move the file |
106 | - if(!move_uploaded_file($image_obj['tmp_name'], $filename)) |
|
106 | + if (!move_uploaded_file($image_obj['tmp_name'], $filename)) |
|
107 | 107 | { |
108 | 108 | unset($obj->{$vars->name}); |
109 | 109 | continue; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $args->skin_vars = serialize($obj); |
118 | 118 | |
119 | 119 | $oModuleController = getController('module'); |
120 | - $output = $oModuleController->insertModuleConfig('integration_search',$args); |
|
120 | + $output = $oModuleController->insertModuleConfig('integration_search', $args); |
|
121 | 121 | |
122 | 122 | $this->setMessage('success_updated', 'info'); |
123 | 123 |
@@ -86,7 +86,9 @@ |
||
86 | 86 | $name = $val->name; |
87 | 87 | $type = $val->type; |
88 | 88 | $value = $skin_vars->{$name}; |
89 | - if($type=="checkbox"&&!$value) $value = array(); |
|
89 | + if($type=="checkbox"&&!$value) { |
|
90 | + $value = array(); |
|
91 | + } |
|
90 | 92 | $skin_info->extra_vars[$key]->value= $value; |
91 | 93 | } |
92 | 94 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | // Get configurations (using module model object) |
25 | 25 | $oModuleModel = getModel('module'); |
26 | 26 | $this->config = $oModuleModel->getModuleConfig('integration_search'); |
27 | - Context::set('config',$this->config); |
|
27 | + Context::set('config', $this->config); |
|
28 | 28 | |
29 | 29 | $this->setTemplatePath($this->module_path."/tpl/"); |
30 | 30 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | // Get a list of skins(themes) |
40 | 40 | $oModuleModel = getModel('module'); |
41 | 41 | $skin_list = $oModuleModel->getSkins($this->module_path); |
42 | - Context::set('skin_list',$skin_list); |
|
42 | + Context::set('skin_list', $skin_list); |
|
43 | 43 | // Get a list of module categories |
44 | 44 | $module_categories = $oModuleModel->getModuleCategories(); |
45 | 45 | // Generated mid Wanted list |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $security->encodeHTML('skin_list..title'); |
64 | 64 | |
65 | 65 | // Sample Code |
66 | - Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>', ENT_COMPAT | ENT_HTML401, 'UTF-8', false) ); |
|
66 | + Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>', ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
|
67 | 67 | |
68 | 68 | $this->setTemplateFile("index"); |
69 | 69 | } |
@@ -79,15 +79,15 @@ discard block |
||
79 | 79 | $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->config->skin); |
80 | 80 | $skin_vars = unserialize($this->config->skin_vars); |
81 | 81 | // value for skin_info extra_vars |
82 | - if(count($skin_info->extra_vars)) |
|
82 | + if (count($skin_info->extra_vars)) |
|
83 | 83 | { |
84 | - foreach($skin_info->extra_vars as $key => $val) |
|
84 | + foreach ($skin_info->extra_vars as $key => $val) |
|
85 | 85 | { |
86 | 86 | $name = $val->name; |
87 | 87 | $type = $val->type; |
88 | 88 | $value = $skin_vars->{$name}; |
89 | - if($type=="checkbox"&&!$value) $value = array(); |
|
90 | - $skin_info->extra_vars[$key]->value= $value; |
|
89 | + if ($type == "checkbox" && !$value) $value = array(); |
|
90 | + $skin_info->extra_vars[$key]->value = $value; |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | Context::set('skin_info', $skin_info); |