@@ -29,7 +29,9 @@ discard block |
||
29 | 29 | switch($search_target) |
30 | 30 | { |
31 | 31 | case 'title' : |
32 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
32 | + if($search_keyword) { |
|
33 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
34 | + } |
|
33 | 35 | $args->s_title= $search_keyword; |
34 | 36 | break; |
35 | 37 | case 'regdate' : |
@@ -62,17 +64,22 @@ discard block |
||
62 | 64 | |
63 | 65 | $oDocumentModel = getModel('document'); |
64 | 66 | $targetDocumentOutput = $oDocumentModel->getDocuments($uploadTargetSrlList); |
65 | - if(!is_array($targetDocumentOutput)) $targetDocumentOutput = array(); |
|
67 | + if(!is_array($targetDocumentOutput)) { |
|
68 | + $targetDocumentOutput = array(); |
|
69 | + } |
|
66 | 70 | |
67 | 71 | $oCommentModel = getModel('comment'); |
68 | 72 | $columnList = array('comment_srl', 'document_srl'); |
69 | 73 | $targetCommentOutput = $oCommentModel->getComments($uploadTargetSrlList, $columnList); |
70 | - if(!is_array($targetCommentOutput)) $targetCommentOutput = array(); |
|
74 | + if(!is_array($targetCommentOutput)) { |
|
75 | + $targetCommentOutput = array(); |
|
76 | + } |
|
71 | 77 | |
72 | 78 | foreach($output->data as $value) |
73 | 79 | { |
74 | - if(array_key_exists($value->upload_target_srl, $targetDocumentOutput)) |
|
75 | - $value->document_srl = $value->upload_target_srl; |
|
80 | + if(array_key_exists($value->upload_target_srl, $targetDocumentOutput)) { |
|
81 | + $value->document_srl = $value->upload_target_srl; |
|
82 | + } |
|
76 | 83 | |
77 | 84 | if(array_key_exists($value->upload_target_srl, $targetCommentOutput)) |
78 | 85 | { |
@@ -110,7 +117,9 @@ discard block |
||
110 | 117 | $skin_list = $oModuleModel->getSkins($this->module_path); |
111 | 118 | Context::set('skin_list', $skin_list); |
112 | 119 | |
113 | - if(!$skin_list[$config->skin]) $config->skin = "default"; |
|
120 | + if(!$skin_list[$config->skin]) { |
|
121 | + $config->skin = "default"; |
|
122 | + } |
|
114 | 123 | // Set the skin colorset once the configurations is completed |
115 | 124 | Context::set('colorset_list', $skin_list[$config->skin]->colorset); |
116 | 125 | |
@@ -137,7 +146,9 @@ discard block |
||
137 | 146 | $args->poll_index_srl = Context::get('poll_index_srl'); |
138 | 147 | |
139 | 148 | $output = executeQuery('poll.getPoll', $args); |
140 | - if(!$output->data) return $this->stop('msg_poll_not_exists'); |
|
149 | + if(!$output->data) { |
|
150 | + return $this->stop('msg_poll_not_exists'); |
|
151 | + } |
|
141 | 152 | |
142 | 153 | $poll = new stdClass(); |
143 | 154 | $poll->stop_date = $output->data->stop_date; |
@@ -24,19 +24,19 @@ discard block |
||
24 | 24 | $search_keyword = trim(Context::get('search_keyword')); |
25 | 25 | |
26 | 26 | $args = new stdClass(); |
27 | - if($search_target && $search_keyword) |
|
27 | + if ($search_target && $search_keyword) |
|
28 | 28 | { |
29 | - switch($search_target) |
|
29 | + switch ($search_target) |
|
30 | 30 | { |
31 | 31 | case 'title' : |
32 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
33 | - $args->s_title= $search_keyword; |
|
32 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
33 | + $args->s_title = $search_keyword; |
|
34 | 34 | break; |
35 | 35 | case 'regdate' : |
36 | 36 | $args->s_regdate = $search_keyword; |
37 | 37 | break; |
38 | 38 | case 'ipaddress' : |
39 | - $args->s_ipaddress= $search_keyword; |
|
39 | + $args->s_ipaddress = $search_keyword; |
|
40 | 40 | break; |
41 | 41 | } |
42 | 42 | } |
@@ -52,29 +52,29 @@ discard block |
||
52 | 52 | $output = $oPollAdminModel->getPollListWithMember($args); |
53 | 53 | |
54 | 54 | // check poll type. document or comment |
55 | - if(is_array($output->data)) |
|
55 | + if (is_array($output->data)) |
|
56 | 56 | { |
57 | 57 | $uploadTargetSrlList = array(); |
58 | - foreach($output->data as $value) |
|
58 | + foreach ($output->data as $value) |
|
59 | 59 | { |
60 | 60 | $uploadTargetSrlList[] = $value->upload_target_srl; |
61 | 61 | } |
62 | 62 | |
63 | 63 | $oDocumentModel = getModel('document'); |
64 | 64 | $targetDocumentOutput = $oDocumentModel->getDocuments($uploadTargetSrlList); |
65 | - if(!is_array($targetDocumentOutput)) $targetDocumentOutput = array(); |
|
65 | + if (!is_array($targetDocumentOutput)) $targetDocumentOutput = array(); |
|
66 | 66 | |
67 | 67 | $oCommentModel = getModel('comment'); |
68 | 68 | $columnList = array('comment_srl', 'document_srl'); |
69 | 69 | $targetCommentOutput = $oCommentModel->getComments($uploadTargetSrlList, $columnList); |
70 | - if(!is_array($targetCommentOutput)) $targetCommentOutput = array(); |
|
70 | + if (!is_array($targetCommentOutput)) $targetCommentOutput = array(); |
|
71 | 71 | |
72 | - foreach($output->data as $value) |
|
72 | + foreach ($output->data as $value) |
|
73 | 73 | { |
74 | - if(array_key_exists($value->upload_target_srl, $targetDocumentOutput)) |
|
74 | + if (array_key_exists($value->upload_target_srl, $targetDocumentOutput)) |
|
75 | 75 | $value->document_srl = $value->upload_target_srl; |
76 | 76 | |
77 | - if(array_key_exists($value->upload_target_srl, $targetCommentOutput)) |
|
77 | + if (array_key_exists($value->upload_target_srl, $targetCommentOutput)) |
|
78 | 78 | { |
79 | 79 | $value->comment_srl = $value->upload_target_srl; |
80 | 80 | $value->document_srl = $targetCommentOutput[$value->comment_srl]->document_srl; |
@@ -110,14 +110,14 @@ discard block |
||
110 | 110 | $skin_list = $oModuleModel->getSkins($this->module_path); |
111 | 111 | Context::set('skin_list', $skin_list); |
112 | 112 | |
113 | - if(!$skin_list[$config->skin]) $config->skin = "default"; |
|
113 | + if (!$skin_list[$config->skin]) $config->skin = "default"; |
|
114 | 114 | // Set the skin colorset once the configurations is completed |
115 | 115 | Context::set('colorset_list', $skin_list[$config->skin]->colorset); |
116 | 116 | |
117 | 117 | $security = new Security(); |
118 | 118 | $security->encodeHTML('config..'); |
119 | 119 | $security->encodeHTML('skin_list..title'); |
120 | - $security->encodeHTML('colorset_list..name','colorset_list..title'); |
|
120 | + $security->encodeHTML('colorset_list..name', 'colorset_list..title'); |
|
121 | 121 | |
122 | 122 | // Set a template |
123 | 123 | $this->setTemplatePath($this->module_path.'tpl'); |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | $args->poll_index_srl = Context::get('poll_index_srl'); |
138 | 138 | |
139 | 139 | $output = executeQuery('poll.getPoll', $args); |
140 | - if(!$output->data) return $this->stop('msg_poll_not_exists'); |
|
140 | + if (!$output->data) return $this->stop('msg_poll_not_exists'); |
|
141 | 141 | |
142 | 142 | $poll = new stdClass(); |
143 | 143 | $poll->stop_date = $output->data->stop_date; |
144 | 144 | $poll->poll_count = $output->data->poll_count; |
145 | 145 | |
146 | 146 | $output = executeQuery('poll.getPollTitle', $args); |
147 | - if(!$output->data) |
|
147 | + if (!$output->data) |
|
148 | 148 | { |
149 | 149 | return $this->stop('msg_poll_not_exists'); |
150 | 150 | } |
@@ -155,14 +155,14 @@ discard block |
||
155 | 155 | $tmp->poll_count = $output->data->poll_count; |
156 | 156 | |
157 | 157 | $output = executeQuery('poll.getPollItem', $args); |
158 | - foreach($output->data as $val) |
|
158 | + foreach ($output->data as $val) |
|
159 | 159 | { |
160 | 160 | $tmp->item[] = $val; |
161 | 161 | } |
162 | 162 | |
163 | 163 | $poll->poll_srl = $poll_srl; |
164 | 164 | |
165 | - Context::set('poll',$poll); |
|
165 | + Context::set('poll', $poll); |
|
166 | 166 | // Configure the skin and the colorset for the default configuration |
167 | 167 | $oModuleModel = getModel('module'); |
168 | 168 | $poll_config = $oModuleModel->getModuleConfig('poll'); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $args = new stdClass; |
23 | 23 | $args->poll_srl = $poll_srl; |
24 | 24 | |
25 | - if(Context::get('is_logged')) |
|
25 | + if (Context::get('is_logged')) |
|
26 | 26 | { |
27 | 27 | $logged_info = Context::get('logged_info'); |
28 | 28 | $args->member_srl = $logged_info->member_srl; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $args->ipaddress = $_SERVER['REMOTE_ADDR']; |
33 | 33 | } |
34 | 34 | $output = executeQuery('poll.getPollLog', $args); |
35 | - if($output->data->count) return true; |
|
35 | + if ($output->data->count) return true; |
|
36 | 36 | return false; |
37 | 37 | } |
38 | 38 | |
@@ -47,20 +47,20 @@ discard block |
||
47 | 47 | // Get the information related to the survey |
48 | 48 | $columnList = array('poll_count', 'stop_date'); |
49 | 49 | $output = executeQuery('poll.getPoll', $args, $columnList); |
50 | - if(!$output->data) return ''; |
|
50 | + if (!$output->data) return ''; |
|
51 | 51 | |
52 | 52 | $poll = new stdClass; |
53 | 53 | $poll->style = $style; |
54 | - $poll->poll_count = (int)$output->data->poll_count; |
|
54 | + $poll->poll_count = (int) $output->data->poll_count; |
|
55 | 55 | $poll->stop_date = $output->data->stop_date; |
56 | 56 | |
57 | 57 | $columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count'); |
58 | 58 | $output = executeQuery('poll.getPollTitle', $args, $columnList); |
59 | - if(!$output->data) return; |
|
60 | - if(!is_array($output->data)) $output->data = array($output->data); |
|
59 | + if (!$output->data) return; |
|
60 | + if (!is_array($output->data)) $output->data = array($output->data); |
|
61 | 61 | |
62 | 62 | $poll->poll = array(); |
63 | - foreach($output->data as $key => $val) |
|
63 | + foreach ($output->data as $key => $val) |
|
64 | 64 | { |
65 | 65 | $poll->poll[$val->poll_index_srl] = new stdClass; |
66 | 66 | $poll->poll[$val->poll_index_srl]->title = $val->title; |
@@ -69,16 +69,16 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | $output = executeQuery('poll.getPollItem', $args); |
72 | - foreach($output->data as $key => $val) |
|
72 | + foreach ($output->data as $key => $val) |
|
73 | 73 | { |
74 | 74 | $poll->poll[$val->poll_index_srl]->item[] = $val; |
75 | 75 | } |
76 | 76 | |
77 | 77 | $poll->poll_srl = $poll_srl; |
78 | 78 | // Only ongoing poll results |
79 | - if($poll->stop_date >= date("Ymd")) |
|
79 | + if ($poll->stop_date >= date("Ymd")) |
|
80 | 80 | { |
81 | - if($this->isPolled($poll_srl)) $tpl_file = "result"; |
|
81 | + if ($this->isPolled($poll_srl)) $tpl_file = "result"; |
|
82 | 82 | else $tpl_file = "form"; |
83 | 83 | } |
84 | 84 | else |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | $tpl_file = "result"; |
87 | 87 | } |
88 | 88 | |
89 | - Context::set('poll',$poll); |
|
90 | - Context::set('skin',$skin); |
|
89 | + Context::set('poll', $poll); |
|
90 | + Context::set('skin', $skin); |
|
91 | 91 | // The skin for the default configurations, and the colorset configurations |
92 | 92 | $tpl_path = sprintf("%sskins/%s/", $this->module_path, $skin); |
93 | 93 | |
@@ -104,20 +104,20 @@ discard block |
||
104 | 104 | $args->poll_srl = $poll_srl; |
105 | 105 | // Get the information related to the survey |
106 | 106 | $output = executeQuery('poll.getPoll', $args); |
107 | - if(!$output->data) return ''; |
|
107 | + if (!$output->data) return ''; |
|
108 | 108 | |
109 | 109 | $poll = new stdClass; |
110 | 110 | $poll->style = $style; |
111 | - $poll->poll_count = (int)$output->data->poll_count; |
|
111 | + $poll->poll_count = (int) $output->data->poll_count; |
|
112 | 112 | $poll->stop_date = $output->data->stop_date; |
113 | 113 | |
114 | 114 | $columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count'); |
115 | 115 | $output = executeQuery('poll.getPollTitle', $args, $columnList); |
116 | - if(!$output->data) return; |
|
117 | - if(!is_array($output->data)) $output->data = array($output->data); |
|
116 | + if (!$output->data) return; |
|
117 | + if (!is_array($output->data)) $output->data = array($output->data); |
|
118 | 118 | |
119 | 119 | $poll->poll = array(); |
120 | - foreach($output->data as $key => $val) |
|
120 | + foreach ($output->data as $key => $val) |
|
121 | 121 | { |
122 | 122 | $poll->poll[$val->poll_index_srl] = new stdClass; |
123 | 123 | $poll->poll[$val->poll_index_srl]->title = $val->title; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | $output = executeQuery('poll.getPollItem', $args); |
129 | - foreach($output->data as $key => $val) |
|
129 | + foreach ($output->data as $key => $val) |
|
130 | 130 | { |
131 | 131 | $poll->poll[$val->poll_index_srl]->item[] = $val; |
132 | 132 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | $tpl_file = "result"; |
137 | 137 | |
138 | - Context::set('poll',$poll); |
|
138 | + Context::set('poll', $poll); |
|
139 | 139 | // The skin for the default configurations, and the colorset configurations |
140 | 140 | $tpl_path = sprintf("%sskins/%s/", $this->module_path, $skin); |
141 | 141 | |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | $oModuleModel = getModel('module'); |
153 | 153 | $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin); |
154 | 154 | |
155 | - for($i=0;$i<count($skin_info->colorset);$i++) |
|
155 | + for ($i = 0; $i < count($skin_info->colorset); $i++) |
|
156 | 156 | { |
157 | 157 | $colorset = sprintf('%s|@|%s', $skin_info->colorset[$i]->name, $skin_info->colorset[$i]->title); |
158 | 158 | $colorset_list[] = $colorset; |
159 | 159 | } |
160 | 160 | |
161 | - if(count($colorset_list)) $colorsets = implode("\n", $colorset_list); |
|
161 | + if (count($colorset_list)) $colorsets = implode("\n", $colorset_list); |
|
162 | 162 | $this->add('colorset_list', $colorsets); |
163 | 163 | } |
164 | 164 | } |
@@ -26,13 +26,14 @@ discard block |
||
26 | 26 | { |
27 | 27 | $logged_info = Context::get('logged_info'); |
28 | 28 | $args->member_srl = $logged_info->member_srl; |
29 | - } |
|
30 | - else |
|
29 | + } else |
|
31 | 30 | { |
32 | 31 | $args->ipaddress = $_SERVER['REMOTE_ADDR']; |
33 | 32 | } |
34 | 33 | $output = executeQuery('poll.getPollLog', $args); |
35 | - if($output->data->count) return true; |
|
34 | + if($output->data->count) { |
|
35 | + return true; |
|
36 | + } |
|
36 | 37 | return false; |
37 | 38 | } |
38 | 39 | |
@@ -47,7 +48,9 @@ discard block |
||
47 | 48 | // Get the information related to the survey |
48 | 49 | $columnList = array('poll_count', 'stop_date'); |
49 | 50 | $output = executeQuery('poll.getPoll', $args, $columnList); |
50 | - if(!$output->data) return ''; |
|
51 | + if(!$output->data) { |
|
52 | + return ''; |
|
53 | + } |
|
51 | 54 | |
52 | 55 | $poll = new stdClass; |
53 | 56 | $poll->style = $style; |
@@ -56,8 +59,12 @@ discard block |
||
56 | 59 | |
57 | 60 | $columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count'); |
58 | 61 | $output = executeQuery('poll.getPollTitle', $args, $columnList); |
59 | - if(!$output->data) return; |
|
60 | - if(!is_array($output->data)) $output->data = array($output->data); |
|
62 | + if(!$output->data) { |
|
63 | + return; |
|
64 | + } |
|
65 | + if(!is_array($output->data)) { |
|
66 | + $output->data = array($output->data); |
|
67 | + } |
|
61 | 68 | |
62 | 69 | $poll->poll = array(); |
63 | 70 | foreach($output->data as $key => $val) |
@@ -78,10 +85,12 @@ discard block |
||
78 | 85 | // Only ongoing poll results |
79 | 86 | if($poll->stop_date >= date("Ymd")) |
80 | 87 | { |
81 | - if($this->isPolled($poll_srl)) $tpl_file = "result"; |
|
82 | - else $tpl_file = "form"; |
|
83 | - } |
|
84 | - else |
|
88 | + if($this->isPolled($poll_srl)) { |
|
89 | + $tpl_file = "result"; |
|
90 | + } else { |
|
91 | + $tpl_file = "form"; |
|
92 | + } |
|
93 | + } else |
|
85 | 94 | { |
86 | 95 | $tpl_file = "result"; |
87 | 96 | } |
@@ -104,7 +113,9 @@ discard block |
||
104 | 113 | $args->poll_srl = $poll_srl; |
105 | 114 | // Get the information related to the survey |
106 | 115 | $output = executeQuery('poll.getPoll', $args); |
107 | - if(!$output->data) return ''; |
|
116 | + if(!$output->data) { |
|
117 | + return ''; |
|
118 | + } |
|
108 | 119 | |
109 | 120 | $poll = new stdClass; |
110 | 121 | $poll->style = $style; |
@@ -113,8 +124,12 @@ discard block |
||
113 | 124 | |
114 | 125 | $columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count'); |
115 | 126 | $output = executeQuery('poll.getPollTitle', $args, $columnList); |
116 | - if(!$output->data) return; |
|
117 | - if(!is_array($output->data)) $output->data = array($output->data); |
|
127 | + if(!$output->data) { |
|
128 | + return; |
|
129 | + } |
|
130 | + if(!is_array($output->data)) { |
|
131 | + $output->data = array($output->data); |
|
132 | + } |
|
118 | 133 | |
119 | 134 | $poll->poll = array(); |
120 | 135 | foreach($output->data as $key => $val) |
@@ -158,7 +173,9 @@ discard block |
||
158 | 173 | $colorset_list[] = $colorset; |
159 | 174 | } |
160 | 175 | |
161 | - if(count($colorset_list)) $colorsets = implode("\n", $colorset_list); |
|
176 | + if(count($colorset_list)) { |
|
177 | + $colorsets = implode("\n", $colorset_list); |
|
178 | + } |
|
162 | 179 | $this->add('colorset_list', $colorsets); |
163 | 180 | } |
164 | 181 | } |
@@ -44,9 +44,14 @@ discard block |
||
44 | 44 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl); |
45 | 45 | $columnList = array('sites.domain'); |
46 | 46 | $site = $oModuleModel->getSiteInfo($module_info->site_srl, $columnList); |
47 | - if(!strpos($site->domain, '.')) $vid = $site->domain; |
|
48 | - else $site = null; |
|
49 | - if($site) $feed_config[$module_srl]['url'] = $oRssModel->getModuleFeedUrl($vid, $module_info->mid, 'rss'); |
|
47 | + if(!strpos($site->domain, '.')) { |
|
48 | + $vid = $site->domain; |
|
49 | + } else { |
|
50 | + $site = null; |
|
51 | + } |
|
52 | + if($site) { |
|
53 | + $feed_config[$module_srl]['url'] = $oRssModel->getModuleFeedUrl($vid, $module_info->mid, 'rss'); |
|
54 | + } |
|
50 | 55 | $feed_config[$module_srl]['mid'] = $module_info->mid; |
51 | 56 | $feed_config[$module_srl]['open_feed'] = $config->open_rss; |
52 | 57 | $feed_config[$module_srl]['open_total_feed'] = $config->open_total_feed; |
@@ -54,7 +59,9 @@ discard block |
||
54 | 59 | } |
55 | 60 | } |
56 | 61 | } |
57 | - if(!$total_config->feed_document_count) $total_config->feed_document_count = 15; |
|
62 | + if(!$total_config->feed_document_count) { |
|
63 | + $total_config->feed_document_count = 15; |
|
64 | + } |
|
58 | 65 | $total_config->url = $oRssModel->getModuleFeedUrl(NULL, '', 'rss', true); |
59 | 66 | |
60 | 67 | Context::set('feed_config', $feed_config); |
@@ -28,25 +28,25 @@ discard block |
||
28 | 28 | $oModuleModel = getModel('module'); |
29 | 29 | $rss_config = $oModuleModel->getModulePartConfigs('rss'); |
30 | 30 | $total_config = $oModuleModel->getModuleConfig('rss'); |
31 | - if(!$total_config) |
|
31 | + if (!$total_config) |
|
32 | 32 | { |
33 | 33 | $total_config = new stdClass(); |
34 | 34 | } |
35 | 35 | $oRssModel = getModel('rss'); |
36 | 36 | |
37 | - if($rss_config) |
|
37 | + if ($rss_config) |
|
38 | 38 | { |
39 | 39 | $feed_config = array(); |
40 | - foreach($rss_config as $module_srl => $config) |
|
40 | + foreach ($rss_config as $module_srl => $config) |
|
41 | 41 | { |
42 | - if($config) |
|
42 | + if ($config) |
|
43 | 43 | { |
44 | 44 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl); |
45 | 45 | $columnList = array('sites.domain'); |
46 | 46 | $site = $oModuleModel->getSiteInfo($module_info->site_srl, $columnList); |
47 | - if(!strpos($site->domain, '.')) $vid = $site->domain; |
|
47 | + if (!strpos($site->domain, '.')) $vid = $site->domain; |
|
48 | 48 | else $site = null; |
49 | - if($site) $feed_config[$module_srl]['url'] = $oRssModel->getModuleFeedUrl($vid, $module_info->mid, 'rss'); |
|
49 | + if ($site) $feed_config[$module_srl]['url'] = $oRssModel->getModuleFeedUrl($vid, $module_info->mid, 'rss'); |
|
50 | 50 | $feed_config[$module_srl]['mid'] = $module_info->mid; |
51 | 51 | $feed_config[$module_srl]['open_feed'] = $config->open_rss; |
52 | 52 | $feed_config[$module_srl]['open_total_feed'] = $config->open_total_feed; |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
57 | - if(!$total_config->feed_document_count) $total_config->feed_document_count = 15; |
|
57 | + if (!$total_config->feed_document_count) $total_config->feed_document_count = 15; |
|
58 | 58 | $total_config->url = $oRssModel->getModuleFeedUrl(NULL, '', 'rss', true); |
59 | 59 | |
60 | 60 | Context::set('feed_config', $feed_config); |
61 | 61 | Context::set('total_config', $total_config); |
62 | 62 | |
63 | 63 | $security = new Security(); |
64 | - $security->encodeHTML('feed_config..mid','feed_config..url'); |
|
64 | + $security->encodeHTML('feed_config..mid', 'feed_config..url'); |
|
65 | 65 | $security->encodeHTML('total_config..'); |
66 | 66 | |
67 | 67 | $this->setTemplatePath($this->module_path.'tpl'); |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | */ |
19 | 19 | function getModuleFeedUrl($vid, $mid, $format = 'rss', $absolute_url = false) |
20 | 20 | { |
21 | - if($absolute_url) |
|
21 | + if ($absolute_url) |
|
22 | 22 | { |
23 | - return getFullUrl('','vid',$vid, 'mid',$mid, 'act',$format); |
|
23 | + return getFullUrl('', 'vid', $vid, 'mid', $mid, 'act', $format); |
|
24 | 24 | } |
25 | 25 | else |
26 | 26 | { |
27 | - return getUrl('','vid',$vid, 'mid',$mid, 'act',$format); |
|
27 | + return getUrl('', 'vid', $vid, 'mid', $mid, 'act', $format); |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | // Get the configurations of the rss module |
40 | 40 | $oModuleModel = getModel('module'); |
41 | 41 | $module_rss_config = $oModuleModel->getModulePartConfig('rss', $module_srl); |
42 | - if(!$module_rss_config) |
|
42 | + if (!$module_rss_config) |
|
43 | 43 | { |
44 | 44 | $module_rss_config = new stdClass(); |
45 | 45 | $module_rss_config->open_rss = 'N'; |
@@ -21,8 +21,7 @@ |
||
21 | 21 | if($absolute_url) |
22 | 22 | { |
23 | 23 | return getFullUrl('','vid',$vid, 'mid',$mid, 'act',$format); |
24 | - } |
|
25 | - else |
|
24 | + } else |
|
26 | 25 | { |
27 | 26 | return getUrl('','vid',$vid, 'mid',$mid, 'act',$format); |
28 | 27 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $oSessionController = getController('session'); |
23 | 23 | $oSessionController->gc(0); |
24 | 24 | |
25 | - $this->add('result',Context::getLang('session_cleared')); |
|
25 | + $this->add('result', Context::getLang('session_cleared')); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | /* End of file session.admin.controller.php */ |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | function write($session_key, $val) |
28 | 28 | { |
29 | - if(!$session_key || !$this->session_started) return; |
|
29 | + if (!$session_key || !$this->session_started) return; |
|
30 | 30 | |
31 | 31 | $args = new stdClass; |
32 | 32 | $args->session_key = $session_key; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $session_info = $output->data; |
36 | 36 | |
37 | 37 | //if ip has changed delete the session from db |
38 | - if($session_info->session_key == $session_key && $session_info->ipaddress != $_SERVER['REMOTE_ADDR']) |
|
38 | + if ($session_info->session_key == $session_key && $session_info->ipaddress != $_SERVER['REMOTE_ADDR']) |
|
39 | 39 | { |
40 | 40 | executeQuery('session.deleteSession', $args); |
41 | 41 | |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | $args->val = $val; |
47 | 47 | $args->cur_mid = Context::get('mid'); |
48 | 48 | |
49 | - if(!$args->cur_mid) |
|
49 | + if (!$args->cur_mid) |
|
50 | 50 | { |
51 | 51 | $module_info = Context::get('current_module_info'); |
52 | 52 | $args->cur_mid = $module_info->mid; |
53 | 53 | } |
54 | 54 | |
55 | - if(Context::get('is_logged')) |
|
55 | + if (Context::get('is_logged')) |
|
56 | 56 | { |
57 | 57 | $logged_info = Context::get('logged_info'); |
58 | 58 | $args->member_srl = $logged_info->member_srl; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME']); |
66 | 66 | |
67 | 67 | //put session into db |
68 | - if($session_info->session_key) |
|
68 | + if ($session_info->session_key) |
|
69 | 69 | { |
70 | 70 | $output = executeQuery('session.updateSession', $args); |
71 | 71 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | function destroy($session_key) |
81 | 81 | { |
82 | - if(!$session_key || !$this->session_started) return; |
|
82 | + if (!$session_key || !$this->session_started) return; |
|
83 | 83 | |
84 | 84 | //remove session from db |
85 | 85 | $args = new stdClass(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | function gc($maxlifetime) |
93 | 93 | { |
94 | - if(!$this->session_started) return; |
|
94 | + if (!$this->session_started) return; |
|
95 | 95 | |
96 | 96 | executeQuery('session.gcSession'); |
97 | 97 | return true; |
@@ -26,7 +26,9 @@ discard block |
||
26 | 26 | |
27 | 27 | function write($session_key, $val) |
28 | 28 | { |
29 | - if(!$session_key || !$this->session_started) return; |
|
29 | + if(!$session_key || !$this->session_started) { |
|
30 | + return; |
|
31 | + } |
|
30 | 32 | |
31 | 33 | $args = new stdClass; |
32 | 34 | $args->session_key = $session_key; |
@@ -56,8 +58,7 @@ discard block |
||
56 | 58 | { |
57 | 59 | $logged_info = Context::get('logged_info'); |
58 | 60 | $args->member_srl = $logged_info->member_srl; |
59 | - } |
|
60 | - else |
|
61 | + } else |
|
61 | 62 | { |
62 | 63 | $args->member_srl = 0; |
63 | 64 | } |
@@ -68,8 +69,7 @@ discard block |
||
68 | 69 | if($session_info->session_key) |
69 | 70 | { |
70 | 71 | $output = executeQuery('session.updateSession', $args); |
71 | - } |
|
72 | - else |
|
72 | + } else |
|
73 | 73 | { |
74 | 74 | $output = executeQuery('session.insertSession', $args); |
75 | 75 | } |
@@ -79,7 +79,9 @@ discard block |
||
79 | 79 | |
80 | 80 | function destroy($session_key) |
81 | 81 | { |
82 | - if(!$session_key || !$this->session_started) return; |
|
82 | + if(!$session_key || !$this->session_started) { |
|
83 | + return; |
|
84 | + } |
|
83 | 85 | |
84 | 86 | //remove session from db |
85 | 87 | $args = new stdClass(); |
@@ -91,7 +93,9 @@ discard block |
||
91 | 93 | |
92 | 94 | function gc($maxlifetime) |
93 | 95 | { |
94 | - if(!$this->session_started) return; |
|
96 | + if(!$this->session_started) { |
|
97 | + return; |
|
98 | + } |
|
95 | 99 | |
96 | 100 | executeQuery('session.gcSession'); |
97 | 101 | return true; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | } |
25 | 25 | function getTitle() |
26 | 26 | { |
27 | - if(empty($this->title)) return $lang->untitle; |
|
27 | + if (empty($this->title)) return $lang->untitle; |
|
28 | 28 | return htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
29 | 29 | } |
30 | 30 | function setTitle($title) |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | function getOriginModule() |
35 | 35 | { |
36 | - if(empty($this->originModule)) return 'document'; |
|
36 | + if (empty($this->originModule)) return 'document'; |
|
37 | 37 | return $this->originModule; |
38 | 38 | } |
39 | 39 | function setOriginModule($originModule) |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | function getRegdate() |
100 | 100 | { |
101 | - if(empty($this->regdate)) return date('YmdHis'); |
|
101 | + if (empty($this->regdate)) return date('YmdHis'); |
|
102 | 102 | |
103 | 103 | return $this->regdate; |
104 | 104 | } |
@@ -24,7 +24,9 @@ discard block |
||
24 | 24 | } |
25 | 25 | function getTitle() |
26 | 26 | { |
27 | - if(empty($this->title)) return $lang->untitle; |
|
27 | + if(empty($this->title)) { |
|
28 | + return $lang->untitle; |
|
29 | + } |
|
28 | 30 | return htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
29 | 31 | } |
30 | 32 | function setTitle($title) |
@@ -33,7 +35,9 @@ discard block |
||
33 | 35 | } |
34 | 36 | function getOriginModule() |
35 | 37 | { |
36 | - if(empty($this->originModule)) return 'document'; |
|
38 | + if(empty($this->originModule)) { |
|
39 | + return 'document'; |
|
40 | + } |
|
37 | 41 | return $this->originModule; |
38 | 42 | } |
39 | 43 | function setOriginModule($originModule) |
@@ -98,7 +102,9 @@ discard block |
||
98 | 102 | } |
99 | 103 | function getRegdate() |
100 | 104 | { |
101 | - if(empty($this->regdate)) return date('YmdHis'); |
|
105 | + if(empty($this->regdate)) { |
|
106 | + return date('YmdHis'); |
|
107 | + } |
|
102 | 108 | |
103 | 109 | return $this->regdate; |
104 | 110 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | function getTrash($trashSrl, $columnList = array()) |
20 | 20 | { |
21 | 21 | $oTrashVO = new TrashVO(); |
22 | - if(!$trashSrl) return $oTrashVO; |
|
22 | + if (!$trashSrl) return $oTrashVO; |
|
23 | 23 | |
24 | 24 | $args = new stdClass(); |
25 | 25 | $args->trashSrl = $trashSrl; |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | { |
42 | 42 | $output = executeQueryArray('trash.getTrashList', $args, $columnList); |
43 | 43 | |
44 | - if(is_array($output->data)) |
|
44 | + if (is_array($output->data)) |
|
45 | 45 | { |
46 | - foreach($output->data AS $key=>$value) |
|
46 | + foreach ($output->data AS $key=>$value) |
|
47 | 47 | { |
48 | 48 | $oTrashVO = new TrashVO(); |
49 | 49 | $this->_setTrashObject($oTrashVO, $value); |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | { |
64 | 64 | $output = executeQueryArray('trash.getTrashAllList', $args, $columnList); |
65 | 65 | |
66 | - if(is_array($output->data)) |
|
66 | + if (is_array($output->data)) |
|
67 | 67 | { |
68 | - foreach($output->data AS $key=>$value) |
|
68 | + foreach ($output->data AS $key=>$value) |
|
69 | 69 | { |
70 | 70 | $oTrashVO = new TrashVO(); |
71 | 71 | $this->_setTrashObject($oTrashVO, $value); |
@@ -19,7 +19,9 @@ |
||
19 | 19 | function getTrash($trashSrl, $columnList = array()) |
20 | 20 | { |
21 | 21 | $oTrashVO = new TrashVO(); |
22 | - if(!$trashSrl) return $oTrashVO; |
|
22 | + if(!$trashSrl) { |
|
23 | + return $oTrashVO; |
|
24 | + } |
|
23 | 25 | |
24 | 26 | $args = new stdClass(); |
25 | 27 | $args->trashSrl = $trashSrl; |
@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | if($widget->widget) |
33 | 33 | { |
34 | 34 | $widget_list[$no]->description = nl2br(trim($widget->description)); |
35 | - } |
|
36 | - else |
|
35 | + } else |
|
37 | 36 | { |
38 | 37 | unset($widget_list[$no]); |
39 | 38 | } |
@@ -59,7 +58,9 @@ discard block |
||
59 | 58 | function dispWidgetAdminAddContent() |
60 | 59 | { |
61 | 60 | $module_srl = Context::get('module_srl'); |
62 | - if(!$module_srl) return $this->stop("msg_invalid_request"); |
|
61 | + if(!$module_srl) { |
|
62 | + return $this->stop("msg_invalid_request"); |
|
63 | + } |
|
63 | 64 | |
64 | 65 | $document_srl = Context::get('document_srl'); |
65 | 66 | $oDocumentModel = getModel('document'); |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | $security = new Security($widget_list); |
28 | 28 | $widget_list = $security->encodeHTML('..', '..author..'); |
29 | 29 | |
30 | - foreach($widget_list as $no => $widget) |
|
30 | + foreach ($widget_list as $no => $widget) |
|
31 | 31 | { |
32 | - if($widget->widget) |
|
32 | + if ($widget->widget) |
|
33 | 33 | { |
34 | 34 | $widget_list[$no]->description = nl2br(trim($widget->description)); |
35 | 35 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | function dispWidgetAdminAddContent() |
60 | 60 | { |
61 | 61 | $module_srl = Context::get('module_srl'); |
62 | - if(!$module_srl) return $this->stop("msg_invalid_request"); |
|
62 | + if (!$module_srl) return $this->stop("msg_invalid_request"); |
|
63 | 63 | |
64 | 64 | $document_srl = Context::get('document_srl'); |
65 | 65 | $oDocumentModel = getModel('document'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | Context::set('module_info', $module_info); |
73 | 73 | // Editors settings of the module by calling getEditor |
74 | 74 | $oEditorModel = getModel('editor'); |
75 | - $editor = $oEditorModel->getModuleEditor('document',$module_srl, $module_srl,'module_srl','content'); |
|
75 | + $editor = $oEditorModel->getModuleEditor('document', $module_srl, $module_srl, 'module_srl', 'content'); |
|
76 | 76 | Context::set('editor', $editor); |
77 | 77 | |
78 | 78 | $security = new Security(); |