@@ -7,24 +7,24 @@ discard block |
||
7 | 7 | function pointLevelIconTrans($matches) |
8 | 8 | { |
9 | 9 | $member_srl = $matches[3]; |
10 | - if($member_srl < 1) |
|
10 | + if ($member_srl < 1) |
|
11 | 11 | { |
12 | 12 | return $matches[0]; |
13 | 13 | } |
14 | 14 | |
15 | - $orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]); |
|
15 | + $orig_text = preg_replace('/'.preg_quote($matches[5], '/').'<\/'.$matches[6].'>$/', '', $matches[0]); |
|
16 | 16 | |
17 | 17 | // Check Group Image Mark |
18 | 18 | $oMemberModel = getModel('member'); |
19 | - if($oMemberModel->getGroupImageMark($member_srl)) |
|
19 | + if ($oMemberModel->getGroupImageMark($member_srl)) |
|
20 | 20 | { |
21 | - return $orig_text . $matches[5] . '</' . $matches[6] . '>'; |
|
21 | + return $orig_text.$matches[5].'</'.$matches[6].'>'; |
|
22 | 22 | } |
23 | 23 | |
24 | - if(!isset($GLOBALS['_pointLevelIcon'][$member_srl])) |
|
24 | + if (!isset($GLOBALS['_pointLevelIcon'][$member_srl])) |
|
25 | 25 | { |
26 | 26 | // Get point configuration |
27 | - if(!$GLOBALS['_pointConfig']) |
|
27 | + if (!$GLOBALS['_pointConfig']) |
|
28 | 28 | { |
29 | 29 | $oModuleModel = getModel('module'); |
30 | 30 | $GLOBALS['_pointConfig'] = $oModuleModel->getModuleConfig('point'); |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | $config = $GLOBALS['_pointConfig']; |
33 | 33 | |
34 | 34 | // Get point model |
35 | - if(!$GLOBALS['_pointModel']) |
|
35 | + if (!$GLOBALS['_pointModel']) |
|
36 | 36 | { |
37 | 37 | $GLOBALS['_pointModel'] = getModel('point'); |
38 | 38 | } |
39 | 39 | $oPointModel = &$GLOBALS['_pointModel']; |
40 | 40 | |
41 | 41 | // Get points |
42 | - if(!$oPointModel->isExistsPoint($member_srl)) |
|
42 | + if (!$oPointModel->isExistsPoint($member_srl)) |
|
43 | 43 | { |
44 | 44 | return $matches[0]; |
45 | 45 | } |
@@ -55,25 +55,25 @@ discard block |
||
55 | 55 | |
56 | 56 | // Get per to go to the next level if not a top level |
57 | 57 | $per = NULL; |
58 | - if($level < $config->max_level) |
|
58 | + if ($level < $config->max_level) |
|
59 | 59 | { |
60 | 60 | $next_point = $config->level_step[$level + 1]; |
61 | 61 | $present_point = $config->level_step[$level]; |
62 | - if($next_point > 0) |
|
62 | + if ($next_point > 0) |
|
63 | 63 | { |
64 | 64 | $per = (int) (($point - $present_point) / ($next_point - $present_point) * 100); |
65 | - $per = $per . '%'; |
|
65 | + $per = $per.'%'; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | - $title = sprintf('%s:%s%s%s, %s:%s/%s', Context::getLang('point'), $point, $config->point_name, $per ? ' (' . $per . ')' : '', Context::getLang('level'), $level, $config->max_level); |
|
69 | + $title = sprintf('%s:%s%s%s, %s:%s/%s', Context::getLang('point'), $point, $config->point_name, $per ? ' ('.$per.')' : '', Context::getLang('level'), $level, $config->max_level); |
|
70 | 70 | $alt = sprintf('[%s:%s]', Context::getLang('level'), $level); |
71 | 71 | |
72 | 72 | $GLOBALS['_pointLevelIcon'][$member_srl] = sprintf('<img src="%s" alt="%s" title="%s" class="xe_point_level_icon" style="vertical-align:middle;margin-right:3px;" />', $level_icon, $alt, $title); |
73 | 73 | } |
74 | 74 | $text = $GLOBALS['_pointLevelIcon'][$member_srl]; |
75 | 75 | |
76 | - return $orig_text . $text . $matches[5] . '</' . $matches[6] . '>'; |
|
76 | + return $orig_text.$text.$matches[5].'</'.$matches[6].'>'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /* End of file point_level_icon.lib.php */ |
@@ -63,7 +63,7 @@ |
||
63 | 63 | Context::set('group_list', $group_list); |
64 | 64 | |
65 | 65 | // specify a template |
66 | - $this->setTemplatePath($this->module_path . 'tpl'); |
|
66 | + $this->setTemplatePath($this->module_path.'tpl'); |
|
67 | 67 | $this->setTemplateFile('index'); |
68 | 68 | } |
69 | 69 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | function getCacheFilePath($type = "pc") |
27 | 27 | { |
28 | 28 | static $addon_file; |
29 | - if(isset($addon_file)) |
|
29 | + if (isset($addon_file)) |
|
30 | 30 | { |
31 | 31 | return $addon_file; |
32 | 32 | } |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | $site_module_info = Context::get('site_module_info'); |
35 | 35 | $site_srl = $site_module_info->site_srl; |
36 | 36 | |
37 | - $addon_path = _XE_PATH_ . 'files/cache/addons/'; |
|
38 | - $addon_file = $addon_path . $site_srl . $type . '.acivated_addons.cache.php'; |
|
37 | + $addon_path = _XE_PATH_.'files/cache/addons/'; |
|
38 | + $addon_file = $addon_path.$site_srl.$type.'.acivated_addons.cache.php'; |
|
39 | 39 | |
40 | - if($this->addon_file_called) |
|
40 | + if ($this->addon_file_called) |
|
41 | 41 | { |
42 | 42 | return $addon_file; |
43 | 43 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | FileHandler::makeDir($addon_path); |
48 | 48 | |
49 | - if(!file_exists($addon_file)) |
|
49 | + if (!file_exists($addon_file)) |
|
50 | 50 | { |
51 | 51 | $this->makeCacheFile($site_srl, $type); |
52 | 52 | } |
@@ -82,30 +82,30 @@ discard block |
||
82 | 82 | $buff = array('<?php if(!defined("__XE__")) exit();', '$_m = Context::get(\'mid\');'); |
83 | 83 | $oAddonModel = getAdminModel('addon'); |
84 | 84 | $addon_list = $oAddonModel->getInsertedAddons($site_srl, $gtype); |
85 | - foreach($addon_list as $addon => $val) |
|
85 | + foreach ($addon_list as $addon => $val) |
|
86 | 86 | { |
87 | - if($val->addon == "smartphone" |
|
87 | + if ($val->addon == "smartphone" |
|
88 | 88 | || ($type == "pc" && $val->is_used != 'Y') |
89 | 89 | || ($type == "mobile" && $val->is_used_m != 'Y') |
90 | 90 | || ($gtype == 'global' && $val->is_fixed != 'Y') |
91 | - || !is_dir(_XE_PATH_ . 'addons/' . $addon)) |
|
91 | + || !is_dir(_XE_PATH_.'addons/'.$addon)) |
|
92 | 92 | { |
93 | 93 | continue; |
94 | 94 | } |
95 | 95 | |
96 | 96 | $extra_vars = unserialize($val->extra_vars); |
97 | 97 | $mid_list = $extra_vars->mid_list; |
98 | - if(!is_array($mid_list) || count($mid_list) < 1) |
|
98 | + if (!is_array($mid_list) || count($mid_list) < 1) |
|
99 | 99 | { |
100 | 100 | $mid_list = NULL; |
101 | 101 | } |
102 | 102 | |
103 | 103 | $buff[] = '$before_time = microtime(true);'; |
104 | - $buff[] = '$rm = \'' . $extra_vars->xe_run_method . "';"; |
|
104 | + $buff[] = '$rm = \''.$extra_vars->xe_run_method."';"; |
|
105 | 105 | $buff[] = '$ml = array('; |
106 | - if($mid_list) |
|
106 | + if ($mid_list) |
|
107 | 107 | { |
108 | - foreach($mid_list as $mid) |
|
108 | + foreach ($mid_list as $mid) |
|
109 | 109 | { |
110 | 110 | $buff[] = "'$mid' => 1,"; |
111 | 111 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $buff[] = ');'; |
114 | 114 | $buff[] = sprintf('$addon_file = \'./addons/%s/%s.addon.php\';', $addon, $addon); |
115 | 115 | |
116 | - if($val->extra_vars) |
|
116 | + if ($val->extra_vars) |
|
117 | 117 | { |
118 | 118 | unset($extra_vars); |
119 | 119 | $extra_vars = base64_encode($val->extra_vars); |
@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | $buff[] = '$after_time = microtime(true);'; |
132 | 132 | $buff[] = '$addon_time_log = new stdClass();'; |
133 | 133 | $buff[] = '$addon_time_log->caller = $called_position;'; |
134 | - $buff[] = '$addon_time_log->called = "' . $addon . '";'; |
|
135 | - $buff[] = '$addon_time_log->called_extension = "' . $addon . '";'; |
|
134 | + $buff[] = '$addon_time_log->called = "'.$addon.'";'; |
|
135 | + $buff[] = '$addon_time_log->called_extension = "'.$addon.'";'; |
|
136 | 136 | $buff[] = 'writeSlowlog("addon",$after_time-$before_time,$addon_time_log);'; |
137 | 137 | } |
138 | - $addon_path = _XE_PATH_ . 'files/cache/addons/'; |
|
138 | + $addon_path = _XE_PATH_.'files/cache/addons/'; |
|
139 | 139 | FileHandler::makeDir($addon_path); |
140 | - $addon_file = $addon_path . ($gtype == 'site' ? $site_srl : '') . $type . '.acivated_addons.cache.php'; |
|
140 | + $addon_file = $addon_path.($gtype == 'site' ? $site_srl : '').$type.'.acivated_addons.cache.php'; |
|
141 | 141 | FileHandler::writeFile($addon_file, join(PHP_EOL, $buff)); |
142 | 142 | } |
143 | 143 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | function doSetup($addon, $extra_vars, $site_srl = 0, $gtype = 'site') |
154 | 154 | { |
155 | - if(!is_array($extra_vars->mid_list)) |
|
155 | + if (!is_array($extra_vars->mid_list)) |
|
156 | 156 | { |
157 | 157 | unset($extra_vars->mid_list); |
158 | 158 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $args = new stdClass(); |
161 | 161 | $args->addon = $addon; |
162 | 162 | $args->extra_vars = serialize($extra_vars); |
163 | - if($gtype == 'global') |
|
163 | + if ($gtype == 'global') |
|
164 | 164 | { |
165 | 165 | return executeQuery('addon.updateAddon', $args); |
166 | 166 | } |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | */ |
177 | 177 | function removeAddonConfig($site_srl) |
178 | 178 | { |
179 | - $addon_path = _XE_PATH_ . 'files/cache/addons/'; |
|
180 | - $addon_file = $addon_path . $site_srl . '.acivated_addons.cache.php'; |
|
181 | - if(file_exists($addon_file)) |
|
179 | + $addon_path = _XE_PATH_.'files/cache/addons/'; |
|
180 | + $addon_file = $addon_path.$site_srl.'.acivated_addons.cache.php'; |
|
181 | + if (file_exists($addon_file)) |
|
182 | 182 | { |
183 | 183 | FileHandler::removeFile($addon_file); |
184 | 184 | } |
@@ -145,7 +145,7 @@ |
||
145 | 145 | * Save setup |
146 | 146 | * |
147 | 147 | * @param string $addon Addon name |
148 | - * @param object $extra_vars Extra variables |
|
148 | + * @param BaseObject $extra_vars Extra variables |
|
149 | 149 | * @param int $site_srl Site srl |
150 | 150 | * @param string $gtype site or global |
151 | 151 | * @return BaseObject |
@@ -21,19 +21,19 @@ discard block |
||
21 | 21 | // Create module model object |
22 | 22 | $oModuleModel = getModel('module'); |
23 | 23 | // module_srl two come over to save the module, putting the information in advance |
24 | - if($module_srl) |
|
24 | + if ($module_srl) |
|
25 | 25 | { |
26 | 26 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl); |
27 | - if(!$module_info) |
|
27 | + if (!$module_info) |
|
28 | 28 | { |
29 | - Context::set('module_srl',''); |
|
29 | + Context::set('module_srl', ''); |
|
30 | 30 | $this->act = 'list'; |
31 | 31 | } |
32 | 32 | else |
33 | 33 | { |
34 | 34 | ModuleModel::syncModuleToSite($module_info); |
35 | 35 | $this->module_info = $module_info; |
36 | - Context::set('module_info',$module_info); |
|
36 | + Context::set('module_info', $module_info); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | // Get a list of module categories |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | $args->page_count = 10; |
60 | 60 | $args->s_module_category_srl = Context::get('module_category_srl'); |
61 | 61 | |
62 | - $search_target_list = array('s_mid','s_browser_title'); |
|
62 | + $search_target_list = array('s_mid', 's_browser_title'); |
|
63 | 63 | $search_target = Context::get('search_target'); |
64 | 64 | $search_keyword = Context::get('search_keyword'); |
65 | - if(in_array($search_target,$search_target_list) && $search_keyword) $args->{$search_target} = $search_keyword; |
|
65 | + if (in_array($search_target, $search_target_list) && $search_keyword) $args->{$search_target} = $search_keyword; |
|
66 | 66 | |
67 | 67 | $output = executeQuery('page.getPageList', $args); |
68 | 68 | $oModuleModel = getModel('module'); |
@@ -101,9 +101,9 @@ discard block |
||
101 | 101 | $module_srl = Context::get('module_srl'); |
102 | 102 | $module_info = Context::get('module_info'); |
103 | 103 | // If you do not value module_srl just showing the index page |
104 | - if(!$module_srl) return $this->dispPageAdminContent(); |
|
104 | + if (!$module_srl) return $this->dispPageAdminContent(); |
|
105 | 105 | // If the layout is destined to add layout information haejum (layout_title, layout) |
106 | - if($module_info->layout_srl) |
|
106 | + if ($module_info->layout_srl) |
|
107 | 107 | { |
108 | 108 | $oLayoutModel = getModel('layout'); |
109 | 109 | $layout_info = $oLayoutModel->getLayout($module_info->layout_srl); |
@@ -115,15 +115,15 @@ discard block |
||
115 | 115 | $layout_list = $oLayoutModel->getLayoutList(); |
116 | 116 | Context::set('layout_list', $layout_list); |
117 | 117 | |
118 | - $mobile_layout_list = $oLayoutModel->getLayoutList(0,"M"); |
|
118 | + $mobile_layout_list = $oLayoutModel->getLayoutList(0, "M"); |
|
119 | 119 | Context::set('mlayout_list', $mobile_layout_list); |
120 | 120 | // Set a template file |
121 | 121 | |
122 | - if($this->module_info->page_type == 'ARTICLE') |
|
122 | + if ($this->module_info->page_type == 'ARTICLE') |
|
123 | 123 | { |
124 | 124 | $oModuleModel = getModel('module'); |
125 | 125 | $skin_list = $oModuleModel->getSkins($this->module_path); |
126 | - Context::set('skin_list',$skin_list); |
|
126 | + Context::set('skin_list', $skin_list); |
|
127 | 127 | |
128 | 128 | $mskin_list = $oModuleModel->getSkins($this->module_path, "m.skins"); |
129 | 129 | Context::set('mskin_list', $mskin_list); |
@@ -161,23 +161,23 @@ discard block |
||
161 | 161 | |
162 | 162 | function dispPageAdminMobileContent() |
163 | 163 | { |
164 | - if($this->module_info->page_type == 'OUTSIDE') |
|
164 | + if ($this->module_info->page_type == 'OUTSIDE') |
|
165 | 165 | { |
166 | 166 | return $this->stop(-1, 'msg_invalid_request'); |
167 | 167 | } |
168 | 168 | |
169 | - if($this->module_srl) |
|
169 | + if ($this->module_srl) |
|
170 | 170 | { |
171 | - Context::set('module_srl',$this->module_srl); |
|
171 | + Context::set('module_srl', $this->module_srl); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $oPageMobile = &getMobile('page'); |
175 | 175 | $oPageMobile->module_info = $this->module_info; |
176 | 176 | $page_type_name = strtolower($this->module_info->page_type); |
177 | - $method = '_get' . ucfirst($page_type_name) . 'Content'; |
|
178 | - if(method_exists($oPageMobile, $method)) |
|
177 | + $method = '_get'.ucfirst($page_type_name).'Content'; |
|
178 | + if (method_exists($oPageMobile, $method)) |
|
179 | 179 | { |
180 | - if($method == '_getArticleContent' && $this->module_info->is_mskin_fix == 'N') |
|
180 | + if ($method == '_getArticleContent' && $this->module_info->is_mskin_fix == 'N') |
|
181 | 181 | { |
182 | 182 | $oModuleModel = getModel('module'); |
183 | 183 | $oPageMobile->module_info->mskin = $oModuleModel->getModuleDefaultSkin('page', 'M'); |
@@ -230,16 +230,16 @@ discard block |
||
230 | 230 | function _setWidgetTypeContentModify($isMobile = false) |
231 | 231 | { |
232 | 232 | // Setting contents |
233 | - if($isMobile) |
|
233 | + if ($isMobile) |
|
234 | 234 | { |
235 | 235 | $content = Context::get('mcontent'); |
236 | - if(!$content) $content = $this->module_info->mcontent; |
|
236 | + if (!$content) $content = $this->module_info->mcontent; |
|
237 | 237 | $templateFile = 'page_mobile_content_modify'; |
238 | 238 | } |
239 | 239 | else |
240 | 240 | { |
241 | 241 | $content = Context::get('content'); |
242 | - if(!$content) $content = $this->module_info->content; |
|
242 | + if (!$content) $content = $this->module_info->content; |
|
243 | 243 | $templateFile = 'page_content_modify'; |
244 | 244 | } |
245 | 245 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | |
257 | 257 | //Security |
258 | 258 | $security = new Security(); |
259 | - $security->encodeHTML('widget_list..title','module_info.mid'); |
|
259 | + $security->encodeHTML('widget_list..title', 'module_info.mid'); |
|
260 | 260 | |
261 | 261 | // Set a template file |
262 | 262 | $this->setTemplateFile($templateFile); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $oDocumentModel = getModel('document'); |
268 | 268 | $oDocument = $oDocumentModel->getDocument(0, true); |
269 | 269 | |
270 | - if($isMobile) |
|
270 | + if ($isMobile) |
|
271 | 271 | { |
272 | 272 | Context::set('isMobile', 'Y'); |
273 | 273 | $target = 'mdocument_srl'; |
@@ -278,13 +278,13 @@ discard block |
||
278 | 278 | $target = 'document_srl'; |
279 | 279 | } |
280 | 280 | |
281 | - if($this->module_info->{$target}) |
|
281 | + if ($this->module_info->{$target}) |
|
282 | 282 | { |
283 | 283 | $document_srl = $this->module_info->{$target}; |
284 | 284 | $oDocument->setDocument($document_srl); |
285 | 285 | Context::set('document_srl', $document_srl); |
286 | 286 | } |
287 | - else if(Context::get('document_srl')) |
|
287 | + else if (Context::get('document_srl')) |
|
288 | 288 | { |
289 | 289 | $document_srl = Context::get('document_srl'); |
290 | 290 | $oDocument->setDocument($document_srl); |
@@ -307,12 +307,12 @@ discard block |
||
307 | 307 | function dispPageAdminDelete() |
308 | 308 | { |
309 | 309 | $module_srl = Context::get('module_srl'); |
310 | - if(!$module_srl) return $this->dispContent(); |
|
310 | + if (!$module_srl) return $this->dispContent(); |
|
311 | 311 | |
312 | 312 | $oModuleModel = getModel('module'); |
313 | 313 | $columnList = array('module_srl', 'module', 'mid'); |
314 | 314 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList); |
315 | - Context::set('module_info',$module_info); |
|
315 | + Context::set('module_info', $module_info); |
|
316 | 316 | // Set a template file |
317 | 317 | $this->setTemplateFile('page_delete'); |
318 | 318 |
@@ -28,8 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | Context::set('module_srl',''); |
30 | 30 | $this->act = 'list'; |
31 | - } |
|
32 | - else |
|
31 | + } else |
|
33 | 32 | { |
34 | 33 | ModuleModel::syncModuleToSite($module_info); |
35 | 34 | $this->module_info = $module_info; |
@@ -62,7 +61,9 @@ discard block |
||
62 | 61 | $search_target_list = array('s_mid','s_browser_title'); |
63 | 62 | $search_target = Context::get('search_target'); |
64 | 63 | $search_keyword = Context::get('search_keyword'); |
65 | - if(in_array($search_target,$search_target_list) && $search_keyword) $args->{$search_target} = $search_keyword; |
|
64 | + if(in_array($search_target,$search_target_list) && $search_keyword) { |
|
65 | + $args->{$search_target} = $search_keyword; |
|
66 | + } |
|
66 | 67 | |
67 | 68 | $output = executeQuery('page.getPageList', $args); |
68 | 69 | $oModuleModel = getModel('module'); |
@@ -101,7 +102,9 @@ discard block |
||
101 | 102 | $module_srl = Context::get('module_srl'); |
102 | 103 | $module_info = Context::get('module_info'); |
103 | 104 | // If you do not value module_srl just showing the index page |
104 | - if(!$module_srl) return $this->dispPageAdminContent(); |
|
105 | + if(!$module_srl) { |
|
106 | + return $this->dispPageAdminContent(); |
|
107 | + } |
|
105 | 108 | // If the layout is destined to add layout information haejum (layout_title, layout) |
106 | 109 | if($module_info->layout_srl) |
107 | 110 | { |
@@ -183,8 +186,7 @@ discard block |
||
183 | 186 | $oPageMobile->module_info->mskin = $oModuleModel->getModuleDefaultSkin('page', 'M'); |
184 | 187 | } |
185 | 188 | $page_content = $oPageMobile->{$method}(); |
186 | - } |
|
187 | - else |
|
189 | + } else |
|
188 | 190 | { |
189 | 191 | return new BaseObject(-1, sprintf('%s method is not exists', $method)); |
190 | 192 | } |
@@ -202,8 +204,7 @@ discard block |
||
202 | 204 | if ($this->module_info->page_type == 'WIDGET') |
203 | 205 | { |
204 | 206 | $this->_setWidgetTypeContentModify(true); |
205 | - } |
|
206 | - else if ($this->module_info->page_type == 'ARTICLE') |
|
207 | + } else if ($this->module_info->page_type == 'ARTICLE') |
|
207 | 208 | { |
208 | 209 | $this->_setArticleTypeContentModify(true); |
209 | 210 | } |
@@ -220,8 +221,7 @@ discard block |
||
220 | 221 | if ($this->module_info->page_type == 'WIDGET') |
221 | 222 | { |
222 | 223 | $this->_setWidgetTypeContentModify(); |
223 | - } |
|
224 | - else if ($this->module_info->page_type == 'ARTICLE') |
|
224 | + } else if ($this->module_info->page_type == 'ARTICLE') |
|
225 | 225 | { |
226 | 226 | $this->_setArticleTypeContentModify(); |
227 | 227 | } |
@@ -233,13 +233,16 @@ discard block |
||
233 | 233 | if($isMobile) |
234 | 234 | { |
235 | 235 | $content = Context::get('mcontent'); |
236 | - if(!$content) $content = $this->module_info->mcontent; |
|
236 | + if(!$content) { |
|
237 | + $content = $this->module_info->mcontent; |
|
238 | + } |
|
237 | 239 | $templateFile = 'page_mobile_content_modify'; |
238 | - } |
|
239 | - else |
|
240 | + } else |
|
240 | 241 | { |
241 | 242 | $content = Context::get('content'); |
242 | - if(!$content) $content = $this->module_info->content; |
|
243 | + if(!$content) { |
|
244 | + $content = $this->module_info->content; |
|
245 | + } |
|
243 | 246 | $templateFile = 'page_content_modify'; |
244 | 247 | } |
245 | 248 | |
@@ -271,8 +274,7 @@ discard block |
||
271 | 274 | { |
272 | 275 | Context::set('isMobile', 'Y'); |
273 | 276 | $target = 'mdocument_srl'; |
274 | - } |
|
275 | - else |
|
277 | + } else |
|
276 | 278 | { |
277 | 279 | Context::set('isMobile', 'N'); |
278 | 280 | $target = 'document_srl'; |
@@ -283,14 +285,12 @@ discard block |
||
283 | 285 | $document_srl = $this->module_info->{$target}; |
284 | 286 | $oDocument->setDocument($document_srl); |
285 | 287 | Context::set('document_srl', $document_srl); |
286 | - } |
|
287 | - else if(Context::get('document_srl')) |
|
288 | + } else if(Context::get('document_srl')) |
|
288 | 289 | { |
289 | 290 | $document_srl = Context::get('document_srl'); |
290 | 291 | $oDocument->setDocument($document_srl); |
291 | 292 | Context::set('document_srl', $document_srl); |
292 | - } |
|
293 | - else |
|
293 | + } else |
|
294 | 294 | { |
295 | 295 | $oDocument->add('module_srl', $this->module_info->module_srl); |
296 | 296 | } |
@@ -307,7 +307,9 @@ discard block |
||
307 | 307 | function dispPageAdminDelete() |
308 | 308 | { |
309 | 309 | $module_srl = Context::get('module_srl'); |
310 | - if(!$module_srl) return $this->dispContent(); |
|
310 | + if(!$module_srl) { |
|
311 | + return $this->dispContent(); |
|
312 | + } |
|
311 | 313 | |
312 | 314 | $oModuleModel = getModel('module'); |
313 | 315 | $columnList = array('module_srl', 'module', 'mid'); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $this->setTemplatePath($this->module_path.'tpl'); |
29 | 29 | |
30 | 30 | $source_type = Context::get('source_type'); |
31 | - switch($source_type) |
|
31 | + switch ($source_type) |
|
32 | 32 | { |
33 | 33 | case 'member' : |
34 | 34 | $template_filename = "member"; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | function dispImporterAdminImportForm() |
69 | 69 | { |
70 | - $oDocumentModel = getModel('document'); //for document lang use in this page |
|
70 | + $oDocumentModel = getModel('document'); //for document lang use in this page |
|
71 | 71 | |
72 | 72 | $this->setTemplatePath($this->module_path.'tpl'); |
73 | 73 | $this->setTemplateFile('index'); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | // Get configurations (using module model object) |
60 | 60 | $oModuleModel = getModel('module'); |
61 | 61 | $config = $oModuleModel->getModuleConfig('spamfilter'); |
62 | - Context::set('config',$config); |
|
62 | + Context::set('config', $config); |
|
63 | 63 | |
64 | 64 | $this->setTemplateFile('config_block'); |
65 | 65 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | // Get configurations (using module model object) |
32 | 32 | $config = $oModuleModel->getModuleConfig('message'); |
33 | - Context::set('config',$config); |
|
33 | + Context::set('config', $config); |
|
34 | 34 | |
35 | 35 | // Set a template file |
36 | 36 | $this->setTemplatePath($this->module_path.'tpl'); |
@@ -19,11 +19,11 @@ |
||
19 | 19 | { |
20 | 20 | $event = $subject->getLastEvent(); |
21 | 21 | |
22 | - switch($event['name']) |
|
22 | + switch ($event['name']) |
|
23 | 23 | { |
24 | 24 | case 'receivedHeaders': |
25 | 25 | $this->fp = @fopen($this->filename, 'wb'); |
26 | - if(!$this->fp) |
|
26 | + if (!$this->fp) |
|
27 | 27 | { |
28 | 28 | throw new Exception("Cannot open target file '{$filename}'"); |
29 | 29 | } |
@@ -8,12 +8,12 @@ discard block |
||
8 | 8 | { |
9 | 9 | // If member_srl < 0, then return text only in the body |
10 | 10 | $member_srl = $matches[3]; |
11 | - if($member_srl < 0) |
|
11 | + if ($member_srl < 0) |
|
12 | 12 | { |
13 | 13 | return $matches[5]; |
14 | 14 | } |
15 | 15 | // If member_srl=o(not a member), return the entire body |
16 | - if(!$member_srl) |
|
16 | + if (!$member_srl) |
|
17 | 17 | { |
18 | 18 | return $matches[0]; |
19 | 19 | } |
@@ -22,22 +22,22 @@ discard block |
||
22 | 22 | $nick_name = $matches[5]; |
23 | 23 | |
24 | 24 | // Initialize global variable for cache |
25 | - if(!isset($GLOBALS['_transImageNameList'][$member_srl])) |
|
25 | + if (!isset($GLOBALS['_transImageNameList'][$member_srl])) |
|
26 | 26 | { |
27 | 27 | $GLOBALS['_transImageNameList'][$member_srl] = new stdClass(); |
28 | 28 | } |
29 | 29 | $_tmp = &$GLOBALS['_transImageNameList'][$member_srl]; |
30 | 30 | |
31 | 31 | // If pre-defined data in the global variables, return it |
32 | - if(!$_tmp->cached) |
|
32 | + if (!$_tmp->cached) |
|
33 | 33 | { |
34 | 34 | $_tmp->cached = true; |
35 | 35 | $image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl); |
36 | 36 | $image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl); |
37 | 37 | |
38 | - if(file_exists(_XE_PATH_ . $image_name_file)) |
|
38 | + if (file_exists(_XE_PATH_.$image_name_file)) |
|
39 | 39 | { |
40 | - $_tmp->image_name_file = $image_name_file . '?' . date('YmdHis', filemtime(_XE_PATH_ . $image_name_file)); |
|
40 | + $_tmp->image_name_file = $image_name_file.'?'.date('YmdHis', filemtime(_XE_PATH_.$image_name_file)); |
|
41 | 41 | $image_name_file = $_tmp->image_name_file; |
42 | 42 | } |
43 | 43 | else |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | $image_name_file = ''; |
46 | 46 | } |
47 | 47 | |
48 | - if(file_exists(_XE_PATH_ . $image_mark_file)) |
|
48 | + if (file_exists(_XE_PATH_.$image_mark_file)) |
|
49 | 49 | { |
50 | - $_tmp->image_mark_file = $image_mark_file . '?' . date('YmdHis', filemtime(_XE_PATH_ . $image_mark_file)); |
|
50 | + $_tmp->image_mark_file = $image_mark_file.'?'.date('YmdHis', filemtime(_XE_PATH_.$image_mark_file)); |
|
51 | 51 | $image_mark_file = $_tmp->image_mark_file; |
52 | 52 | } |
53 | 53 | else |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | // If image name and mark doesn't exist, set the original information |
70 | - if(!$image_name_file && !$image_mark_file && !$group_image) |
|
70 | + if (!$image_name_file && !$image_mark_file && !$group_image) |
|
71 | 71 | { |
72 | 72 | return $matches[0]; |
73 | 73 | } |
@@ -76,21 +76,21 @@ discard block |
||
76 | 76 | |
77 | 77 | $config = $oMemberModel->getMemberConfig(); |
78 | 78 | |
79 | - if($config->image_name == 'Y' && $image_name_file) |
|
79 | + if ($config->image_name == 'Y' && $image_name_file) |
|
80 | 80 | { |
81 | 81 | $nick_name = sprintf('<img src="%s%s" alt="id: %s" title="id: %s" style="border:0;vertical-align:middle;margin-right:3px" />', Context::getRequestUri(), $image_name_file, strip_tags($nick_name), strip_tags($nick_name)); |
82 | 82 | } |
83 | - if($config->image_mark == 'Y' && $image_mark_file) |
|
83 | + if ($config->image_mark == 'Y' && $image_mark_file) |
|
84 | 84 | { |
85 | 85 | $nick_name = sprintf('<img src="%s%s" alt="id: %s" title="id : %s" style="border:0;vertical-align:middle;margin-right:3px"/>%s', Context::getRequestUri(), $image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name); |
86 | 86 | } |
87 | 87 | |
88 | - if($group_image) |
|
88 | + if ($group_image) |
|
89 | 89 | { |
90 | 90 | $nick_name = sprintf('<img src="%s" style="border:0;max-height:16px;vertical-align:middle;margin-right:3px" alt="%s" title="%s" />%s', $group_image->src, $group_image->title, $group_image->description, $nick_name); |
91 | 91 | } |
92 | 92 | |
93 | - return preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]) . $nick_name . '</' . $matches[6] . '>'; |
|
93 | + return preg_replace('/'.preg_quote($matches[5], '/').'<\/'.$matches[6].'>$/', '', $matches[0]).$nick_name.'</'.$matches[6].'>'; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /* End of file member_extra_info.lib.php */ |
@@ -39,8 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $_tmp->image_name_file = $image_name_file . '?' . date('YmdHis', filemtime(_XE_PATH_ . $image_name_file)); |
41 | 41 | $image_name_file = $_tmp->image_name_file; |
42 | - } |
|
43 | - else |
|
42 | + } else |
|
44 | 43 | { |
45 | 44 | $image_name_file = ''; |
46 | 45 | } |
@@ -49,8 +48,7 @@ discard block |
||
49 | 48 | { |
50 | 49 | $_tmp->image_mark_file = $image_mark_file . '?' . date('YmdHis', filemtime(_XE_PATH_ . $image_mark_file)); |
51 | 50 | $image_mark_file = $_tmp->image_mark_file; |
52 | - } |
|
53 | - else |
|
51 | + } else |
|
54 | 52 | { |
55 | 53 | $image_mark_file = ''; |
56 | 54 | } |
@@ -58,8 +56,7 @@ discard block |
||
58 | 56 | $site_module_info = Context::get('site_module_info'); |
59 | 57 | $group_image = $oMemberModel->getGroupImageMark($member_srl, $site_module_info->site_srl); |
60 | 58 | $_tmp->group_image = $group_image; |
61 | - } |
|
62 | - else |
|
59 | + } else |
|
63 | 60 | { |
64 | 61 | $group_image = $_tmp->group_image; |
65 | 62 | $image_name_file = $_tmp->image_name_file; |