@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | function init() |
18 | 18 | { |
19 | 19 | // set the template path |
20 | - $this->setTemplatePath($this->module_path . 'tpl'); |
|
20 | + $this->setTemplatePath($this->module_path.'tpl'); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | function dispCounterAdminIndex() |
29 | 29 | { |
30 | 30 | // set today's if no date is given |
31 | - $selected_date = (int)Context::get('selected_date'); |
|
31 | + $selected_date = (int) Context::get('selected_date'); |
|
32 | 32 | |
33 | - if(!$selected_date) |
|
33 | + if (!$selected_date) |
|
34 | 34 | { |
35 | 35 | $selected_date = date("Ymd"); |
36 | 36 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | // get data by time, day, month, and year |
51 | 51 | $type = Context::get('type'); |
52 | 52 | |
53 | - if(!$type) |
|
53 | + if (!$type) |
|
54 | 54 | { |
55 | 55 | $type = 'day'; |
56 | 56 | Context::set('type', $type); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // get a list by using comment->getCommentList. |
53 | 53 | $oCommentModel = getModel('comment'); |
54 | 54 | $secretNameList = $oCommentModel->getSecretNameList(); |
55 | - $columnList = array('comment_srl', 'document_srl','module_srl','is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count'); |
|
55 | + $columnList = array('comment_srl', 'document_srl', 'module_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count'); |
|
56 | 56 | $output = $oCommentModel->getTotalCommentList($args, $columnList); |
57 | 57 | |
58 | 58 | // $modules = $oCommentModel->getDistinctModules(); |
@@ -70,20 +70,20 @@ discard block |
||
70 | 70 | $oModuleModel = getModel('module'); |
71 | 71 | $module_list = array(); |
72 | 72 | $mod_srls = array(); |
73 | - foreach($output->data as $val) |
|
73 | + foreach ($output->data as $val) |
|
74 | 74 | { |
75 | 75 | $mod_srls[] = $val->module_srl; |
76 | 76 | } |
77 | 77 | $mod_srls = array_unique($mod_srls); |
78 | 78 | // Module List |
79 | 79 | $mod_srls_count = count($mod_srls); |
80 | - if($mod_srls_count) |
|
80 | + if ($mod_srls_count) |
|
81 | 81 | { |
82 | 82 | $columnList = array('module_srl', 'mid', 'browser_title'); |
83 | 83 | $module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList); |
84 | - if($module_output && is_array($module_output)) |
|
84 | + if ($module_output && is_array($module_output)) |
|
85 | 85 | { |
86 | - foreach($module_output as $module) |
|
86 | + foreach ($module_output as $module) |
|
87 | 87 | { |
88 | 88 | $module_list[$module->module_srl] = $module; |
89 | 89 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $security->encodeHTML('search_target', 'search_keyword'); |
96 | 96 | |
97 | 97 | // set the template |
98 | - $this->setTemplatePath($this->module_path . 'tpl'); |
|
98 | + $this->setTemplatePath($this->module_path.'tpl'); |
|
99 | 99 | $this->setTemplateFile('comment_list'); |
100 | 100 | } |
101 | 101 | |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | $declared_output = executeQuery('comment.getDeclaredList', $args); |
118 | 118 | $oCommentModel = getModel('comment'); |
119 | 119 | |
120 | - if($declared_output->data && count($declared_output->data)) |
|
120 | + if ($declared_output->data && count($declared_output->data)) |
|
121 | 121 | { |
122 | 122 | $comment_list = array(); |
123 | 123 | |
124 | - foreach($declared_output->data as $key => $comment) |
|
124 | + foreach ($declared_output->data as $key => $comment) |
|
125 | 125 | { |
126 | 126 | $comment_list[$key] = new commentItem(); |
127 | 127 | $comment_list[$key]->setAttribute($comment); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | Context::set('page_navigation', $declared_output->page_navigation); |
140 | 140 | Context::set('secret_name_list', $secretNameList); |
141 | 141 | // set the template |
142 | - $this->setTemplatePath($this->module_path . 'tpl'); |
|
142 | + $this->setTemplatePath($this->module_path.'tpl'); |
|
143 | 143 | $this->setTemplateFile('declared_list'); |
144 | 144 | } |
145 | 145 |
@@ -18,28 +18,28 @@ |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | public function getResponseCode() { |
21 | - if($this->response) |
|
21 | + if ($this->response) |
|
22 | 22 | { |
23 | 23 | return $this->response->getStatus(); |
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getResponseHeader() { |
28 | - if($this->response) |
|
28 | + if ($this->response) |
|
29 | 29 | { |
30 | 30 | return $this->response->getHeader(); |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getResponseBody() { |
35 | - if($this->response) |
|
35 | + if ($this->response) |
|
36 | 36 | { |
37 | 37 | return $this->response->getBody(); |
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | 41 | public function getResponseCookies() { |
42 | - if($this->response) |
|
42 | + if ($this->response) |
|
43 | 43 | { |
44 | 44 | return $this->response->getCookies(); |
45 | 45 | } |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | |
22 | 22 | function read($session_key) |
23 | 23 | { |
24 | - if(!$session_key || !$this->session_started) return; |
|
24 | + if (!$session_key || !$this->session_started) return; |
|
25 | 25 | |
26 | 26 | $args = new stdClass(); |
27 | 27 | $args->session_key = $session_key; |
28 | 28 | $columnList = array('session_key', 'cur_mid', 'val'); |
29 | 29 | $output = executeQuery('session.getSession', $args, $columnList); |
30 | 30 | |
31 | - if(!$output->data) |
|
31 | + if (!$output->data) |
|
32 | 32 | { |
33 | 33 | return ''; |
34 | 34 | } |
@@ -46,47 +46,47 @@ discard block |
||
46 | 46 | */ |
47 | 47 | function getLoggedMembers($args) |
48 | 48 | { |
49 | - if(!$args->site_srl) |
|
49 | + if (!$args->site_srl) |
|
50 | 50 | { |
51 | 51 | $site_module_info = Context::get('site_module_info'); |
52 | - $args->site_srl = (int)$site_module_info->site_srl; |
|
52 | + $args->site_srl = (int) $site_module_info->site_srl; |
|
53 | 53 | } |
54 | - if(!$args->list_count) $args->list_count = 20; |
|
55 | - if(!$args->page) $args->page = 1; |
|
56 | - if(!$args->period_time) $args->period_time = 3; |
|
57 | - $args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME'] - $args->period_time*60); |
|
54 | + if (!$args->list_count) $args->list_count = 20; |
|
55 | + if (!$args->page) $args->page = 1; |
|
56 | + if (!$args->period_time) $args->period_time = 3; |
|
57 | + $args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME'] - $args->period_time * 60); |
|
58 | 58 | |
59 | 59 | $output = executeQueryArray('session.getLoggedMembers', $args); |
60 | - if(!$output->toBool()) return $output; |
|
60 | + if (!$output->toBool()) return $output; |
|
61 | 61 | |
62 | 62 | $member_srls = array(); |
63 | 63 | $member_keys = array(); |
64 | - if(count($output->data)) |
|
64 | + if (count($output->data)) |
|
65 | 65 | { |
66 | - foreach($output->data as $key => $val) |
|
66 | + foreach ($output->data as $key => $val) |
|
67 | 67 | { |
68 | 68 | $member_srls[$key] = $val->member_srl; |
69 | 69 | $member_keys[$val->member_srl] = $key; |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | - if(Context::get('is_logged')) |
|
73 | + if (Context::get('is_logged')) |
|
74 | 74 | { |
75 | 75 | $logged_info = Context::get('logged_info'); |
76 | - if(!in_array($logged_info->member_srl, $member_srls)) |
|
76 | + if (!in_array($logged_info->member_srl, $member_srls)) |
|
77 | 77 | { |
78 | 78 | $member_srls[0] = $logged_info->member_srl; |
79 | 79 | $member_keys[$logged_info->member_srl] = 0; |
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | - if(!count($member_srls)) return $output; |
|
83 | + if (!count($member_srls)) return $output; |
|
84 | 84 | |
85 | - $member_args->member_srl = implode(',',$member_srls); |
|
85 | + $member_args->member_srl = implode(',', $member_srls); |
|
86 | 86 | $member_output = executeQueryArray('member.getMembers', $member_args); |
87 | - if($member_output->data) |
|
87 | + if ($member_output->data) |
|
88 | 88 | { |
89 | - foreach($member_output->data as $key => $val) |
|
89 | + foreach ($member_output->data as $key => $val) |
|
90 | 90 | { |
91 | 91 | $output->data[$member_keys[$val->member_srl]] = $val; |
92 | 92 | } |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | |
22 | 22 | function read($session_key) |
23 | 23 | { |
24 | - if(!$session_key || !$this->session_started) return; |
|
24 | + if(!$session_key || !$this->session_started) { |
|
25 | + return; |
|
26 | + } |
|
25 | 27 | |
26 | 28 | $args = new stdClass(); |
27 | 29 | $args->session_key = $session_key; |
@@ -51,13 +53,21 @@ discard block |
||
51 | 53 | $site_module_info = Context::get('site_module_info'); |
52 | 54 | $args->site_srl = (int)$site_module_info->site_srl; |
53 | 55 | } |
54 | - if(!$args->list_count) $args->list_count = 20; |
|
55 | - if(!$args->page) $args->page = 1; |
|
56 | - if(!$args->period_time) $args->period_time = 3; |
|
56 | + if(!$args->list_count) { |
|
57 | + $args->list_count = 20; |
|
58 | + } |
|
59 | + if(!$args->page) { |
|
60 | + $args->page = 1; |
|
61 | + } |
|
62 | + if(!$args->period_time) { |
|
63 | + $args->period_time = 3; |
|
64 | + } |
|
57 | 65 | $args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME'] - $args->period_time*60); |
58 | 66 | |
59 | 67 | $output = executeQueryArray('session.getLoggedMembers', $args); |
60 | - if(!$output->toBool()) return $output; |
|
68 | + if(!$output->toBool()) { |
|
69 | + return $output; |
|
70 | + } |
|
61 | 71 | |
62 | 72 | $member_srls = array(); |
63 | 73 | $member_keys = array(); |
@@ -80,7 +90,9 @@ discard block |
||
80 | 90 | } |
81 | 91 | } |
82 | 92 | |
83 | - if(!count($member_srls)) return $output; |
|
93 | + if(!count($member_srls)) { |
|
94 | + return $output; |
|
95 | + } |
|
84 | 96 | |
85 | 97 | $member_args->member_srl = implode(',',$member_srls); |
86 | 98 | $member_output = executeQueryArray('member.getMembers', $member_args); |
@@ -24,28 +24,28 @@ discard block |
||
24 | 24 | $member_srl = abs($member_srl); |
25 | 25 | |
26 | 26 | // Get from instance memory |
27 | - if($this->pointList[$member_srl]) return true; |
|
27 | + if ($this->pointList[$member_srl]) return true; |
|
28 | 28 | |
29 | 29 | // Get from file cache |
30 | - $path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl)); |
|
30 | + $path = sprintf(_XE_PATH_.'files/member_extra_info/point/%s', getNumberingPath($member_srl)); |
|
31 | 31 | $cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl); |
32 | - if(file_exists($cache_filename)) |
|
32 | + if (file_exists($cache_filename)) |
|
33 | 33 | { |
34 | - if(!$this->pointList[$member_srl]) |
|
34 | + if (!$this->pointList[$member_srl]) |
|
35 | 35 | $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename)); |
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | |
39 | - $args =new stdClass(); |
|
39 | + $args = new stdClass(); |
|
40 | 40 | $args->member_srl = $member_srl; |
41 | 41 | $output = executeQuery('point.getPoint', $args); |
42 | - if($output->data->member_srl == $member_srl) |
|
42 | + if ($output->data->member_srl == $member_srl) |
|
43 | 43 | { |
44 | - if(!$this->pointList[$member_srl]) |
|
44 | + if (!$this->pointList[$member_srl]) |
|
45 | 45 | { |
46 | - $this->pointList[$member_srl] = (int)$output->data->point; |
|
46 | + $this->pointList[$member_srl] = (int) $output->data->point; |
|
47 | 47 | FileHandler::makeDir($path); |
48 | - FileHandler::writeFile($cache_filename, (int)$output->data->point); |
|
48 | + FileHandler::writeFile($cache_filename, (int) $output->data->point); |
|
49 | 49 | } |
50 | 50 | return true; |
51 | 51 | } |
@@ -60,25 +60,25 @@ discard block |
||
60 | 60 | $member_srl = abs($member_srl); |
61 | 61 | |
62 | 62 | // Get from instance memory |
63 | - if(!$from_db && $this->pointList[$member_srl]) return $this->pointList[$member_srl]; |
|
63 | + if (!$from_db && $this->pointList[$member_srl]) return $this->pointList[$member_srl]; |
|
64 | 64 | |
65 | 65 | // Get from file cache |
66 | - $path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl)); |
|
66 | + $path = sprintf(_XE_PATH_.'files/member_extra_info/point/%s', getNumberingPath($member_srl)); |
|
67 | 67 | $cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl); |
68 | 68 | |
69 | - if(!$from_db && file_exists($cache_filename)) |
|
69 | + if (!$from_db && file_exists($cache_filename)) |
|
70 | 70 | return $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename)); |
71 | 71 | |
72 | 72 | // Get from the DB |
73 | - $args =new stdClass(); |
|
73 | + $args = new stdClass(); |
|
74 | 74 | $args->member_srl = $member_srl; |
75 | 75 | $output = executeQuery('point.getPoint', $args); |
76 | 76 | |
77 | - if(isset($output->data->member_srl)) |
|
77 | + if (isset($output->data->member_srl)) |
|
78 | 78 | { |
79 | - $point = (int)$output->data->point; |
|
79 | + $point = (int) $output->data->point; |
|
80 | 80 | $this->pointList[$member_srl] = $point; |
81 | - if(!is_dir($path)) FileHandler::makeDir($path); |
|
81 | + if (!is_dir($path)) FileHandler::makeDir($path); |
|
82 | 82 | FileHandler::writeFile($cache_filename, $point); |
83 | 83 | return $point; |
84 | 84 | } |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | function getLevel($point, $level_step) |
92 | 92 | { |
93 | 93 | $level_count = count($level_step); |
94 | - for($level=0;$level<=$level_count;$level++) if($point < $level_step[$level]) break; |
|
95 | - $level --; |
|
94 | + for ($level = 0; $level <= $level_count; $level++) if ($point < $level_step[$level]) break; |
|
95 | + $level--; |
|
96 | 96 | return $level; |
97 | 97 | } |
98 | 98 | |
@@ -103,20 +103,20 @@ discard block |
||
103 | 103 | { |
104 | 104 | $member_srls = Context::get('member_srls'); |
105 | 105 | $member_srls = array_unique(explode(',', $member_srls)); |
106 | - if(!count($member_srls)) |
|
106 | + if (!count($member_srls)) |
|
107 | 107 | { |
108 | 108 | return; |
109 | 109 | } |
110 | 110 | |
111 | 111 | $logged_info = Context::get('logged_info'); |
112 | - if(!$logged_info->member_srl) |
|
112 | + if (!$logged_info->member_srl) |
|
113 | 113 | { |
114 | 114 | return; |
115 | 115 | } |
116 | 116 | |
117 | - if(!getModel('module')->isSiteAdmin($logged_info)) |
|
117 | + if (!getModel('module')->isSiteAdmin($logged_info)) |
|
118 | 118 | { |
119 | - if(in_array($logged_info->member_srl, $member_srls)) |
|
119 | + if (in_array($logged_info->member_srl, $member_srls)) |
|
120 | 120 | { |
121 | 121 | $member_srls = array($logged_info->member_srl); |
122 | 122 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $config = $oModuleModel->getModuleConfig('point'); |
131 | 131 | |
132 | 132 | $info = array(); |
133 | - foreach($member_srls as $v) |
|
133 | + foreach ($member_srls as $v) |
|
134 | 134 | { |
135 | 135 | $obj = new stdClass; |
136 | 136 | $obj->point = $this->getPoint($v); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $info[] = $obj; |
140 | 140 | } |
141 | 141 | |
142 | - $this->add('point_info',$info); |
|
142 | + $this->add('point_info', $info); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | |
@@ -149,37 +149,37 @@ discard block |
||
149 | 149 | function getMemberList($args = null, $columnList = array()) |
150 | 150 | { |
151 | 151 | // Arrange the search options |
152 | - $args->is_admin = Context::get('is_admin')=='Y'?'Y':''; |
|
153 | - $args->is_denied = Context::get('is_denied')=='Y'?'Y':''; |
|
152 | + $args->is_admin = Context::get('is_admin') == 'Y' ? 'Y' : ''; |
|
153 | + $args->is_denied = Context::get('is_denied') == 'Y' ? 'Y' : ''; |
|
154 | 154 | $args->selected_group_srl = Context::get('selected_group_srl'); |
155 | 155 | |
156 | 156 | $search_target = trim(Context::get('search_target')); |
157 | 157 | $search_keyword = trim(Context::get('search_keyword')); |
158 | 158 | |
159 | 159 | // if search keyword is emtpy, show all list |
160 | - if(!$search_keyword) |
|
160 | + if (!$search_keyword) |
|
161 | 161 | { |
162 | 162 | unset($args->is_admin, $args->is_denied, $args->selected_group_srl, $search_target); |
163 | 163 | } |
164 | 164 | |
165 | - if($search_target && $search_keyword) |
|
165 | + if ($search_target && $search_keyword) |
|
166 | 166 | { |
167 | - switch($search_target) |
|
167 | + switch ($search_target) |
|
168 | 168 | { |
169 | 169 | case 'user_id' : |
170 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
170 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
171 | 171 | $args->s_user_id = $search_keyword; |
172 | 172 | break; |
173 | 173 | case 'user_name' : |
174 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
174 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
175 | 175 | $args->s_user_name = $search_keyword; |
176 | 176 | break; |
177 | 177 | case 'nick_name' : |
178 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
178 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
179 | 179 | $args->s_nick_name = $search_keyword; |
180 | 180 | break; |
181 | 181 | case 'email_address' : |
182 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
182 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
183 | 183 | $args->s_email_address = $search_keyword; |
184 | 184 | break; |
185 | 185 | case 'regdate' : |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | } |
195 | 195 | } |
196 | 196 | // If there is a selected_group_srl, change the "query id" (for table join) |
197 | - if($args->selected_group_srl) |
|
197 | + if ($args->selected_group_srl) |
|
198 | 198 | { |
199 | 199 | $query_id = 'point.getMemberListWithinGroup'; |
200 | 200 | } |
@@ -205,12 +205,12 @@ discard block |
||
205 | 205 | |
206 | 206 | $output = executeQuery($query_id, $args, $columnList); |
207 | 207 | |
208 | - if($output->total_count) |
|
208 | + if ($output->total_count) |
|
209 | 209 | { |
210 | 210 | $oModuleModel = getModel('module'); |
211 | 211 | $config = $oModuleModel->getModuleConfig('point'); |
212 | 212 | |
213 | - foreach($output->data as $key => $val) |
|
213 | + foreach ($output->data as $key => $val) |
|
214 | 214 | { |
215 | 215 | $output->data[$key]->level = $this->getLevel($val->point, $config->level_step); |
216 | 216 | } |
@@ -24,15 +24,18 @@ discard block |
||
24 | 24 | $member_srl = abs($member_srl); |
25 | 25 | |
26 | 26 | // Get from instance memory |
27 | - if($this->pointList[$member_srl]) return true; |
|
27 | + if($this->pointList[$member_srl]) { |
|
28 | + return true; |
|
29 | + } |
|
28 | 30 | |
29 | 31 | // Get from file cache |
30 | 32 | $path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl)); |
31 | 33 | $cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl); |
32 | 34 | if(file_exists($cache_filename)) |
33 | 35 | { |
34 | - if(!$this->pointList[$member_srl]) |
|
35 | - $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename)); |
|
36 | + if(!$this->pointList[$member_srl]) { |
|
37 | + $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename)); |
|
38 | + } |
|
36 | 39 | return true; |
37 | 40 | } |
38 | 41 | |
@@ -60,14 +63,17 @@ discard block |
||
60 | 63 | $member_srl = abs($member_srl); |
61 | 64 | |
62 | 65 | // Get from instance memory |
63 | - if(!$from_db && $this->pointList[$member_srl]) return $this->pointList[$member_srl]; |
|
66 | + if(!$from_db && $this->pointList[$member_srl]) { |
|
67 | + return $this->pointList[$member_srl]; |
|
68 | + } |
|
64 | 69 | |
65 | 70 | // Get from file cache |
66 | 71 | $path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl)); |
67 | 72 | $cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl); |
68 | 73 | |
69 | - if(!$from_db && file_exists($cache_filename)) |
|
70 | - return $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename)); |
|
74 | + if(!$from_db && file_exists($cache_filename)) { |
|
75 | + return $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename)); |
|
76 | + } |
|
71 | 77 | |
72 | 78 | // Get from the DB |
73 | 79 | $args =new stdClass(); |
@@ -78,7 +84,9 @@ discard block |
||
78 | 84 | { |
79 | 85 | $point = (int)$output->data->point; |
80 | 86 | $this->pointList[$member_srl] = $point; |
81 | - if(!is_dir($path)) FileHandler::makeDir($path); |
|
87 | + if(!is_dir($path)) { |
|
88 | + FileHandler::makeDir($path); |
|
89 | + } |
|
82 | 90 | FileHandler::writeFile($cache_filename, $point); |
83 | 91 | return $point; |
84 | 92 | } |
@@ -91,7 +99,9 @@ discard block |
||
91 | 99 | function getLevel($point, $level_step) |
92 | 100 | { |
93 | 101 | $level_count = count($level_step); |
94 | - for($level=0;$level<=$level_count;$level++) if($point < $level_step[$level]) break; |
|
102 | + for($level=0;$level<=$level_count;$level++) { |
|
103 | + if($point < $level_step[$level]) break; |
|
104 | + } |
|
95 | 105 | $level --; |
96 | 106 | return $level; |
97 | 107 | } |
@@ -119,8 +129,7 @@ discard block |
||
119 | 129 | if(in_array($logged_info->member_srl, $member_srls)) |
120 | 130 | { |
121 | 131 | $member_srls = array($logged_info->member_srl); |
122 | - } |
|
123 | - else |
|
132 | + } else |
|
124 | 133 | { |
125 | 134 | return; |
126 | 135 | } |
@@ -167,19 +176,27 @@ discard block |
||
167 | 176 | switch($search_target) |
168 | 177 | { |
169 | 178 | case 'user_id' : |
170 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
179 | + if($search_keyword) { |
|
180 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
181 | + } |
|
171 | 182 | $args->s_user_id = $search_keyword; |
172 | 183 | break; |
173 | 184 | case 'user_name' : |
174 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
185 | + if($search_keyword) { |
|
186 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
187 | + } |
|
175 | 188 | $args->s_user_name = $search_keyword; |
176 | 189 | break; |
177 | 190 | case 'nick_name' : |
178 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
191 | + if($search_keyword) { |
|
192 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
193 | + } |
|
179 | 194 | $args->s_nick_name = $search_keyword; |
180 | 195 | break; |
181 | 196 | case 'email_address' : |
182 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
197 | + if($search_keyword) { |
|
198 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
199 | + } |
|
183 | 200 | $args->s_email_address = $search_keyword; |
184 | 201 | break; |
185 | 202 | case 'regdate' : |
@@ -197,8 +214,7 @@ discard block |
||
197 | 214 | if($args->selected_group_srl) |
198 | 215 | { |
199 | 216 | $query_id = 'point.getMemberListWithinGroup'; |
200 | - } |
|
201 | - else |
|
217 | + } else |
|
202 | 218 | { |
203 | 219 | $query_id = 'point.getMemberList'; |
204 | 220 | } |
@@ -31,25 +31,25 @@ |
||
31 | 31 | */ |
32 | 32 | function _makeXmlDoc($obj) |
33 | 33 | { |
34 | - if(!count($obj)) |
|
34 | + if (!count($obj)) |
|
35 | 35 | { |
36 | 36 | return; |
37 | 37 | } |
38 | 38 | |
39 | 39 | $xmlDoc = ''; |
40 | 40 | |
41 | - foreach($obj as $key => $val) |
|
41 | + foreach ($obj as $key => $val) |
|
42 | 42 | { |
43 | - if(is_numeric($key)) |
|
43 | + if (is_numeric($key)) |
|
44 | 44 | { |
45 | 45 | $key = 'item'; |
46 | 46 | } |
47 | 47 | |
48 | - if(is_string($val)) |
|
48 | + if (is_string($val)) |
|
49 | 49 | { |
50 | 50 | $xmlDoc .= sprintf('<%s>%s</%s>%s', $key, htmlspecialchars($val, ENT_COMPAT, 'UTF-8', true), $key, "\n"); |
51 | 51 | } |
52 | - else if(!is_array($val) && !is_object($val)) |
|
52 | + else if (!is_array($val) && !is_object($val)) |
|
53 | 53 | { |
54 | 54 | $xmlDoc .= sprintf('<%s>%s</%s>%s', $key, $val, $key, "\n"); |
55 | 55 | } |
@@ -48,12 +48,10 @@ |
||
48 | 48 | if(is_string($val)) |
49 | 49 | { |
50 | 50 | $xmlDoc .= sprintf('<%s>%s</%s>%s', $key, htmlspecialchars($val, ENT_COMPAT, 'UTF-8', true), $key, "\n"); |
51 | - } |
|
52 | - else if(!is_array($val) && !is_object($val)) |
|
51 | + } else if(!is_array($val) && !is_object($val)) |
|
53 | 52 | { |
54 | 53 | $xmlDoc .= sprintf('<%s>%s</%s>%s', $key, $val, $key, "\n"); |
55 | - } |
|
56 | - else |
|
54 | + } else |
|
57 | 55 | { |
58 | 56 | $xmlDoc .= sprintf('<%s>%s%s</%s>%s', $key, "\n", $this->_makeXmlDoc($val), $key, "\n"); |
59 | 57 | } |
@@ -17,35 +17,35 @@ |
||
17 | 17 | $request_url = Context::getRequestUri(); |
18 | 18 | $output = new stdClass(); |
19 | 19 | |
20 | - if(substr_compare($request_url, '/', -1) !== 0) |
|
20 | + if (substr_compare($request_url, '/', -1) !== 0) |
|
21 | 21 | { |
22 | 22 | $request_url .= '/'; |
23 | 23 | } |
24 | 24 | |
25 | - if($error === 0) |
|
25 | + if ($error === 0) |
|
26 | 26 | { |
27 | - if($message != 'success') $output->message = $message; |
|
27 | + if ($message != 'success') $output->message = $message; |
|
28 | 28 | |
29 | 29 | $output->url = ($redirect_url) ? $redirect_url : $request_uri; |
30 | 30 | } |
31 | 31 | else |
32 | 32 | { |
33 | - if($message != 'fail') $output->message = $message; |
|
33 | + if ($message != 'fail') $output->message = $message; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | $html = array(); |
37 | 37 | $html[] = '<!DOCTYPE html><html><head><title>Moved...</title><meta charset="utf-8" /><script>'; |
38 | 38 | |
39 | - if($output->message) |
|
39 | + if ($output->message) |
|
40 | 40 | { |
41 | - $html[] = 'alert(' . json_encode($output->message, JSON_UNESCAPED_SLASHES) . ');'; |
|
41 | + $html[] = 'alert('.json_encode($output->message, JSON_UNESCAPED_SLASHES).');'; |
|
42 | 42 | } |
43 | 43 | |
44 | - if($output->url) |
|
44 | + if ($output->url) |
|
45 | 45 | { |
46 | 46 | $url = json_encode(preg_replace('/#(.+)$/i', '', $output->url), JSON_UNESCAPED_SLASHES); |
47 | 47 | $html[] = 'var win = (window.opener) ? window.opener : window.parent;'; |
48 | - $html[] = 'win.location.href = ' . $url; |
|
48 | + $html[] = 'win.location.href = '.$url; |
|
49 | 49 | $html[] = 'if(window.opener) self.close();'; |
50 | 50 | } |
51 | 51 |
@@ -24,13 +24,16 @@ |
||
24 | 24 | |
25 | 25 | if($error === 0) |
26 | 26 | { |
27 | - if($message != 'success') $output->message = $message; |
|
27 | + if($message != 'success') { |
|
28 | + $output->message = $message; |
|
29 | + } |
|
28 | 30 | |
29 | 31 | $output->url = ($redirect_url) ? $redirect_url : $request_uri; |
30 | - } |
|
31 | - else |
|
32 | + } else |
|
32 | 33 | { |
33 | - if($message != 'fail') $output->message = $message; |
|
34 | + if($message != 'fail') { |
|
35 | + $output->message = $message; |
|
36 | + } |
|
34 | 37 | } |
35 | 38 | |
36 | 39 | $html = array(); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | function &getInstance() |
24 | 24 | { |
25 | 25 | static $theInstance; |
26 | - if(!isset($theInstance)) |
|
26 | + if (!isset($theInstance)) |
|
27 | 27 | { |
28 | 28 | $theInstance = new Mobile(); |
29 | 29 | } |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | */ |
49 | 49 | function _isFromMobilePhone() |
50 | 50 | { |
51 | - if($this->ismobile !== NULL) |
|
51 | + if ($this->ismobile !== NULL) |
|
52 | 52 | { |
53 | 53 | return $this->ismobile; |
54 | 54 | } |
55 | - if(Mobile::isMobileEnabled() === false || Context::get('full_browse') || $_COOKIE["FullBrowse"]) |
|
55 | + if (Mobile::isMobileEnabled() === false || Context::get('full_browse') || $_COOKIE["FullBrowse"]) |
|
56 | 56 | { |
57 | 57 | return ($this->ismobile = false); |
58 | 58 | } |
@@ -63,22 +63,22 @@ discard block |
||
63 | 63 | $this->ismobile = FALSE; |
64 | 64 | |
65 | 65 | $m = Context::get('m'); |
66 | - if(strlen($m) == 1) |
|
66 | + if (strlen($m) == 1) |
|
67 | 67 | { |
68 | - if($m == "1") |
|
68 | + if ($m == "1") |
|
69 | 69 | { |
70 | 70 | $this->ismobile = TRUE; |
71 | 71 | } |
72 | - elseif($m == "0") |
|
72 | + elseif ($m == "0") |
|
73 | 73 | { |
74 | 74 | $this->ismobile = FALSE; |
75 | 75 | } |
76 | 76 | } |
77 | - elseif(isset($_COOKIE['mobile'])) |
|
77 | + elseif (isset($_COOKIE['mobile'])) |
|
78 | 78 | { |
79 | - if($_COOKIE['user-agent'] == md5($_SERVER['HTTP_USER_AGENT'])) |
|
79 | + if ($_COOKIE['user-agent'] == md5($_SERVER['HTTP_USER_AGENT'])) |
|
80 | 80 | { |
81 | - if($_COOKIE['mobile'] == 'true') |
|
81 | + if ($_COOKIE['mobile'] == 'true') |
|
82 | 82 | { |
83 | 83 | $this->ismobile = TRUE; |
84 | 84 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->ismobile = FALSE; |
93 | 93 | setcookie("mobile", FALSE); |
94 | 94 | setcookie("user-agent", FALSE); |
95 | - if(!$this->isMobilePadCheckByAgent() && $this->isMobileCheckByAgent()) |
|
95 | + if (!$this->isMobilePadCheckByAgent() && $this->isMobileCheckByAgent()) |
|
96 | 96 | { |
97 | 97 | $this->ismobile = TRUE; |
98 | 98 | } |
@@ -100,36 +100,36 @@ discard block |
||
100 | 100 | } |
101 | 101 | else |
102 | 102 | { |
103 | - if($this->isMobilePadCheckByAgent()) |
|
103 | + if ($this->isMobilePadCheckByAgent()) |
|
104 | 104 | { |
105 | 105 | $this->ismobile = FALSE; |
106 | 106 | } |
107 | 107 | else |
108 | 108 | { |
109 | - if($this->isMobileCheckByAgent()) |
|
109 | + if ($this->isMobileCheckByAgent()) |
|
110 | 110 | { |
111 | 111 | $this->ismobile = TRUE; |
112 | 112 | } |
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
116 | - if($this->ismobile !== NULL) |
|
116 | + if ($this->ismobile !== NULL) |
|
117 | 117 | { |
118 | - if($this->ismobile == TRUE) |
|
118 | + if ($this->ismobile == TRUE) |
|
119 | 119 | { |
120 | - if($_COOKIE['mobile'] != 'true') |
|
120 | + if ($_COOKIE['mobile'] != 'true') |
|
121 | 121 | { |
122 | 122 | $_COOKIE['mobile'] = 'true'; |
123 | 123 | setcookie("mobile", 'true'); |
124 | 124 | } |
125 | 125 | } |
126 | - elseif($_COOKIE['mobile'] != 'false') |
|
126 | + elseif ($_COOKIE['mobile'] != 'false') |
|
127 | 127 | { |
128 | 128 | $_COOKIE['mobile'] = 'false'; |
129 | 129 | setcookie("mobile", 'false'); |
130 | 130 | } |
131 | 131 | |
132 | - if($_COOKIE['user-agent'] != md5($_SERVER['HTTP_USER_AGENT'])) |
|
132 | + if ($_COOKIE['user-agent'] != md5($_SERVER['HTTP_USER_AGENT'])) |
|
133 | 133 | { |
134 | 134 | setcookie("user-agent", md5($_SERVER['HTTP_USER_AGENT'])); |
135 | 135 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | function isMobileCheckByAgent() |
147 | 147 | { |
148 | 148 | static $UACheck; |
149 | - if(isset($UACheck)) |
|
149 | + if (isset($UACheck)) |
|
150 | 150 | { |
151 | 151 | return $UACheck; |
152 | 152 | } |
@@ -154,15 +154,15 @@ discard block |
||
154 | 154 | $oMobile = Mobile::getInstance(); |
155 | 155 | $mobileAgent = array('iPod', 'iPhone', 'Android', 'BlackBerry', 'SymbianOS', 'Bada', 'Tizen', 'Kindle', 'Wii', 'SCH-', 'SPH-', 'CANU-', 'Windows Phone', 'Windows CE', 'POLARIS', 'Palm', 'Dorothy Browser', 'Mobile', 'Opera Mobi', 'Opera Mini', 'Minimo', 'AvantGo', 'NetFront', 'Nokia', 'LGPlayer', 'SonyEricsson', 'HTC'); |
156 | 156 | |
157 | - if($oMobile->isMobilePadCheckByAgent()) |
|
157 | + if ($oMobile->isMobilePadCheckByAgent()) |
|
158 | 158 | { |
159 | 159 | $UACheck = TRUE; |
160 | 160 | return TRUE; |
161 | 161 | } |
162 | 162 | |
163 | - foreach($mobileAgent as $agent) |
|
163 | + foreach ($mobileAgent as $agent) |
|
164 | 164 | { |
165 | - if(stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE) |
|
165 | + if (stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE) |
|
166 | 166 | { |
167 | 167 | $UACheck = TRUE; |
168 | 168 | return TRUE; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | function isMobilePadCheckByAgent() |
181 | 181 | { |
182 | 182 | static $UACheck; |
183 | - if(isset($UACheck)) |
|
183 | + if (isset($UACheck)) |
|
184 | 184 | { |
185 | 185 | return $UACheck; |
186 | 186 | } |
@@ -190,21 +190,21 @@ discard block |
||
190 | 190 | // $exceptionAgent[0] contains exception agents for all exceptions. |
191 | 191 | $exceptionAgent = array(0 => array('Opera Mini', 'Opera Mobi'), 'Android' => 'Mobile'); |
192 | 192 | |
193 | - foreach($padAgent as $agent) |
|
193 | + foreach ($padAgent as $agent) |
|
194 | 194 | { |
195 | - if(strpos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE) |
|
195 | + if (strpos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE) |
|
196 | 196 | { |
197 | - if(!isset($exceptionAgent[$agent])) |
|
197 | + if (!isset($exceptionAgent[$agent])) |
|
198 | 198 | { |
199 | 199 | $UACheck = TRUE; |
200 | 200 | return TRUE; |
201 | 201 | } |
202 | - elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE) |
|
202 | + elseif (strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE) |
|
203 | 203 | { |
204 | 204 | // If the agent is the Android, that can be either tablet and mobile phone. |
205 | - foreach($exceptionAgent[0] as $val) |
|
205 | + foreach ($exceptionAgent[0] as $val) |
|
206 | 206 | { |
207 | - if(strpos($_SERVER['HTTP_USER_AGENT'], $val) !== FALSE) |
|
207 | + if (strpos($_SERVER['HTTP_USER_AGENT'], $val) !== FALSE) |
|
208 | 208 | { |
209 | 209 | $UACheck = FALSE; |
210 | 210 | return FALSE; |
@@ -68,26 +68,22 @@ discard block |
||
68 | 68 | if($m == "1") |
69 | 69 | { |
70 | 70 | $this->ismobile = TRUE; |
71 | - } |
|
72 | - elseif($m == "0") |
|
71 | + } elseif($m == "0") |
|
73 | 72 | { |
74 | 73 | $this->ismobile = FALSE; |
75 | 74 | } |
76 | - } |
|
77 | - elseif(isset($_COOKIE['mobile'])) |
|
75 | + } elseif(isset($_COOKIE['mobile'])) |
|
78 | 76 | { |
79 | 77 | if($_COOKIE['user-agent'] == md5($_SERVER['HTTP_USER_AGENT'])) |
80 | 78 | { |
81 | 79 | if($_COOKIE['mobile'] == 'true') |
82 | 80 | { |
83 | 81 | $this->ismobile = TRUE; |
84 | - } |
|
85 | - else |
|
82 | + } else |
|
86 | 83 | { |
87 | 84 | $this->ismobile = FALSE; |
88 | 85 | } |
89 | - } |
|
90 | - else |
|
86 | + } else |
|
91 | 87 | { |
92 | 88 | $this->ismobile = FALSE; |
93 | 89 | setcookie("mobile", FALSE); |
@@ -97,14 +93,12 @@ discard block |
||
97 | 93 | $this->ismobile = TRUE; |
98 | 94 | } |
99 | 95 | } |
100 | - } |
|
101 | - else |
|
96 | + } else |
|
102 | 97 | { |
103 | 98 | if($this->isMobilePadCheckByAgent()) |
104 | 99 | { |
105 | 100 | $this->ismobile = FALSE; |
106 | - } |
|
107 | - else |
|
101 | + } else |
|
108 | 102 | { |
109 | 103 | if($this->isMobileCheckByAgent()) |
110 | 104 | { |
@@ -122,8 +116,7 @@ discard block |
||
122 | 116 | $_COOKIE['mobile'] = 'true'; |
123 | 117 | setcookie("mobile", 'true'); |
124 | 118 | } |
125 | - } |
|
126 | - elseif($_COOKIE['mobile'] != 'false') |
|
119 | + } elseif($_COOKIE['mobile'] != 'false') |
|
127 | 120 | { |
128 | 121 | $_COOKIE['mobile'] = 'false'; |
129 | 122 | setcookie("mobile", 'false'); |
@@ -198,8 +191,7 @@ discard block |
||
198 | 191 | { |
199 | 192 | $UACheck = TRUE; |
200 | 193 | return TRUE; |
201 | - } |
|
202 | - elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE) |
|
194 | + } elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE) |
|
203 | 195 | { |
204 | 196 | // If the agent is the Android, that can be either tablet and mobile phone. |
205 | 197 | foreach($exceptionAgent[0] as $val) |
@@ -10,12 +10,24 @@ discard block |
||
10 | 10 | $oSecurity = new Security(); |
11 | 11 | $oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl'); |
12 | 12 | |
13 | - if($this->module_info->list_count) $this->list_count = $this->module_info->list_count; |
|
14 | - if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count; |
|
15 | - if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count; |
|
16 | - if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
17 | - if($this->module_info->page_count) $this->page_count = $this->module_info->page_count; |
|
18 | - if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count; |
|
13 | + if($this->module_info->list_count) { |
|
14 | + $this->list_count = $this->module_info->list_count; |
|
15 | + } |
|
16 | + if($this->module_info->mobile_list_count) { |
|
17 | + $this->list_count = $this->module_info->mobile_list_count; |
|
18 | + } |
|
19 | + if($this->module_info->search_list_count) { |
|
20 | + $this->search_list_count = $this->module_info->search_list_count; |
|
21 | + } |
|
22 | + if($this->module_info->mobile_search_list_count) { |
|
23 | + $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
24 | + } |
|
25 | + if($this->module_info->page_count) { |
|
26 | + $this->page_count = $this->module_info->page_count; |
|
27 | + } |
|
28 | + if($this->module_info->mobile_page_count) { |
|
29 | + $this->page_count = $this->module_info->mobile_page_count; |
|
30 | + } |
|
19 | 31 | $this->except_notice = $this->module_info->except_notice == 'N' ? false : true; |
20 | 32 | |
21 | 33 | // $this->_getStatusNameListecret option backward compatibility |
@@ -34,18 +46,15 @@ discard block |
||
34 | 46 | if($this->module_info->hide_category) |
35 | 47 | { |
36 | 48 | $this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y'; |
37 | - } |
|
38 | - else if($this->module_info->use_category) |
|
49 | + } else if($this->module_info->use_category) |
|
39 | 50 | { |
40 | 51 | $this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y'; |
41 | - } |
|
42 | - else |
|
52 | + } else |
|
43 | 53 | { |
44 | 54 | $this->module_info->hide_category = 'N'; |
45 | 55 | $this->module_info->use_category = 'Y'; |
46 | 56 | } |
47 | - } |
|
48 | - else |
|
57 | + } else |
|
49 | 58 | { |
50 | 59 | $this->module_info->hide_category = 'Y'; |
51 | 60 | $this->module_info->use_category = 'N'; |
@@ -58,7 +67,9 @@ discard block |
||
58 | 67 | if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read) |
59 | 68 | { |
60 | 69 | $this->consultation = true; |
61 | - if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
70 | + if(!Context::get('is_logged')) { |
|
71 | + $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
72 | + } |
|
62 | 73 | } else { |
63 | 74 | $this->consultation = false; |
64 | 75 | } |
@@ -10,32 +10,32 @@ discard block |
||
10 | 10 | $oSecurity = new Security(); |
11 | 11 | $oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl'); |
12 | 12 | |
13 | - if($this->module_info->list_count) $this->list_count = $this->module_info->list_count; |
|
14 | - if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count; |
|
15 | - if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count; |
|
16 | - if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
17 | - if($this->module_info->page_count) $this->page_count = $this->module_info->page_count; |
|
18 | - if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count; |
|
13 | + if ($this->module_info->list_count) $this->list_count = $this->module_info->list_count; |
|
14 | + if ($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count; |
|
15 | + if ($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count; |
|
16 | + if ($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
17 | + if ($this->module_info->page_count) $this->page_count = $this->module_info->page_count; |
|
18 | + if ($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count; |
|
19 | 19 | $this->except_notice = $this->module_info->except_notice == 'N' ? false : true; |
20 | 20 | |
21 | 21 | // $this->_getStatusNameListecret option backward compatibility |
22 | 22 | $oDocumentModel = getModel('document'); |
23 | 23 | |
24 | 24 | $statusList = $this->_getStatusNameList($oDocumentModel); |
25 | - if(isset($statusList['SECRET'])) |
|
25 | + if (isset($statusList['SECRET'])) |
|
26 | 26 | { |
27 | 27 | $this->module_info->secret = 'Y'; |
28 | 28 | } |
29 | 29 | |
30 | 30 | // use_category <=1.5.x, hide_category >=1.7.x |
31 | 31 | $count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl)); |
32 | - if($count_category) |
|
32 | + if ($count_category) |
|
33 | 33 | { |
34 | - if($this->module_info->hide_category) |
|
34 | + if ($this->module_info->hide_category) |
|
35 | 35 | { |
36 | 36 | $this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y'; |
37 | 37 | } |
38 | - else if($this->module_info->use_category) |
|
38 | + else if ($this->module_info->use_category) |
|
39 | 39 | { |
40 | 40 | $this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y'; |
41 | 41 | } |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | * check the consultation function, if the user is admin then swich off consultation function |
56 | 56 | * if the user is not logged, then disppear write document/write comment./ view document |
57 | 57 | **/ |
58 | - if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read) |
|
58 | + if ($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read) |
|
59 | 59 | { |
60 | 60 | $this->consultation = true; |
61 | - if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
61 | + if (!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
62 | 62 | } else { |
63 | 63 | $this->consultation = false; |
64 | 64 | } |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | $extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl); |
68 | 68 | Context::set('extra_keys', $extra_keys); |
69 | 69 | |
70 | - $template_path = sprintf("%sm.skins/%s/",$this->module_path, $this->module_info->mskin); |
|
71 | - if(!is_dir($template_path)||!$this->module_info->mskin) |
|
70 | + $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin); |
|
71 | + if (!is_dir($template_path) || !$this->module_info->mskin) |
|
72 | 72 | { |
73 | 73 | $this->module_info->mskin = 'default'; |
74 | - $template_path = sprintf("%sm.skins/%s/",$this->module_path, $this->module_info->mskin); |
|
74 | + $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin); |
|
75 | 75 | } |
76 | 76 | $this->setTemplatePath($template_path); |
77 | 77 | Context::addJsFilter($this->module_path.'tpl/filter', 'input_password.xml'); |
@@ -87,19 +87,19 @@ discard block |
||
87 | 87 | function getBoardCommentPage() |
88 | 88 | { |
89 | 89 | $document_srl = Context::get('document_srl'); |
90 | - $oDocumentModel =& getModel('document'); |
|
91 | - if(!$document_srl) |
|
90 | + $oDocumentModel = & getModel('document'); |
|
91 | + if (!$document_srl) |
|
92 | 92 | { |
93 | 93 | return new BaseObject(-1, "msg_invalid_request"); |
94 | 94 | } |
95 | 95 | |
96 | - if($this->grant->view == false || ($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)) |
|
96 | + if ($this->grant->view == false || ($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)) |
|
97 | 97 | { |
98 | 98 | return new BaseObject(-1, "msg_not_permitted"); |
99 | 99 | } |
100 | 100 | |
101 | 101 | $oDocument = $oDocumentModel->getDocument($document_srl); |
102 | - if(!$oDocument->isExists()) |
|
102 | + if (!$oDocument->isExists()) |
|
103 | 103 | { |
104 | 104 | return new BaseObject(-1, "msg_invalid_request"); |
105 | 105 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | function dispBoardMessage($msg_code) |
113 | 113 | { |
114 | 114 | $msg = Context::getLang($msg_code); |
115 | - $oMessageObject = &ModuleHandler::getModuleInstance('message','mobile'); |
|
115 | + $oMessageObject = &ModuleHandler::getModuleInstance('message', 'mobile'); |
|
116 | 116 | $oMessageObject->setError(-1); |
117 | 117 | $oMessageObject->setMessage($msg); |
118 | 118 | $oMessageObject->dispMessage(); |