@@ -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(); |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | function dispWidgetInfo() |
22 | 22 | { |
23 | 23 | // If people have skin widget widget output as a function of the skin More Details |
24 | - if(Context::get('skin')) return $this->dispWidgetSkinInfo(); |
|
24 | + if(Context::get('skin')) { |
|
25 | + return $this->dispWidgetSkinInfo(); |
|
26 | + } |
|
25 | 27 | // Wanted widget is selected information |
26 | 28 | $oWidgetModel = getModel('widget'); |
27 | 29 | $widget_info = $oWidgetModel->getWidgetInfo(Context::get('selected_widget')); |
@@ -62,7 +64,9 @@ discard block |
||
62 | 64 | |
63 | 65 | $widget_list = $oWidgetModel->getDownloadedWidgetList(); |
64 | 66 | $selected_widget = Context::get('selected_widget'); |
65 | - if(!$selected_widget) $selected_widget = $widget_list[0]->widget; |
|
67 | + if(!$selected_widget) { |
|
68 | + $selected_widget = $widget_list[0]->widget; |
|
69 | + } |
|
66 | 70 | |
67 | 71 | $widget_info = $oWidgetModel->getWidgetInfo($selected_widget); |
68 | 72 | Context::set('widget_info', $widget_info); |
@@ -89,8 +93,7 @@ discard block |
||
89 | 93 | foreach($mid_list as $module_srl => $module) { |
90 | 94 | $module_categories[$module->module_category_srl]->list[$module_srl] = $module; |
91 | 95 | } |
92 | - } |
|
93 | - else |
|
96 | + } else |
|
94 | 97 | { |
95 | 98 | $module_categories[0] = new stdClass(); |
96 | 99 | $module_categories[0]->list = $mid_list; |
@@ -118,7 +121,9 @@ discard block |
||
118 | 121 | $widget_list = $oWidgetModel->getDownloadedWidgetList(); |
119 | 122 | Context::set('widget_list',$widget_list); |
120 | 123 | // When there is no widget is selected in the first widget |
121 | - if(!Context::get('selected_widget')) Context::set('selected_widget',$widget_list[0]->widget); |
|
124 | + if(!Context::get('selected_widget')) { |
|
125 | + Context::set('selected_widget',$widget_list[0]->widget); |
|
126 | + } |
|
122 | 127 | |
123 | 128 | $this->dispWidgetGenerateCode(); |
124 | 129 | $this->setLayoutFile('default_layout'); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | function dispWidgetInfo() |
22 | 22 | { |
23 | 23 | // If people have skin widget widget output as a function of the skin More Details |
24 | - if(Context::get('skin')) return $this->dispWidgetSkinInfo(); |
|
24 | + if (Context::get('skin')) return $this->dispWidgetSkinInfo(); |
|
25 | 25 | // Wanted widget is selected information |
26 | 26 | $oWidgetModel = getModel('widget'); |
27 | 27 | $widget_info = $oWidgetModel->getWidgetInfo(Context::get('selected_widget')); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $oModuleModel = getModel('module'); |
46 | 46 | $skin_info = $oModuleModel->loadSkinInfo($path, $skin); |
47 | 47 | |
48 | - Context::set('skin_info',$skin_info); |
|
48 | + Context::set('skin_info', $skin_info); |
|
49 | 49 | // Specifies the widget to pop up |
50 | 50 | $this->setLayoutFile('popup_layout'); |
51 | 51 | // Set a template file |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | $widget_list = $oWidgetModel->getDownloadedWidgetList(); |
64 | 64 | $selected_widget = Context::get('selected_widget'); |
65 | - if(!$selected_widget) $selected_widget = $widget_list[0]->widget; |
|
65 | + if (!$selected_widget) $selected_widget = $widget_list[0]->widget; |
|
66 | 66 | |
67 | 67 | $widget_info = $oWidgetModel->getWidgetInfo($selected_widget); |
68 | 68 | Context::set('widget_info', $widget_info); |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $group_list = $oMemberModel->getGroups($site_module_info->site_srl); |
85 | 85 | Context::set('group_list', $group_list); |
86 | 86 | // module_category and module combination |
87 | - if($module_categories) |
|
87 | + if ($module_categories) |
|
88 | 88 | { |
89 | - foreach($mid_list as $module_srl => $module) { |
|
89 | + foreach ($mid_list as $module_srl => $module) { |
|
90 | 90 | $module_categories[$module->module_category_srl]->list[$module_srl] = $module; |
91 | 91 | } |
92 | 92 | } |
@@ -96,10 +96,10 @@ discard block |
||
96 | 96 | $module_categories[0]->list = $mid_list; |
97 | 97 | } |
98 | 98 | |
99 | - Context::set('mid_list',$module_categories); |
|
99 | + Context::set('mid_list', $module_categories); |
|
100 | 100 | // Menu Get a list |
101 | 101 | $output = executeQueryArray('menu.getMenus'); |
102 | - Context::set('menu_list',$output->data); |
|
102 | + Context::set('menu_list', $output->data); |
|
103 | 103 | // Wanted information on skin |
104 | 104 | $skin_list = $oModuleModel->getSkins($widget_info->path); |
105 | 105 | Context::set('skin_list', $skin_list); |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | { |
117 | 117 | $oWidgetModel = getModel('widget'); |
118 | 118 | $widget_list = $oWidgetModel->getDownloadedWidgetList(); |
119 | - Context::set('widget_list',$widget_list); |
|
119 | + Context::set('widget_list', $widget_list); |
|
120 | 120 | // When there is no widget is selected in the first widget |
121 | - if(!Context::get('selected_widget')) Context::set('selected_widget',$widget_list[0]->widget); |
|
121 | + if (!Context::get('selected_widget')) Context::set('selected_widget', $widget_list[0]->widget); |
|
122 | 122 | |
123 | 123 | $this->dispWidgetGenerateCode(); |
124 | 124 | $this->setLayoutFile('default_layout'); |
@@ -133,13 +133,13 @@ discard block |
||
133 | 133 | // Widget-style list |
134 | 134 | $oWidgetModel = getModel('widget'); |
135 | 135 | $widgetStyle_list = $oWidgetModel->getDownloadedWidgetStyleList(); |
136 | - Context::set('widgetStyle_list',$widgetStyle_list); |
|
136 | + Context::set('widgetStyle_list', $widgetStyle_list); |
|
137 | 137 | // Selected list of widget styles |
138 | 138 | $widgetstyle = Context::get('widgetstyle'); |
139 | 139 | $widgetstyle_info = $oWidgetModel->getWidgetStyleInfo($widgetstyle); |
140 | - if($widgetstyle && $widgetstyle_info) |
|
140 | + if ($widgetstyle && $widgetstyle_info) |
|
141 | 141 | { |
142 | - Context::set('widgetstyle_info',$widgetstyle_info); |
|
142 | + Context::set('widgetstyle_info', $widgetstyle_info); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | $this->dispWidgetGenerateCode(); |
@@ -19,13 +19,13 @@ |
||
19 | 19 | $oCounterModel = getModel('counter'); |
20 | 20 | |
21 | 21 | $site_module_info = Context::get('site_module_info'); |
22 | - $output = $oCounterModel->getStatus(array('00000000', date('Ymd', $_SERVER['REQUEST_TIME']-60*60*24), date('Ymd')), $site_module_info->site_srl); |
|
23 | - if(count($output)) |
|
22 | + $output = $oCounterModel->getStatus(array('00000000', date('Ymd', $_SERVER['REQUEST_TIME'] - 60 * 60 * 24), date('Ymd')), $site_module_info->site_srl); |
|
23 | + if (count($output)) |
|
24 | 24 | { |
25 | - foreach($output as $key => $val) |
|
25 | + foreach ($output as $key => $val) |
|
26 | 26 | { |
27 | - if(!$key) Context::set('total_counter', $val); |
|
28 | - elseif($key == date("Ymd")) Context::set('today_counter', $val); |
|
27 | + if (!$key) Context::set('total_counter', $val); |
|
28 | + elseif ($key == date("Ymd")) Context::set('today_counter', $val); |
|
29 | 29 | else Context::set('yesterday_counter', $val); |
30 | 30 | } |
31 | 31 | } |
@@ -24,9 +24,13 @@ |
||
24 | 24 | { |
25 | 25 | foreach($output as $key => $val) |
26 | 26 | { |
27 | - if(!$key) Context::set('total_counter', $val); |
|
28 | - elseif($key == date("Ymd")) Context::set('today_counter', $val); |
|
29 | - else Context::set('yesterday_counter', $val); |
|
27 | + if(!$key) { |
|
28 | + Context::set('total_counter', $val); |
|
29 | + } elseif($key == date("Ymd")) { |
|
30 | + Context::set('today_counter', $val); |
|
31 | + } else { |
|
32 | + Context::set('yesterday_counter', $val); |
|
33 | + } |
|
30 | 34 | } |
31 | 35 | } |
32 | 36 | // Set a path of the template skin (values of skin, colorset settings) |