GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( 2d3f88...cfd273 )
by gyeong-won
07:52
created
modules/rss/rss.admin.view.php 2 patches
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,9 +44,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,25 +28,25 @@  discard block
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
modules/rss/rss.model.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
modules/session/session.admin.controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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 */
Please login to merge, or discard this patch.
modules/session/session.controller.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +11 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
modules/trash/model/TrashVO.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
modules/trash/trash.model.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
modules/widget/widget.admin.view.php 2 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
modules/widget/widget.model.php 2 patches
Braces   +74 added lines, -27 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 	function getWidgetPath($widget_name)
22 22
 	{
23 23
 		$path = sprintf('./widgets/%s/', $widget_name);
24
-		if(is_dir($path)) return $path;
24
+		if(is_dir($path)) {
25
+			return $path;
26
+		}
25 27
 
26 28
 		return "";
27 29
 	}
@@ -32,7 +34,9 @@  discard block
 block discarded – undo
32 34
 	function getWidgetStylePath($widgetStyle_name)
33 35
 	{
34 36
 		$path = sprintf('./widgetstyles/%s/', $widgetStyle_name);
35
-		if(is_dir($path)) return $path;
37
+		if(is_dir($path)) {
38
+			return $path;
39
+		}
36 40
 
37 41
 		return "";
38 42
 	}
@@ -58,7 +62,9 @@  discard block
 block discarded – undo
58 62
 		// 've Downloaded the widget and the widget's list of installed Wanted
59 63
 		$searched_list = FileHandler::readDir('./widgets');
60 64
 		$searched_count = count($searched_list);
61
-		if(!$searched_count) return;
65
+		if(!$searched_count) {
66
+			return;
67
+		}
62 68
 		sort($searched_list);
63 69
 		// D which pertain to the list of widgets loop spins return statement review the information you need
64 70
 		for($i=0;$i<$searched_count;$i++)
@@ -101,7 +107,9 @@  discard block
 block discarded – undo
101 107
 		// 've Downloaded the widget and the widget's list of installed Wanted
102 108
 		$searched_list = FileHandler::readDir('./widgetstyles');
103 109
 		$searched_count = count($searched_list);
104
-		if(!$searched_count) return;
110
+		if(!$searched_count) {
111
+			return;
112
+		}
105 113
 		sort($searched_list);
106 114
 		// D which pertain to the list of widgets loop spins return statement review the information you need
107 115
 		for($i=0;$i<$searched_count;$i++)
@@ -124,10 +132,14 @@  discard block
 block discarded – undo
