@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | { |
71 | 71 | return $this->_is_string; |
72 | 72 | $str_pos = strpos($this->value, '('); |
73 | - if($str_pos === false) |
|
73 | + if ($str_pos === false) |
|
74 | 74 | { |
75 | 75 | return TRUE; |
76 | 76 | } |
@@ -99,31 +99,31 @@ discard block |
||
99 | 99 | |
100 | 100 | function _setValue() |
101 | 101 | { |
102 | - if(!isset($this->value)) |
|
102 | + if (!isset($this->value)) |
|
103 | 103 | { |
104 | 104 | return; |
105 | 105 | } |
106 | 106 | |
107 | 107 | // If value contains comma separated values and does not contain paranthesis |
108 | 108 | // -> default value is an array |
109 | - if(strpos($this->value, ',') !== FALSE && strpos($this->value, '(') === FALSE) |
|
109 | + if (strpos($this->value, ',') !== FALSE && strpos($this->value, '(') === FALSE) |
|
110 | 110 | { |
111 | 111 | return sprintf('array(%s)', $this->value); |
112 | 112 | } |
113 | 113 | |
114 | 114 | $str_pos = strpos($this->value, '('); |
115 | 115 | // // TODO Replace this with parseExpression |
116 | - if($str_pos === FALSE) |
|
116 | + if ($str_pos === FALSE) |
|
117 | 117 | { |
118 | 118 | $this->_is_string = TRUE; |
119 | - return '\'' . $this->value . '\''; |
|
119 | + return '\''.$this->value.'\''; |
|
120 | 120 | } |
121 | 121 | //if($str_pos===false) return $this->value; |
122 | 122 | |
123 | 123 | $func_name = substr($this->value, 0, $str_pos); |
124 | 124 | $args = substr($this->value, $str_pos + 1, -1); |
125 | 125 | |
126 | - switch($func_name) |
|
126 | + switch ($func_name) |
|
127 | 127 | { |
128 | 128 | case 'ipaddress' : |
129 | 129 | $val = '$_SERVER[\'REMOTE_ADDR\']'; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $val = sprintf('%d', $args); |
160 | 160 | break; |
161 | 161 | default : |
162 | - $val = '\'' . $this->value . '\''; |
|
162 | + $val = '\''.$this->value.'\''; |
|
163 | 163 | //$val = $this->value; |
164 | 164 | } |
165 | 165 |
@@ -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 */ |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | $args = Context::getRequestVars(); |
27 | 27 | |
28 | 28 | //if module IO config is off |
29 | - if($args->able_module == 'Y') |
|
29 | + if ($args->able_module == 'Y') |
|
30 | 30 | { |
31 | 31 | // Re-install triggers, if it was disabled. |
32 | - if($config->able_module == 'N') |
|
32 | + if ($config->able_module == 'N') |
|
33 | 33 | { |
34 | 34 | $this->moduleUpdate(); |
35 | 35 | } |
@@ -39,51 +39,51 @@ discard block |
||
39 | 39 | |
40 | 40 | // Check the point name |
41 | 41 | $config->point_name = $args->point_name; |
42 | - if(!$config->point_name) $config->point_name = 'point'; |
|
42 | + if (!$config->point_name) $config->point_name = 'point'; |
|
43 | 43 | // Specify the default points |
44 | - $config->signup_point = (int)$args->signup_point; |
|
45 | - $config->login_point = (int)$args->login_point; |
|
46 | - $config->insert_document = (int)$args->insert_document; |
|
47 | - $config->read_document = (int)$args->read_document; |
|
48 | - $config->insert_comment = (int)$args->insert_comment; |
|
49 | - $config->upload_file = (int)$args->upload_file; |
|
50 | - $config->download_file = (int)$args->download_file; |
|
51 | - $config->voted = (int)$args->voted; |
|
52 | - $config->blamed = (int)$args->blamed; |
|
44 | + $config->signup_point = (int) $args->signup_point; |
|
45 | + $config->login_point = (int) $args->login_point; |
|
46 | + $config->insert_document = (int) $args->insert_document; |
|
47 | + $config->read_document = (int) $args->read_document; |
|
48 | + $config->insert_comment = (int) $args->insert_comment; |
|
49 | + $config->upload_file = (int) $args->upload_file; |
|
50 | + $config->download_file = (int) $args->download_file; |
|
51 | + $config->voted = (int) $args->voted; |
|
52 | + $config->blamed = (int) $args->blamed; |
|
53 | 53 | // The highest level |
54 | 54 | $config->max_level = $args->max_level; |
55 | - if($config->max_level>1000) $config->max_level = 1000; |
|
56 | - if($config->max_level<1) $config->max_level = 1; |
|
55 | + if ($config->max_level > 1000) $config->max_level = 1000; |
|
56 | + if ($config->max_level < 1) $config->max_level = 1; |
|
57 | 57 | // Set the level icon |
58 | 58 | $config->level_icon = $args->level_icon; |
59 | 59 | // Check if downloads are not allowed |
60 | - if($args->disable_download == 'Y') $config->disable_download = 'Y'; |
|
60 | + if ($args->disable_download == 'Y') $config->disable_download = 'Y'; |
|
61 | 61 | else $config->disable_download = 'N'; |
62 | 62 | // Check if reading a document is not allowed |
63 | - if($args->disable_read_document == 'Y') $config->disable_read_document = 'Y'; |
|
63 | + if ($args->disable_read_document == 'Y') $config->disable_read_document = 'Y'; |
|
64 | 64 | else $config->disable_read_document = 'N'; |
65 | 65 | |
66 | 66 | $oMemberModel = getModel('member'); |
67 | 67 | $group_list = $oMemberModel->getGroups(); |
68 | 68 | |
69 | 69 | // Per-level group configurations |
70 | - foreach($group_list as $group) |
|
70 | + foreach ($group_list as $group) |
|
71 | 71 | { |
72 | 72 | // Admin group should not be connected to point. |
73 | - if($group->is_admin == 'Y' || $group->is_default == 'Y') continue; |
|
73 | + if ($group->is_admin == 'Y' || $group->is_default == 'Y') continue; |
|
74 | 74 | |
75 | 75 | $group_srl = $group->group_srl; |
76 | 76 | |
77 | - if(isset($args->{'point_group_'.$group_srl})) |
|
77 | + if (isset($args->{'point_group_'.$group_srl})) |
|
78 | 78 | { |
79 | 79 | //if group level is higher than max level, change to max level |
80 | - if($args->{'point_group_'.$group_srl} > $args->max_level) |
|
80 | + if ($args->{'point_group_'.$group_srl} > $args->max_level) |
|
81 | 81 | { |
82 | 82 | $args->{'point_group_'.$group_srl} = $args->max_level; |
83 | 83 | } |
84 | 84 | |
85 | 85 | //if group level is lower than 1, change to 1 |
86 | - if($args->{'point_group_'.$group_srl} < 1) |
|
86 | + if ($args->{'point_group_'.$group_srl} < 1) |
|
87 | 87 | { |
88 | 88 | $args->{'point_group_'.$group_srl} = 1; |
89 | 89 | } |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | $config->group_reset = $args->group_reset; |
99 | 99 | // Per-level point configurations |
100 | 100 | unset($config->level_step); |
101 | - for($i=1;$i<=$config->max_level;$i++) |
|
101 | + for ($i = 1; $i <= $config->max_level; $i++) |
|
102 | 102 | { |
103 | 103 | $key = "level_step_".$i; |
104 | - $config->level_step[$i] = (int)$args->{$key}; |
|
104 | + $config->level_step[$i] = (int) $args->{$key}; |
|
105 | 105 | } |
106 | 106 | // A function to calculate per-level points |
107 | 107 | $config->expression = $args->expression; |
@@ -133,11 +133,11 @@ discard block |
||
133 | 133 | $args = Context::getRequestVars(); |
134 | 134 | |
135 | 135 | $configTypeList = array('insert_document', 'insert_comment', 'upload_file', 'download_file', 'read_document', 'voted', 'blamed'); |
136 | - foreach($configTypeList AS $config) |
|
136 | + foreach ($configTypeList AS $config) |
|
137 | 137 | { |
138 | - if(is_array($args->{$config})) |
|
138 | + if (is_array($args->{$config})) |
|
139 | 139 | { |
140 | - foreach($args->{$config} AS $key=>$value) |
|
140 | + foreach ($args->{$config} AS $key=>$value) |
|
141 | 141 | { |
142 | 142 | $module_config[$key][$config] = $value; |
143 | 143 | } |
@@ -145,16 +145,16 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | $oModuleController = getController('module'); |
148 | - if(count($module_config)) |
|
148 | + if (count($module_config)) |
|
149 | 149 | { |
150 | - foreach($module_config as $module_srl => $config) |
|
150 | + foreach ($module_config as $module_srl => $config) |
|
151 | 151 | { |
152 | - $oModuleController->insertModulePartConfig('point',$module_srl,$config); |
|
152 | + $oModuleController->insertModulePartConfig('point', $module_srl, $config); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
156 | 156 | $this->setMessage('success_updated'); |
157 | - if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) |
|
157 | + if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) |
|
158 | 158 | { |
159 | 159 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPointAdminModuleConfig'); |
160 | 160 | header('location:'.$returnUrl); |
@@ -168,24 +168,24 @@ discard block |
||
168 | 168 | function procPointAdminInsertPointModuleConfig() |
169 | 169 | { |
170 | 170 | $module_srl = Context::get('target_module_srl'); |
171 | - if(!$module_srl) return new Object(-1, 'msg_invalid_request'); |
|
171 | + if (!$module_srl) return new Object(-1, 'msg_invalid_request'); |
|
172 | 172 | // In case of batch configuration of several modules |
173 | - if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl); |
|
173 | + if (preg_match('/^([0-9,]+)$/', $module_srl)) $module_srl = explode(',', $module_srl); |
|
174 | 174 | else $module_srl = array($module_srl); |
175 | 175 | // Save configurations |
176 | 176 | $oModuleController = getController('module'); |
177 | - for($i=0;$i<count($module_srl);$i++) |
|
177 | + for ($i = 0; $i < count($module_srl); $i++) |
|
178 | 178 | { |
179 | 179 | $srl = trim($module_srl[$i]); |
180 | - if(!$srl) continue; |
|
180 | + if (!$srl) continue; |
|
181 | 181 | unset($config); |
182 | - $config['insert_document'] = (int)Context::get('insert_document'); |
|
183 | - $config['insert_comment'] = (int)Context::get('insert_comment'); |
|
184 | - $config['upload_file'] = (int)Context::get('upload_file'); |
|
185 | - $config['download_file'] = (int)Context::get('download_file'); |
|
186 | - $config['read_document'] = (int)Context::get('read_document'); |
|
187 | - $config['voted'] = (int)Context::get('voted'); |
|
188 | - $config['blamed'] = (int)Context::get('blamed'); |
|
182 | + $config['insert_document'] = (int) Context::get('insert_document'); |
|
183 | + $config['insert_comment'] = (int) Context::get('insert_comment'); |
|
184 | + $config['upload_file'] = (int) Context::get('upload_file'); |
|
185 | + $config['download_file'] = (int) Context::get('download_file'); |
|
186 | + $config['read_document'] = (int) Context::get('read_document'); |
|
187 | + $config['voted'] = (int) Context::get('voted'); |
|
188 | + $config['blamed'] = (int) Context::get('blamed'); |
|
189 | 189 | $oModuleController->insertModulePartConfig('point', $srl, $config); |
190 | 190 | } |
191 | 191 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | preg_match('/^(\+|-)?([1-9][0-9]*)$/', $point, $m); |
208 | 208 | |
209 | 209 | $action = ''; |
210 | - switch($m[1]) |
|
210 | + switch ($m[1]) |
|
211 | 211 | { |
212 | 212 | case '+': |
213 | 213 | $action = 'add'; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $point = $m[2]; |
223 | 223 | |
224 | 224 | $oPointController = getController('point'); |
225 | - $output = $oPointController->setPoint($member_srl, (int)$point, $action); |
|
225 | + $output = $oPointController->setPoint($member_srl, (int) $point, $action); |
|
226 | 226 | |
227 | 227 | $this->setError(-1); |
228 | 228 | $this->setMessage('success_updated', 'info'); |
@@ -247,29 +247,29 @@ discard block |
||
247 | 247 | |
248 | 248 | // Get member infomation |
249 | 249 | $output = executeQueryArray('point.getMemberCount'); |
250 | - if(!$output->toBool()) return $output; |
|
250 | + if (!$output->toBool()) return $output; |
|
251 | 251 | |
252 | - if($output->data) |
|
252 | + if ($output->data) |
|
253 | 253 | { |
254 | - foreach($output->data as $key => $val) |
|
254 | + foreach ($output->data as $key => $val) |
|
255 | 255 | { |
256 | - if(!$val->member_srl) continue; |
|
256 | + if (!$val->member_srl) continue; |
|
257 | 257 | $member[$val->member_srl] = 0; |
258 | 258 | } |
259 | 259 | } |
260 | 260 | |
261 | 261 | // Get post information |
262 | 262 | $output = executeQueryArray('point.getDocumentPoint'); |
263 | - if(!$output->toBool()) return $output; |
|
263 | + if (!$output->toBool()) return $output; |
|
264 | 264 | |
265 | - if($output->data) |
|
265 | + if ($output->data) |
|
266 | 266 | { |
267 | - foreach($output->data as $key => $val) |
|
267 | + foreach ($output->data as $key => $val) |
|
268 | 268 | { |
269 | - if($module_config[$val->module_srl]['insert_document']) $insert_point = $module_config[$val->module_srl]['insert_document']; |
|
269 | + if ($module_config[$val->module_srl]['insert_document']) $insert_point = $module_config[$val->module_srl]['insert_document']; |
|
270 | 270 | else $insert_point = $config->insert_document; |
271 | 271 | |
272 | - if(!$val->member_srl) continue; |
|
272 | + if (!$val->member_srl) continue; |
|
273 | 273 | $point = $insert_point * $val->count; |
274 | 274 | $member[$val->member_srl] += $point; |
275 | 275 | } |
@@ -278,16 +278,16 @@ discard block |
||
278 | 278 | $output = null; |
279 | 279 | // Get comments information |
280 | 280 | $output = executeQueryArray('point.getCommentPoint'); |
281 | - if(!$output->toBool()) return $output; |
|
281 | + if (!$output->toBool()) return $output; |
|
282 | 282 | |
283 | - if($output->data) |
|
283 | + if ($output->data) |
|
284 | 284 | { |
285 | - foreach($output->data as $key => $val) |
|
285 | + foreach ($output->data as $key => $val) |
|
286 | 286 | { |
287 | - if($module_config[$val->module_srl]['insert_comment']) $insert_point = $module_config[$val->module_srl]['insert_comment']; |
|
287 | + if ($module_config[$val->module_srl]['insert_comment']) $insert_point = $module_config[$val->module_srl]['insert_comment']; |
|
288 | 288 | else $insert_point = $config->insert_comment; |
289 | 289 | |
290 | - if(!$val->member_srl) continue; |
|
290 | + if (!$val->member_srl) continue; |
|
291 | 291 | $point = $insert_point * $val->count; |
292 | 292 | $member[$val->member_srl] += $point; |
293 | 293 | } |
@@ -295,16 +295,16 @@ discard block |
||
295 | 295 | $output = null; |
296 | 296 | // Get the attached files' information |
297 | 297 | $output = executeQueryArray('point.getFilePoint'); |
298 | - if(!$output->toBool()) return $output; |
|
298 | + if (!$output->toBool()) return $output; |
|
299 | 299 | |
300 | - if($output->data) |
|
300 | + if ($output->data) |
|
301 | 301 | { |
302 | - foreach($output->data as $key => $val) |
|
302 | + foreach ($output->data as $key => $val) |
|
303 | 303 | { |
304 | - if($module_config[$val->module_srl]['upload_file']) $insert_point = $module_config[$val->module_srl]['upload_file']; |
|
304 | + if ($module_config[$val->module_srl]['upload_file']) $insert_point = $module_config[$val->module_srl]['upload_file']; |
|
305 | 305 | else $insert_point = $config->upload_file; |
306 | 306 | |
307 | - if(!$val->member_srl) continue; |
|
307 | + if (!$val->member_srl) continue; |
|
308 | 308 | $point = $insert_point * $val->count; |
309 | 309 | $member[$val->member_srl] += $point; |
310 | 310 | } |
@@ -312,13 +312,13 @@ discard block |
||
312 | 312 | $output = null; |
313 | 313 | // Set all members' points to 0 |
314 | 314 | $output = executeQuery("point.initMemberPoint"); |
315 | - if(!$output->toBool()) return $output; |
|
315 | + if (!$output->toBool()) return $output; |
|
316 | 316 | // Save the file temporarily |
317 | 317 | |
318 | 318 | $str = ''; |
319 | - foreach($member as $key => $val) |
|
319 | + foreach ($member as $key => $val) |
|
320 | 320 | { |
321 | - $val += (int)$config->signup_point; |
|
321 | + $val += (int) $config->signup_point; |
|
322 | 322 | $str .= $key.','.$val."\r\n"; |
323 | 323 | } |
324 | 324 | |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | $this->add('total', count($member)); |
328 | 328 | $this->add('position', 0); |
329 | - $this->setMessage( sprintf(Context::getLang('point_recal_message'), 0, $this->get('total')) ); |
|
329 | + $this->setMessage(sprintf(Context::getLang('point_recal_message'), 0, $this->get('total'))); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | /** |
@@ -334,35 +334,35 @@ discard block |
||
334 | 334 | */ |
335 | 335 | function procPointAdminApplyPoint() |
336 | 336 | { |
337 | - $position = (int)Context::get('position'); |
|
338 | - $total = (int)Context::get('total'); |
|
337 | + $position = (int) Context::get('position'); |
|
338 | + $total = (int) Context::get('total'); |
|
339 | 339 | |
340 | - if(!file_exists('./files/cache/pointRecal.txt')) return new Object(-1, 'msg_invalid_request'); |
|
340 | + if (!file_exists('./files/cache/pointRecal.txt')) return new Object(-1, 'msg_invalid_request'); |
|
341 | 341 | |
342 | 342 | $idx = 0; |
343 | - $f = fopen("./files/cache/pointRecal.txt","r"); |
|
344 | - while(!feof($f)) |
|
343 | + $f = fopen("./files/cache/pointRecal.txt", "r"); |
|
344 | + while (!feof($f)) |
|
345 | 345 | { |
346 | 346 | $str = trim(fgets($f, 1024)); |
347 | - $idx ++; |
|
348 | - if($idx > $position) |
|
347 | + $idx++; |
|
348 | + if ($idx > $position) |
|
349 | 349 | { |
350 | - list($member_srl, $point) = explode(',',$str); |
|
350 | + list($member_srl, $point) = explode(',', $str); |
|
351 | 351 | |
352 | 352 | $args = new stdClass(); |
353 | 353 | $args->member_srl = $member_srl; |
354 | 354 | $args->point = $point; |
355 | - $output = executeQuery('point.insertPoint',$args); |
|
356 | - if($idx%5000==0) break; |
|
355 | + $output = executeQuery('point.insertPoint', $args); |
|
356 | + if ($idx % 5000 == 0) break; |
|
357 | 357 | } |
358 | 358 | } |
359 | 359 | |
360 | - if(feof($f)) |
|
360 | + if (feof($f)) |
|
361 | 361 | { |
362 | 362 | FileHandler::removeFile('./files/cache/pointRecal.txt'); |
363 | 363 | $idx = $total; |
364 | 364 | |
365 | - FileHandler::rename('./files/member_extra_info/point','./files/member_extra_info/point.old'); |
|
365 | + FileHandler::rename('./files/member_extra_info/point', './files/member_extra_info/point.old'); |
|
366 | 366 | |
367 | 367 | FileHandler::removeDir('./files/member_extra_info/point.old'); |
368 | 368 | } |
@@ -380,16 +380,16 @@ discard block |
||
380 | 380 | function procPointAdminReset() |
381 | 381 | { |
382 | 382 | $module_srl = Context::get('module_srls'); |
383 | - if(!$module_srl) return new Object(-1, 'msg_invalid_request'); |
|
383 | + if (!$module_srl) return new Object(-1, 'msg_invalid_request'); |
|
384 | 384 | // In case of batch configuration of several modules |
385 | - if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl); |
|
385 | + if (preg_match('/^([0-9,]+)$/', $module_srl)) $module_srl = explode(',', $module_srl); |
|
386 | 386 | else $module_srl = array($module_srl); |
387 | 387 | // Save configurations |
388 | 388 | $oModuleController = getController('module'); |
389 | - for($i=0;$i<count($module_srl);$i++) |
|
389 | + for ($i = 0; $i < count($module_srl); $i++) |
|
390 | 390 | { |
391 | 391 | $srl = trim($module_srl[$i]); |
392 | - if(!$srl) continue; |
|
392 | + if (!$srl) continue; |
|
393 | 393 | $args = new stdClass(); |
394 | 394 | $args->module = 'point'; |
395 | 395 | $args->module_srl = $srl; |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | } |
398 | 398 | |
399 | 399 | $oCacheHandler = CacheHandler::getInstance('object', null, true); |
400 | - if($oCacheHandler->isSupport()) |
|
400 | + if ($oCacheHandler->isSupport()) |
|
401 | 401 | { |
402 | 402 | $oCacheHandler->invalidateGroupKey('site_and_module'); |
403 | 403 | } |
@@ -39,7 +39,9 @@ discard block |
||
39 | 39 | |
40 | 40 | // Check the point name |
41 | 41 | $config->point_name = $args->point_name; |
42 | - if(!$config->point_name) $config->point_name = 'point'; |
|
42 | + if(!$config->point_name) { |
|
43 | + $config->point_name = 'point'; |
|
44 | + } |
|
43 | 45 | // Specify the default points |
44 | 46 | $config->signup_point = (int)$args->signup_point; |
45 | 47 | $config->login_point = (int)$args->login_point; |
@@ -52,16 +54,26 @@ discard block |
||
52 | 54 | $config->blamed = (int)$args->blamed; |
53 | 55 | // The highest level |
54 | 56 | $config->max_level = $args->max_level; |
55 | - if($config->max_level>1000) $config->max_level = 1000; |
|
56 | - if($config->max_level<1) $config->max_level = 1; |
|
57 | + if($config->max_level>1000) { |
|
58 | + $config->max_level = 1000; |
|
59 | + } |
|
60 | + if($config->max_level<1) { |
|
61 | + $config->max_level = 1; |
|
62 | + } |
|
57 | 63 | // Set the level icon |
58 | 64 | $config->level_icon = $args->level_icon; |
59 | 65 | // Check if downloads are not allowed |
60 | - if($args->disable_download == 'Y') $config->disable_download = 'Y'; |
|
61 | - else $config->disable_download = 'N'; |
|
66 | + if($args->disable_download == 'Y') { |
|
67 | + $config->disable_download = 'Y'; |
|
68 | + } else { |
|
69 | + $config->disable_download = 'N'; |
|
70 | + } |
|
62 | 71 | // Check if reading a document is not allowed |
63 | - if($args->disable_read_document == 'Y') $config->disable_read_document = 'Y'; |
|
64 | - else $config->disable_read_document = 'N'; |
|
72 | + if($args->disable_read_document == 'Y') { |
|
73 | + $config->disable_read_document = 'Y'; |
|
74 | + } else { |
|
75 | + $config->disable_read_document = 'N'; |
|
76 | + } |
|
65 | 77 | |
66 | 78 | $oMemberModel = getModel('member'); |
67 | 79 | $group_list = $oMemberModel->getGroups(); |
@@ -71,7 +83,9 @@ discard block |
||
71 | 83 | foreach($group_list as $group) |
72 | 84 | { |
73 | 85 | // Admin group should not be connected to point. |
74 | - if($group->is_admin == 'Y' || $group->is_default == 'Y') continue; |
|
86 | + if($group->is_admin == 'Y' || $group->is_default == 'Y') { |
|
87 | + continue; |
|
88 | + } |
|
75 | 89 | |
76 | 90 | $group_srl = $group->group_srl; |
77 | 91 | |
@@ -102,8 +116,7 @@ discard block |
||
102 | 116 | } |
103 | 117 | // A function to calculate per-level points |
104 | 118 | $config->expression = $args->expression; |
105 | - } |
|
106 | - else |
|
119 | + } else |
|
107 | 120 | { |
108 | 121 | //module IO config is OFF, Other settings will not be modified. |
109 | 122 | $config->able_module = 'N'; |
@@ -165,16 +178,23 @@ discard block |
||
165 | 178 | function procPointAdminInsertPointModuleConfig() |
166 | 179 | { |
167 | 180 | $module_srl = Context::get('target_module_srl'); |
168 | - if(!$module_srl) return new Object(-1, 'msg_invalid_request'); |
|
181 | + if(!$module_srl) { |
|
182 | + return new Object(-1, 'msg_invalid_request'); |
|
183 | + } |
|
169 | 184 | // In case of batch configuration of several modules |
170 | - if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl); |
|
171 | - else $module_srl = array($module_srl); |
|
185 | + if(preg_match('/^([0-9,]+)$/',$module_srl)) { |
|
186 | + $module_srl = explode(',',$module_srl); |
|
187 | + } else { |
|
188 | + $module_srl = array($module_srl); |
|
189 | + } |
|
172 | 190 | // Save configurations |
173 | 191 | $oModuleController = getController('module'); |
174 | 192 | for($i=0;$i<count($module_srl);$i++) |
175 | 193 | { |
176 | 194 | $srl = trim($module_srl[$i]); |
177 | - if(!$srl) continue; |
|
195 | + if(!$srl) { |
|
196 | + continue; |
|
197 | + } |
|
178 | 198 | unset($config); |
179 | 199 | $config['insert_document'] = (int)Context::get('insert_document'); |
180 | 200 | $config['insert_comment'] = (int)Context::get('insert_comment'); |
@@ -244,29 +264,40 @@ discard block |
||
244 | 264 | |
245 | 265 | // Get member infomation |
246 | 266 | $output = executeQueryArray('point.getMemberCount'); |
247 | - if(!$output->toBool()) return $output; |
|
267 | + if(!$output->toBool()) { |
|
268 | + return $output; |
|
269 | + } |
|
248 | 270 | |
249 | 271 | if($output->data) |
250 | 272 | { |
251 | 273 | foreach($output->data as $key => $val) |
252 | 274 | { |
253 | - if(!$val->member_srl) continue; |
|
275 | + if(!$val->member_srl) { |
|
276 | + continue; |
|
277 | + } |
|
254 | 278 | $member[$val->member_srl] = 0; |
255 | 279 | } |
256 | 280 | } |
257 | 281 | |
258 | 282 | // Get post information |
259 | 283 | $output = executeQueryArray('point.getDocumentPoint'); |
260 | - if(!$output->toBool()) return $output; |
|
284 | + if(!$output->toBool()) { |
|
285 | + return $output; |
|
286 | + } |
|
261 | 287 | |
262 | 288 | if($output->data) |
263 | 289 | { |
264 | 290 | foreach($output->data as $key => $val) |
265 | 291 | { |
266 | - if($module_config[$val->module_srl]['insert_document']) $insert_point = $module_config[$val->module_srl]['insert_document']; |
|
267 | - else $insert_point = $config->insert_document; |
|
292 | + if($module_config[$val->module_srl]['insert_document']) { |
|
293 | + $insert_point = $module_config[$val->module_srl]['insert_document']; |
|
294 | + } else { |
|
295 | + $insert_point = $config->insert_document; |
|
296 | + } |
|
268 | 297 | |
269 | - if(!$val->member_srl) continue; |
|
298 | + if(!$val->member_srl) { |
|
299 | + continue; |
|
300 | + } |
|
270 | 301 | $point = $insert_point * $val->count; |
271 | 302 | $member[$val->member_srl] += $point; |
272 | 303 | } |
@@ -275,16 +306,23 @@ discard block |
||
275 | 306 | $output = null; |
276 | 307 | // Get comments information |
277 | 308 | $output = executeQueryArray('point.getCommentPoint'); |
278 | - if(!$output->toBool()) return $output; |
|
309 | + if(!$output->toBool()) { |
|
310 | + return $output; |
|
311 | + } |
|
279 | 312 | |
280 | 313 | if($output->data) |
281 | 314 | { |
282 | 315 | foreach($output->data as $key => $val) |
283 | 316 | { |
284 | - if($module_config[$val->module_srl]['insert_comment']) $insert_point = $module_config[$val->module_srl]['insert_comment']; |
|
285 | - else $insert_point = $config->insert_comment; |
|
317 | + if($module_config[$val->module_srl]['insert_comment']) { |
|
318 | + $insert_point = $module_config[$val->module_srl]['insert_comment']; |
|
319 | + } else { |
|
320 | + $insert_point = $config->insert_comment; |
|
321 | + } |
|
286 | 322 | |
287 | - if(!$val->member_srl) continue; |
|
323 | + if(!$val->member_srl) { |
|
324 | + continue; |
|
325 | + } |
|
288 | 326 | $point = $insert_point * $val->count; |
289 | 327 | $member[$val->member_srl] += $point; |
290 | 328 | } |
@@ -292,16 +330,23 @@ discard block |
||
292 | 330 | $output = null; |
293 | 331 | // Get the attached files' information |
294 | 332 | $output = executeQueryArray('point.getFilePoint'); |
295 | - if(!$output->toBool()) return $output; |
|
333 | + if(!$output->toBool()) { |
|
334 | + return $output; |
|
335 | + } |
|
296 | 336 | |
297 | 337 | if($output->data) |
298 | 338 | { |
299 | 339 | foreach($output->data as $key => $val) |
300 | 340 | { |
301 | - if($module_config[$val->module_srl]['upload_file']) $insert_point = $module_config[$val->module_srl]['upload_file']; |
|
302 | - else $insert_point = $config->upload_file; |
|
341 | + if($module_config[$val->module_srl]['upload_file']) { |
|
342 | + $insert_point = $module_config[$val->module_srl]['upload_file']; |
|
343 | + } else { |
|
344 | + $insert_point = $config->upload_file; |
|
345 | + } |
|
303 | 346 | |
304 | - if(!$val->member_srl) continue; |
|
347 | + if(!$val->member_srl) { |
|
348 | + continue; |
|
349 | + } |
|
305 | 350 | $point = $insert_point * $val->count; |
306 | 351 | $member[$val->member_srl] += $point; |
307 | 352 | } |
@@ -309,7 +354,9 @@ discard block |
||
309 | 354 | $output = null; |
310 | 355 | // Set all members' points to 0 |
311 | 356 | $output = executeQuery("point.initMemberPoint"); |
312 | - if(!$output->toBool()) return $output; |
|
357 | + if(!$output->toBool()) { |
|
358 | + return $output; |
|
359 | + } |
|
313 | 360 | // Save the file temporarily |
314 | 361 | |
315 | 362 | $str = ''; |
@@ -334,7 +381,9 @@ discard block |
||
334 | 381 | $position = (int)Context::get('position'); |
335 | 382 | $total = (int)Context::get('total'); |
336 | 383 | |
337 | - if(!file_exists('./files/cache/pointRecal.txt')) return new Object(-1, 'msg_invalid_request'); |
|
384 | + if(!file_exists('./files/cache/pointRecal.txt')) { |
|
385 | + return new Object(-1, 'msg_invalid_request'); |
|
386 | + } |
|
338 | 387 | |
339 | 388 | $idx = 0; |
340 | 389 | $f = fopen("./files/cache/pointRecal.txt","r"); |
@@ -350,7 +399,9 @@ discard block |
||
350 | 399 | $args->member_srl = $member_srl; |
351 | 400 | $args->point = $point; |
352 | 401 | $output = executeQuery('point.insertPoint',$args); |
353 | - if($idx%5000==0) break; |
|
402 | + if($idx%5000==0) { |
|
403 | + break; |
|
404 | + } |
|
354 | 405 | } |
355 | 406 | } |
356 | 407 | |
@@ -377,16 +428,23 @@ discard block |
||
377 | 428 | function procPointAdminReset() |
378 | 429 | { |
379 | 430 | $module_srl = Context::get('module_srls'); |
380 | - if(!$module_srl) return new Object(-1, 'msg_invalid_request'); |
|
431 | + if(!$module_srl) { |
|
432 | + return new Object(-1, 'msg_invalid_request'); |
|
433 | + } |
|
381 | 434 | // In case of batch configuration of several modules |
382 | - if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl); |
|
383 | - else $module_srl = array($module_srl); |
|
435 | + if(preg_match('/^([0-9,]+)$/',$module_srl)) { |
|
436 | + $module_srl = explode(',',$module_srl); |
|
437 | + } else { |
|
438 | + $module_srl = array($module_srl); |
|
439 | + } |
|
384 | 440 | // Save configurations |
385 | 441 | $oModuleController = getController('module'); |
386 | 442 | for($i=0;$i<count($module_srl);$i++) |
387 | 443 | { |
388 | 444 | $srl = trim($module_srl[$i]); |
389 | - if(!$srl) continue; |
|
445 | + if(!$srl) { |
|
446 | + continue; |
|
447 | + } |
|
390 | 448 | $args = new stdClass(); |
391 | 449 | $args->module = 'point'; |
392 | 450 | $args->module_srl = $srl; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | //Security |
22 | 22 | $security = new Security(); |
23 | - $security->encodeHTML('config.point_name','config.level_icon'); |
|
23 | + $security->encodeHTML('config.point_name', 'config.level_icon'); |
|
24 | 24 | $security->encodeHTML('module_info..'); |
25 | 25 | |
26 | 26 | // Set the template path |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | $oMemberModel = getModel('member'); |
40 | 40 | $group_list = $oMemberModel->getGroups(); |
41 | 41 | $selected_group_list = array(); |
42 | - if(count($group_list)) |
|
42 | + if (count($group_list)) |
|
43 | 43 | { |
44 | - foreach($group_list as $key => $val) |
|
44 | + foreach ($group_list as $key => $val) |
|
45 | 45 | { |
46 | 46 | $selected_group_list[$key] = $val; |
47 | 47 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | Context::set('group_list', $selected_group_list); |
50 | 50 | //Security |
51 | 51 | $security = new Security(); |
52 | - $security->encodeHTML('group_list..title','group_list..description'); |
|
52 | + $security->encodeHTML('group_list..title', 'group_list..description'); |
|
53 | 53 | |
54 | 54 | // Set the template |
55 | 55 | $this->setTemplateFile('config'); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | Context::set('module_config', $oModuleModel->getModulePartConfigs('point')); |
70 | 70 | //Security |
71 | 71 | $security = new Security(); |
72 | - $security->encodeHTML('mid_list..browser_title','mid_list..mid'); |
|
72 | + $security->encodeHTML('mid_list..browser_title', 'mid_list..mid'); |
|
73 | 73 | |
74 | 74 | // Set the template |
75 | 75 | $this->setTemplateFile('module_config'); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | Context::set('group_list', $this->group_list); |
116 | 116 | //Security |
117 | 117 | $security = new Security(); |
118 | - $security->encodeHTML('group_list..title','group_list..description'); |
|
118 | + $security->encodeHTML('group_list..title', 'group_list..description'); |
|
119 | 119 | $security->encodeHTML('member_list..'); |
120 | 120 | |
121 | 121 | // Set the template |
@@ -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 | } |
@@ -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'); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | //$oDB = &DB::getInstance(); |
43 | 43 | //$oModuleModel = getModel('module'); |
44 | 44 | |
45 | - return new Object(0,'success_updated'); |
|
45 | + return new Object(0, 'success_updated'); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | /* End of file trash.class.php */ |
@@ -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'); |