@@ -26,19 +26,19 @@ discard block |
||
26 | 26 | { |
27 | 27 | $this->groups = array(); |
28 | 28 | |
29 | - if($xml_groups) |
|
29 | + if ($xml_groups) |
|
30 | 30 | { |
31 | - if(!is_array($xml_groups)) |
|
31 | + if (!is_array($xml_groups)) |
|
32 | 32 | { |
33 | 33 | $xml_groups = array($xml_groups); |
34 | 34 | } |
35 | 35 | |
36 | 36 | $dbParser = &DB::getParser(); |
37 | - for($i = 0; $i < count($xml_groups); $i++) |
|
37 | + for ($i = 0; $i < count($xml_groups); $i++) |
|
38 | 38 | { |
39 | 39 | $group = $xml_groups[$i]; |
40 | 40 | $column = trim($group->attrs->column); |
41 | - if(!$column) |
|
41 | + if (!$column) |
|
42 | 42 | { |
43 | 43 | continue; |
44 | 44 | } |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | |
52 | 52 | function toString() |
53 | 53 | { |
54 | - $output = 'array(' . PHP_EOL; |
|
55 | - foreach($this->groups as $group) |
|
54 | + $output = 'array('.PHP_EOL; |
|
55 | + foreach ($this->groups as $group) |
|
56 | 56 | { |
57 | - $output .= "'" . $group . "' ,"; |
|
57 | + $output .= "'".$group."' ,"; |
|
58 | 58 | } |
59 | 59 | $output = substr($output, 0, -1); |
60 | 60 | $output .= ')'; |
@@ -16,13 +16,13 @@ |
||
16 | 16 | */ |
17 | 17 | function toString() |
18 | 18 | { |
19 | - $arg = sprintf("\n" . '${\'%s_argument\'} = new SortArgument(\'%s\', %s);' . "\n" |
|
19 | + $arg = sprintf("\n".'${\'%s_argument\'} = new SortArgument(\'%s\', %s);'."\n" |
|
20 | 20 | , $this->argument_name |
21 | 21 | , $this->argument_name |
22 | - , '$args->' . $this->variable_name); |
|
22 | + , '$args->'.$this->variable_name); |
|
23 | 23 | $arg .= $this->argument_validator->toString(); |
24 | 24 | |
25 | - $arg .= sprintf('if(!${\'%s_argument\'}->isValid()) return ${\'%s_argument\'}->getErrorMessage();' . "\n" |
|
25 | + $arg .= sprintf('if(!${\'%s_argument\'}->isValid()) return ${\'%s_argument\'}->getErrorMessage();'."\n" |
|
26 | 26 | , $this->argument_name |
27 | 27 | , $this->argument_name |
28 | 28 | ); |
@@ -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 */ |
@@ -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 */ |