124 132
 	{
125 133
 		// Get a path of the requested module. Return if not exists.
126 134
 		$widget_path = $this->getWidgetPath($widget);
127
-		if(!$widget_path) return;
135
+		if(!$widget_path) {
136
+			return;
137
+		}
128 138
 		// Read the xml file for module skin information
129 139
 		$xml_file = sprintf("%sconf/info.xml", $widget_path);
130
-		if(!file_exists($xml_file)) return;
140
+		if(!file_exists($xml_file)) {
141
+			return;
142
+		}
131 143
 		// If the problem by comparing the cache file and include the return variable $widget_info
132 144
 		$cache_file = sprintf(_XE_PATH_ . 'files/cache/widget/%s.%s.cache.php', $widget, Context::getLangType());
133 145
 
@@ -140,7 +152,9 @@  discard block
 block discarded – undo
140 152
 		$oXmlParser = new XmlParser();
141 153
 		$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
142 154
 		$xml_obj = $tmp_xml_obj->widget;
143
-		if(!$xml_obj) return;
155
+		if(!$xml_obj) {
156
+			return;
157
+		}
144 158
 
145 159
 		$buff = '$widget_info = new stdClass;';
146 160
 
@@ -161,8 +175,11 @@  discard block
 block discarded – undo
161 175
 			$buff .= sprintf('$widget_info->widget_srl = $widget_srl;');
162 176
 			$buff .= sprintf('$widget_info->widget_title = $widget_title;');
163 177
 			// Author information
164
-			if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
165
-			else $author_list = $xml_obj->author;
178
+			if(!is_array($xml_obj->author)) {
179
+				$author_list[] = $xml_obj->author;
180
+			} else {
181
+				$author_list = $xml_obj->author;
182
+			}
166 183
 
167 184
 			for($i=0; $i < count($author_list); $i++)
168 185
 			{
@@ -171,8 +188,7 @@  discard block
 block discarded – undo
171 188
 				$buff .= sprintf('$widget_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address);
172 189
 				$buff .= sprintf('$widget_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
173 190
 			}
174
-		}
175
-		else
191
+		} else
176 192
 		{
177 193
 			// Title of the widget, version
178 194
 			$buff .= sprintf('$widget_info->widget = "%s";', $widget);
@@ -193,12 +209,18 @@  discard block
 block discarded – undo
193 209
 		}
194 210
 		// Extra vars (user defined variables to use in a template)
195 211
 		$extra_var_groups = $xml_obj->extra_vars->group;
196
-		if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
197
-		if(!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
212
+		if(!$extra_var_groups) {
213
+			$extra_var_groups = $xml_obj->extra_vars;
214
+		}
215
+		if(!is_array($extra_var_groups)) {
216
+			$extra_var_groups = array($extra_var_groups);
217
+		}
198 218
 		foreach($extra_var_groups as $group)
199 219
 		{
200 220
 			$extra_vars = $group->var;
201
-			if(!is_array($group->var)) $extra_vars = array($group->var);
221
+			if(!is_array($group->var)) {
222
+				$extra_vars = array($group->var);
223
+			}
202 224
 
203 225
 			if($extra_vars[0]->attrs->id || $extra_vars[0]->attrs->name)
204 226
 			{
@@ -228,9 +250,13 @@  discard block
 block discarded – undo
228 250
 					$buff .= sprintf('$widget_info->extra_var->%s->description = "%s";', $id, str_replace('"','\"',$var->description->body));
229 251
 
230 252
 					$options = $var->options;
231
-					if(!$options) continue;
253
+					if(!$options) {
254
+						continue;
255
+					}
232 256
 
233
-					if(!is_array($options)) $options = array($options);
257
+					if(!is_array($options)) {
258
+						$options = array($options);
259
+					}
234 260
 					$options_count = count($options);
235 261
 					for($j=0;$j<$options_count;$j++)
236 262
 					{
@@ -253,7 +279,9 @@  discard block
 block discarded – undo
253 279
 		$buff = '<?php if(!defined("__XE__")) exit(); '.$buff.' ?>';
254 280
 		FileHandler::writeFile($cache_file, $buff);
255 281
 
256
-		if(file_exists($cache_file)) @include($cache_file);
282
+		if(file_exists($cache_file)) {
283
+			@include($cache_file);
284
+		}
257 285
 		return $widget_info;
258 286
 	}
259 287
 
@@ -264,9 +292,13 @@  discard block
 block discarded – undo
264 292
 	function getWidgetStyleInfo($widgetStyle)
265 293
 	{
266 294
 		$widgetStyle_path = $this->getWidgetStylePath($widgetStyle);
267
-		if(!$widgetStyle_path) return;
295
+		if(!$widgetStyle_path) {
296
+			return;
297
+		}
268 298
 		$xml_file = sprintf("%sskin.xml", $widgetStyle_path);
269
-		if(!file_exists($xml_file)) return;
299
+		if(!file_exists($xml_file)) {
300
+			return;
301
+		}
270 302
 		// If the problem by comparing the cache file and include the return variable $widgetStyle_info
271 303
 		$cache_file = sprintf(_XE_PATH_ . 'files/cache/widgetstyles/%s.%s.cache.php', $widgetStyle, Context::getLangType());
272 304
 
@@ -279,7 +311,9 @@  discard block
 block discarded – undo
279 311
 		$oXmlParser = new XmlParser();
280 312
 		$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
281 313
 		$xml_obj = $tmp_xml_obj->widgetstyle;
282
-		if(!$xml_obj) return;
314
+		if(!$xml_obj) {
315
+			return;
316
+		}
283 317
 
284 318
 		$buff = array();
285 319
 		$buff[] = '<?php if(!defined("__XE__")) exit();';
@@ -299,13 +333,20 @@  discard block
 block discarded – undo
299 333
 		$buff[] = sprintf('$widgetStyle_info->license_link = "%s";', $xml_obj->license->attrs->link);
300 334
 
301 335
 		// preview
302
-		if(!$xml_obj->preview->body) $xml_obj->preview->body = 'preview.jpg';
336
+		if(!$xml_obj->preview->body) {
337
+			$xml_obj->preview->body = 'preview.jpg';
338
+		}
303 339
 		$preview_file = sprintf("%s%s", $widgetStyle_path,$xml_obj->preview->body);
304
-		if(file_exists($preview_file)) $buff[] = sprintf('$widgetStyle_info->preview = "%s";', $preview_file);
340
+		if(file_exists($preview_file)) {
341
+			$buff[] = sprintf('$widgetStyle_info->preview = "%s";', $preview_file);
342
+		}
305 343
 
306 344
 		// Author information
307
-		if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
308
-		else $author_list = $xml_obj->author;
345
+		if(!is_array($xml_obj->author)) {
346
+			$author_list[] = $xml_obj->author;
347
+		} else {
348
+			$author_list = $xml_obj->author;
349
+		}
309 350
 
310 351
 		foreach($author_list as $idx => $author)
311 352
 		{
@@ -317,8 +358,12 @@  discard block
 block discarded – undo
317 358
 
318 359
 		// Extra vars (user defined variables to use in a template)
319 360
 		$extra_var_groups = $xml_obj->extra_vars->group;
320
-		if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
321
-		if(!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
361
+		if(!$extra_var_groups) {
362
+			$extra_var_groups = $xml_obj->extra_vars;
363
+		}
364
+		if(!is_array($extra_var_groups)) {
365
+			$extra_var_groups = array($extra_var_groups);
366
+		}
322 367
 
323 368
 		$extra_var_count = 0;
324 369
 		$buff[] = sprintf('$widgetStyle_info->extra_var = new stdClass();', $extra_var_count);
@@ -362,7 +407,9 @@  discard block
 block discarded – undo
362 407
 
363 408
 		FileHandler::writeFile($cache_file, implode(PHP_EOL, $buff));
364 409
 
365
-		if(file_exists($cache_file)) @include($cache_file);
410
+		if(file_exists($cache_file)) {
411
+			@include($cache_file);
412
+		}
366 413
 
367 414
 		return $widgetStyle_info;
368 415
 	}
Please login to merge, or discard this patch.
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	function getWidgetPath($widget_name)
22 22
 	{
23 23
 		$path = sprintf('./widgets/%s/', $widget_name);
24
-		if(is_dir($path)) return $path;
24
+		if (is_dir($path)) return $path;
25 25
 
26 26
 		return "";
27 27
 	}
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	function getWidgetStylePath($widgetStyle_name)
33 33
 	{
34 34
 		$path = sprintf('./widgetstyles/%s/', $widgetStyle_name);
35
-		if(is_dir($path)) return $path;
35
+		if (is_dir($path)) return $path;
36 36
 
37 37
 		return "";
38 38
 	}
@@ -58,17 +58,17 @@  discard block
 block discarded – undo
58 58
 		// 've Downloaded the widget and the widget's list of installed Wanted
59 59
 		$searched_list = FileHandler::readDir('./widgets');
60 60
 		$searched_count = count($searched_list);
61
-		if(!$searched_count) return;
61
+		if (!$searched_count) return;
62 62
 		sort($searched_list);
63 63
 		// D which pertain to the list of widgets loop spins return statement review the information you need
64
-		for($i=0;$i<$searched_count;$i++)
64
+		for ($i = 0; $i < $searched_count; $i++)
65 65
 		{
66 66
 			// The name of the widget
67 67
 			$widget = $searched_list[$i];
68 68
 			// Wanted information on the Widget
69 69
 			$widget_info = $this->getWidgetInfo($widget);
70 70
 
71
-			if(!$widget_info)
71
+			if (!$widget_info)
72 72
 			{
73 73
 				$widget_info = new stdClass();
74 74
 			}
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
 		// 've Downloaded the widget and the widget's list of installed Wanted
102 102
 		$searched_list = FileHandler::readDir('./widgetstyles');
103 103
 		$searched_count = count($searched_list);
104
-		if(!$searched_count) return;
104
+		if (!$searched_count) return;
105 105
 		sort($searched_list);
106 106
 		// D which pertain to the list of widgets loop spins return statement review the information you need
107
-		for($i=0;$i<$searched_count;$i++)
107
+		for ($i = 0; $i < $searched_count; $i++)
108 108
 		{
109 109
 			// The name of the widget
110 110
 			$widgetStyle = $searched_list[$i];
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
 	{
125 125
 		// Get a path of the requested module. Return if not exists.
126 126
 		$widget_path = $this->getWidgetPath($widget);
127
-		if(!$widget_path) return;
127
+		if (!$widget_path) return;
128 128
 		// Read the xml file for module skin information
129 129
 		$xml_file = sprintf("%sconf/info.xml", $widget_path);
130
-		if(!file_exists($xml_file)) return;
130
+		if (!file_exists($xml_file)) return;
131 131
 		// If the problem by comparing the cache file and include the return variable $widget_info
132
-		$cache_file = sprintf(_XE_PATH_ . 'files/cache/widget/%s.%s.cache.php', $widget, Context::getLangType());
132
+		$cache_file = sprintf(_XE_PATH_.'files/cache/widget/%s.%s.cache.php', $widget, Context::getLangType());
133 133
 
134
-		if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file))
134
+		if (file_exists($cache_file) && filemtime($cache_file) > filemtime($xml_file))
135 135
 		{
136 136
 			@include($cache_file);
137 137
 			return $widget_info;
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
 		$oXmlParser = new XmlParser();
141 141
 		$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
142 142
 		$xml_obj = $tmp_xml_obj->widget;
143
-		if(!$xml_obj) return;
143
+		if (!$xml_obj) return;
144 144
 
145 145
 		$buff = '$widget_info = new stdClass;';
146 146
 
147
-		if($xml_obj->version && $xml_obj->attrs->version == '0.2')
147
+		if ($xml_obj->version && $xml_obj->attrs->version == '0.2')
148 148
 		{
149 149
 			// Title of the widget, version
150 150
 			$buff .= sprintf('$widget_info->widget = "%s";', $widget);
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 			$buff .= sprintf('$widget_info->widget_srl = $widget_srl;');
162 162
 			$buff .= sprintf('$widget_info->widget_title = $widget_title;');
163 163
 			// Author information
164
-			if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
164
+			if (!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
165 165
 			else $author_list = $xml_obj->author;
166 166
 
167
-			for($i=0; $i < count($author_list); $i++)
167
+			for ($i = 0; $i < count($author_list); $i++)
168 168
 			{
169 169
 				$buff .= '$widget_info->author['.$i.'] = new stdClass;';
170 170
 				$buff .= sprintf('$widget_info->author['.$i.']->name = "%s";', $author_list[$i]->name->body);
@@ -193,29 +193,29 @@  discard block
 block discarded – undo
193 193
 		}
194 194
 		// Extra vars (user defined variables to use in a template)
195 195
 		$extra_var_groups = $xml_obj->extra_vars->group;
196
-		if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
197
-		if(!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
198
-		foreach($extra_var_groups as $group)
196
+		if (!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
197
+		if (!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
198
+		foreach ($extra_var_groups as $group)
199 199
 		{
200 200
 			$extra_vars = $group->var;
201
-			if(!is_array($group->var)) $extra_vars = array($group->var);
201
+			if (!is_array($group->var)) $extra_vars = array($group->var);
202 202
 
203
-			if($extra_vars[0]->attrs->id || $extra_vars[0]->attrs->name)
203
+			if ($extra_vars[0]->attrs->id || $extra_vars[0]->attrs->name)
204 204
 			{
205 205
 				$extra_var_count = count($extra_vars);
206 206
 
207 207
 				$buff .= sprintf('$widget_info->extra_var_count = "%s";', $extra_var_count);
208
-				for($i=0;$i<$extra_var_count;$i++)
208
+				for ($i = 0; $i < $extra_var_count; $i++)
209 209
 				{
210 210
 					unset($var);
211 211
 					unset($options);
212 212
 					$var = $extra_vars[$i];
213 213
 
214
-					$id = $var->attrs->id?$var->attrs->id:$var->attrs->name;
215
-					$name = $var->name->body?$var->name->body:$var->title->body;
216
-					$type = $var->attrs->type?$var->attrs->type:$var->type->body;
214
+					$id = $var->attrs->id ? $var->attrs->id : $var->attrs->name;
215
+					$name = $var->name->body ? $var->name->body : $var->title->body;
216
+					$type = $var->attrs->type ? $var->attrs->type : $var->type->body;
217 217
 					$buff .= sprintf('$widget_info->extra_var->%s = new stdClass;', $id);
218
-					if($type =='filebox')
218
+					if ($type == 'filebox')
219 219
 					{
220 220
 						$buff .= sprintf('$widget_info->extra_var->%s->filter = "%s";', $id, $var->type->attrs->filter);
221 221
 						$buff .= sprintf('$widget_info->extra_var->%s->allow_multiple = "%s";', $id, $var->type->attrs->allow_multiple);
@@ -225,23 +225,23 @@  discard block
 block discarded – undo
225 225
 					$buff .= sprintf('$widget_info->extra_var->%s->name = "%s";', $id, $name);
226 226
 					$buff .= sprintf('$widget_info->extra_var->%s->type = "%s";', $id, $type);
227 227
 					$buff .= sprintf('$widget_info->extra_var->%s->value = $vars->%s;', $id, $id);
228
-					$buff .= sprintf('$widget_info->extra_var->%s->description = "%s";', $id, str_replace('"','\"',$var->description->body));
228
+					$buff .= sprintf('$widget_info->extra_var->%s->description = "%s";', $id, str_replace('"', '\"', $var->description->body));
229 229
 
230 230
 					$options = $var->options;
231
-					if(!$options) continue;
231
+					if (!$options) continue;
232 232
 
233
-					if(!is_array($options)) $options = array($options);
233
+					if (!is_array($options)) $options = array($options);
234 234
 					$options_count = count($options);
235
-					for($j=0;$j<$options_count;$j++)
235
+					for ($j = 0; $j < $options_count; $j++)
236 236
 					{
237 237
 						$buff .= sprintf('$widget_info->extra_var->%s->options["%s"] = "%s";', $id, $options[$j]->value->body, $options[$j]->name->body);
238 238
 
239
-						if($options[$j]->attrs->default && $options[$j]->attrs->default=='true')
239
+						if ($options[$j]->attrs->default && $options[$j]->attrs->default == 'true')
240 240
 						{
241 241
 							$buff .= sprintf('$widget_info->extra_var->%s->default_options["%s"] = true;', $id, $options[$j]->value->body);
242 242
 						}
243 243
 
244
-						if($options[$j]->attrs->init && $options[$j]->attrs->init=='true')
244
+						if ($options[$j]->attrs->init && $options[$j]->attrs->init == 'true')
245 245
 						{
246 246
 							$buff .= sprintf('$widget_info->extra_var->%s->init_options["%s"] = true;', $id, $options[$j]->value->body);
247 247
 						}
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 		$buff = '<?php if(!defined("__XE__")) exit(); '.$buff.' ?>';
254 254
 		FileHandler::writeFile($cache_file, $buff);
255 255
 
256
-		if(file_exists($cache_file)) @include($cache_file);
256
+		if (file_exists($cache_file)) @include($cache_file);
257 257
 		return $widget_info;
258 258
 	}
259 259
 
@@ -264,13 +264,13 @@  discard block
 block discarded – undo
264 264
 	function getWidgetStyleInfo($widgetStyle)
265 265
 	{
266 266
 		$widgetStyle_path = $this->getWidgetStylePath($widgetStyle);
267
-		if(!$widgetStyle_path) return;
267
+		if (!$widgetStyle_path) return;
268 268
 		$xml_file = sprintf("%sskin.xml", $widgetStyle_path);
269
-		if(!file_exists($xml_file)) return;
269
+		if (!file_exists($xml_file)) return;
270 270
 		// If the problem by comparing the cache file and include the return variable $widgetStyle_info
271
-		$cache_file = sprintf(_XE_PATH_ . 'files/cache/widgetstyles/%s.%s.cache.php', $widgetStyle, Context::getLangType());
271
+		$cache_file = sprintf(_XE_PATH_.'files/cache/widgetstyles/%s.%s.cache.php', $widgetStyle, Context::getLangType());
272 272
 
273
-		if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file))
273
+		if (file_exists($cache_file) && filemtime($cache_file) > filemtime($xml_file))
274 274
 		{
275 275
 			@include($cache_file);
276 276
 			return $widgetStyle_info;
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		$oXmlParser = new XmlParser();
280 280
 		$tmp_xml_obj = $oXmlParser->loadXmlFile($xml_file);
281 281
 		$xml_obj = $tmp_xml_obj->widgetstyle;
282
-		if(!$xml_obj) return;
282
+		if (!$xml_obj) return;
283 283
 
284 284
 		$buff = array();
285 285
 		$buff[] = '<?php if(!defined("__XE__")) exit();';
@@ -299,15 +299,15 @@  discard block
 block discarded – undo
299 299
 		$buff[] = sprintf('$widgetStyle_info->license_link = "%s";', $xml_obj->license->attrs->link);
300 300
 
301 301
 		// preview
302
-		if(!$xml_obj->preview->body) $xml_obj->preview->body = 'preview.jpg';
303
-		$preview_file = sprintf("%s%s", $widgetStyle_path,$xml_obj->preview->body);
304
-		if(file_exists($preview_file)) $buff[] = sprintf('$widgetStyle_info->preview = "%s";', $preview_file);
302
+		if (!$xml_obj->preview->body) $xml_obj->preview->body = 'preview.jpg';
303
+		$preview_file = sprintf("%s%s", $widgetStyle_path, $xml_obj->preview->body);
304
+		if (file_exists($preview_file)) $buff[] = sprintf('$widgetStyle_info->preview = "%s";', $preview_file);
305 305
 
306 306
 		// Author information
307
-		if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
307
+		if (!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
308 308
 		else $author_list = $xml_obj->author;
309 309
 
310
-		foreach($author_list as $idx => $author)
310
+		foreach ($author_list as $idx => $author)
311 311
 		{
312 312
 			$buff[] = sprintf('$widgetStyle_info->author[%d] = new stdClass();', $idx);
313 313
 			$buff[] = sprintf('$widgetStyle_info->author[%d]->name = "%s";', $idx, $author->name->body);
@@ -317,18 +317,18 @@  discard block
 block discarded – undo
317 317
 
318 318
 		// Extra vars (user defined variables to use in a template)
319 319
 		$extra_var_groups = $xml_obj->extra_vars->group;
320
-		if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
321
-		if(!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
320
+		if (!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
321
+		if (!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
322 322
 
323 323
 		$extra_var_count = 0;
324 324
 		$buff[] = sprintf('$widgetStyle_info->extra_var = new stdClass();', $extra_var_count);
325
-		foreach($extra_var_groups as $group)
325
+		foreach ($extra_var_groups as $group)
326 326
 		{
327 327
 			$extra_vars = (!is_array($group->var)) ? array($group->var) : $group->var;
328 328
 
329
-			if($extra_vars[0]->attrs->id || $extra_vars[0]->attrs->name)
329
+			if ($extra_vars[0]->attrs->id || $extra_vars[0]->attrs->name)
330 330
 			{
331
-				foreach($extra_vars as $var)
331
+				foreach ($extra_vars as $var)
332 332
 				{
333 333
 					$extra_var_count++;
334 334
 					$id = ($var->attrs->id) ? $var->attrs->id : $var->attrs->name;
@@ -339,18 +339,18 @@  discard block
 block discarded – undo
339 339
 					$buff[] = sprintf('$widgetStyle_info->extra_var->%s->group = "%s";', $id, $group->title->body);
340 340
 					$buff[] = sprintf('$widgetStyle_info->extra_var->%s->name = "%s";', $id, $name);
341 341
 					$buff[] = sprintf('$widgetStyle_info->extra_var->%s->type = "%s";', $id, $type);
342
-					if($type =='filebox')
342
+					if ($type == 'filebox')
343 343
 					{
344 344
 						$buff[] = sprintf('$widgetStyle_info->extra_var->%s->filter = "%s";', $id, $var->attrs->filter);
345 345
 						$buff[] = sprintf('$widgetStyle_info->extra_var->%s->allow_multiple = "%s";', $id, $var->attrs->allow_multiple);
346 346
 					}
347 347
 					$buff[] = sprintf('$widgetStyle_info->extra_var->%s->value = $vars->%s;', $id, $id);
348
-					$buff[] = sprintf('$widgetStyle_info->extra_var->%s->description = "%s";', $id, str_replace('"','\"',$var->description->body));
348
+					$buff[] = sprintf('$widgetStyle_info->extra_var->%s->description = "%s";', $id, str_replace('"', '\"', $var->description->body));
349 349
 
350
-					if($var->options)
350
+					if ($var->options)
351 351
 					{
352 352
 						$var_options = (!is_array($var->options)) ? array($var->options) : $var->options;
353
-						foreach($var_options as $option_item)
353
+						foreach ($var_options as $option_item)
354 354
 						{
355 355
 							$buff[] = sprintf('$widgetStyle_info->extra_var->%s->options["%s"] = "%s";', $id, $option_item->value->body, $option_item->name->body);
356 356
 						}
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 
363 363
 		FileHandler::writeFile($cache_file, implode(PHP_EOL, $buff));
364 364
 
365
-		if(file_exists($cache_file)) @include($cache_file);
365
+		if (file_exists($cache_file)) @include($cache_file);
366 366
 
367 367
 		return $widgetStyle_info;
368 368
 	}
Please login to merge, or discard this patch.
modules/widget/widget.view.php 2 patches
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.