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
Pull Request — master (#1976)
by
unknown
10:37
created
addons/mobile/classes/hdml.class.php 2 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@  discard block
 block discarded – undo
40 40
 	 **/
41 41
 	function printTitle()
42 42
 	{
43
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
43
+		if($this->totalPage > $this->mobilePage) {
44
+			$titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
45
+		}
44 46
 		printf('<b>&lt;%s%s&gt;%s', $this->title,$titlePageStr,"\n");
45 47
 	}
46 48
 
@@ -54,11 +56,12 @@  discard block
 block discarded – undo
54 56
 		{
55 57
 			foreach($this->getChilds() as $key => $val)
56 58
 			{
57
-				if(!$val['link']) continue;
59
+				if(!$val['link']) {
60
+					continue;
61
+				}
58 62
 				printf('<ce task=go label="%s" dest="%s">%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n");
59 63
 			}
60
-		}
61
-		else
64
+		} else
62 65
 		{
63 66
 			printf('<wrap>%s<br>%s', $this->getContent(),"\n");
64 67
 		} 
@@ -88,8 +91,7 @@  discard block
 block discarded – undo
88 91
 				printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
89 92
 			}
90 93
 			// Content Types
91
-		}
92
-		else
94
+		} else
93 95
 		{
94 96
 			if($this->nextUrl)
95 97
 			{
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 
26 26
 		print '<hdml version=3.0 ttl=0 markable=true>';
27 27
 		print "\n";
28
-		print $this->hasChilds()?'<choice name=main>':'<display>';
28
+		print $this->hasChilds() ? '<choice name=main>' : '<display>';
29 29
 		print "\n";
30 30
 
31
-		if($this->upperUrl)
31
+		if ($this->upperUrl)
32 32
 		{
33 33
 			$url = $this->upperUrl;
34 34
 			printf('<action type=soft1 task=go dest="%s" label="%s">%s', $url->url, $url->text, "\n");
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	 **/
41 41
 	function printTitle()
42 42
 	{
43
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
44
-		printf('<b>&lt;%s%s&gt;%s', $this->title,$titlePageStr,"\n");
43
+		if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage);
44
+		printf('<b>&lt;%s%s&gt;%s', $this->title, $titlePageStr, "\n");
45 45
 	}
46 46
 
47 47
 	/**
@@ -50,17 +50,17 @@  discard block
 block discarded – undo
50 50
 	 **/
51 51
 	function printContent()
52 52
 	{
53
-		if($this->hasChilds())
53
+		if ($this->hasChilds())
54 54
 		{
55
-			foreach($this->getChilds() as $key => $val)
55
+			foreach ($this->getChilds() as $key => $val)
56 56
 			{
57
-				if(!$val['link']) continue;
58
-				printf('<ce task=go label="%s" dest="%s">%s%s',Context::getLang('cmd_select'), $val['href'], $val['text'], "\n");
57
+				if (!$val['link']) continue;
58
+				printf('<ce task=go label="%s" dest="%s">%s%s', Context::getLang('cmd_select'), $val['href'], $val['text'], "\n");
59 59
 			}
60 60
 		}
61 61
 		else
62 62
 		{
63
-			printf('<wrap>%s<br>%s', $this->getContent(),"\n");
63
+			printf('<wrap>%s<br>%s', $this->getContent(), "\n");
64 64
 		} 
65 65
 	}
66 66
 
@@ -70,19 +70,19 @@  discard block
 block discarded – undo
70 70
 	function printBtn()
71 71
 	{
72 72
 		// Menu Types
73
-		if($this->hasChilds())
73
+		if ($this->hasChilds())
74 74
 		{
75
-			if($this->nextUrl)
75
+			if ($this->nextUrl)
76 76
 			{
77 77
 				$url = $this->nextUrl;
78 78
 				printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
79 79
 			}
80
-			if($this->prevUrl)
80
+			if ($this->prevUrl)
81 81
 			{
82 82
 				$url = $this->prevUrl;
83 83
 				printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
84 84
 			}
85
-			if($this->homeUrl)
85
+			if ($this->homeUrl)
86 86
 			{
87 87
 				$url = $this->homeUrl;
88 88
 				printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
 		}
92 92
 		else
93 93
 		{
94
-			if($this->nextUrl)
94
+			if ($this->nextUrl)
95 95
 			{
96 96
 				$url = $this->nextUrl;
97 97
 				printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
98 98
 			}
99
-			if($this->prevUrl)
99
+			if ($this->prevUrl)
100 100
 			{
101 101
 				$url = $this->prevUrl;
102 102
 				printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
103 103
 			}
104
-			if($this->homeUrl)
104
+			if ($this->homeUrl)
105 105
 			{
106 106
 				$url = $this->homeUrl;
107 107
 				printf('<a task=gosub label="%s" dest="%s">%s</a>', $url->text, $url->url, $url->text);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 **/
115 115
 	function printFooter()
116 116
 	{
117
-		print $this->hasChilds()?'</choice>':'</display>';
117
+		print $this->hasChilds() ? '</choice>' : '</display>';
118 118
 		print "\n";
119 119
 		print("</hdml>");
120 120
 	}
Please login to merge, or discard this patch.
addons/mobile/classes/mhtml.class.php 2 patches
Braces   +14 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,13 +20,17 @@  discard block
 block discarded – undo
20 20
 	function printHeader()
21 21
 	{
22 22
 		print("<html><head>\n");
23
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
23
+		if($this->totalPage > $this->mobilePage) {
24
+			$titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
25
+		}
24 26
 		printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
25 27
 	}
26 28
 	// Output title
27 29
 	function printTitle()
28 30
 	{
29
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
31
+		if($this->totalPage > $this->mobilePage) {
32
+			$titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
33
+		}
30 34
 		printf('&lt;%s%s&gt;<br>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n");
31 35
 	}
32 36
 
@@ -40,12 +44,15 @@  discard block
 block discarded – undo
40 44
 		{
41 45
 			foreach($this->getChilds() as $key => $val)
42 46
 			{
43
-				if(!$val['link']) continue;
47
+				if(!$val['link']) {
48
+					continue;
49
+				}
44 50
 				printf('<a href="%s" accesskey="%s">%s</a><br>%s', $val['href'], $this->getNo(), $val['text'], "\n");
45
-				if($val['extra']) printf("<br>%s\n",str_replace('<br/>','<br>',$val['extra']));
51
+				if($val['extra']) {
52
+					printf("<br>%s\n",str_replace('<br/>','<br>',$val['extra']));
53
+				}
46 54
 			}
47
-		}
48
-		else
55
+		} else
49 56
 		{
50 57
 			print(str_replace('<br/>','<br>',$this->getContent())."\n");
51 58
 		}
@@ -72,8 +79,7 @@  discard block
 block discarded – undo
72 79
 		{
73 80
 			$url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
74 81
 			printf('<a href="%s">%s</a><br>%s', $url, 'Language : '.Context::getLang('select_lang'), "\n");
75
-		}
76
-		else
82
+		} else
77 83
 		{
78 84
 			printf('<a href="%s">%s</a><br>%s', Context::get('return_uri'), Context::getLang('lang_return'), "\n");
79 85
 		}
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 	function printHeader()
21 21
 	{
22 22
 		print("<html><head>\n");
23
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
24
-		printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
23
+		if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage);
24
+		printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
25 25
 	}
26 26
 	// Output title
27 27
 	function printTitle()
28 28
 	{
29
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
30
-		printf('&lt;%s%s&gt;<br>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n");
29
+		if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage);
30
+		printf('&lt;%s%s&gt;<br>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), "\n");
31 31
 	}
32 32
 
33 33
 	/**
@@ -36,18 +36,18 @@  discard block
 block discarded – undo
36 36
 	 **/
37 37
 	function printContent()
38 38
 	{
39
-		if($this->hasChilds())
39
+		if ($this->hasChilds())
40 40
 		{
41
-			foreach($this->getChilds() as $key => $val)
41
+			foreach ($this->getChilds() as $key => $val)
42 42
 			{
43
-				if(!$val['link']) continue;
43
+				if (!$val['link']) continue;
44 44
 				printf('<a href="%s" accesskey="%s">%s</a><br>%s', $val['href'], $this->getNo(), $val['text'], "\n");
45
-				if($val['extra']) printf("<br>%s\n",str_replace('<br/>','<br>',$val['extra']));
45
+				if ($val['extra']) printf("<br>%s\n", str_replace('<br/>', '<br>', $val['extra']));
46 46
 			}
47 47
 		}
48 48
 		else
49 49
 		{
50
-			print(str_replace('<br/>','<br>',$this->getContent())."\n");
50
+			print(str_replace('<br/>', '<br>', $this->getContent())."\n");
51 51
 		}
52 52
 		print "<hr><br>";
53 53
 	}
@@ -57,32 +57,32 @@  discard block
 block discarded – undo
57 57
 	 **/
58 58
 	function printBtn()
59 59
 	{
60
-		if($this->nextUrl)
60
+		if ($this->nextUrl)
61 61
 		{
62 62
 			$url = $this->nextUrl;
63 63
 			printf('<a href="%s">%s</a><br>%s', $url->url, $url->text, "\n");
64 64
 		}
65
-		if($this->prevUrl)
65
+		if ($this->prevUrl)
66 66
 		{
67 67
 			$url = $this->prevUrl;
68 68
 			printf('<a href="%s">%s</a><br>%s', $url->url, $url->text, "\n");
69 69
 		}
70 70
 		// Select Language
71
-		if(!parent::isLangChange())
71
+		if (!parent::isLangChange())
72 72
 		{
73
-			$url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
73
+			$url = getUrl('', 'lcm', '1', 'sel_lang', Context::getLangType(), 'return_uri', Context::get('current_url'));
74 74
 			printf('<a href="%s">%s</a><br>%s', $url, 'Language : '.Context::getLang('select_lang'), "\n");
75 75
 		}
76 76
 		else
77 77
 		{
78 78
 			printf('<a href="%s">%s</a><br>%s', Context::get('return_uri'), Context::getLang('lang_return'), "\n");
79 79
 		}
80
-		if($this->upperUrl)
80
+		if ($this->upperUrl)
81 81
 		{
82 82
 			$url = $this->upperUrl;
83 83
 			printf('<btn href="%s" name="%s">%s', $url->url, $url->text, "\n");
84 84
 		}
85
-		if($this->homeUrl)
85
+		if ($this->homeUrl)
86 86
 		{
87 87
 			$url = $this->homeUrl;
88 88
 			printf('<a btn="%s" href="%s">%s</a><br>%s', $url->text, $url->url, $url->text, "\n");
Please login to merge, or discard this patch.
addons/mobile/classes/wml.class.php 2 patches
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@  discard block
 block discarded – undo
20 20
 	{
21 21
 		header("Content-Type: text/vnd.wap.wml");
22 22
 		header("charset: ".$this->charset);
23
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
23
+		if($this->totalPage > $this->mobilePage) {
24
+			$titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
25
+		}
24 26
 		print("<?xml version=\"1.0\" encoding=\"".$this->charset."\"?><!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
25 27
 		// Card Title
26 28
 		printf("<wml>\n<card title=\"%s%s\">\n<p>\n",htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
@@ -31,7 +33,9 @@  discard block
 block discarded – undo
31 33
 	 */
32 34
 	function printTitle()
33 35
 	{
34
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
36
+		if($this->totalPage > $this->mobilePage) {
37
+			$titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
38
+		}
35 39
 		printf('&lt;%s%s&gt;<br/>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n");
36 40
 	}
37 41
 
@@ -45,12 +49,15 @@  discard block
 block discarded – undo
45 49
 		{
46 50
 			foreach($this->getChilds() as $key => $val)
47 51
 			{
48
-				if(!$val['link']) continue;
52
+				if(!$val['link']) {
53
+					continue;
54
+				}
49 55
 				printf('<do type="%s" label="%s"><go href="%s" /></do>%s', $this->getNo(), htmlspecialchars($val['text'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false), $val['href'], "\n");
50
-				if($val['extra']) printf("%s\n",$val['extra']);
56
+				if($val['extra']) {
57
+					printf("%s\n",$val['extra']);
58
+				}
51 59
 			}
52
-		}
53
-		else
60
+		} else
54 61
 		{
55 62
 			printf('%s<br/>%s', str_replace("<br>","<br/>",$this->getContent()),"\n");
56 63
 		}
@@ -88,8 +95,7 @@  discard block
 block discarded – undo
88 95
 		{
89 96
 			$url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
90 97
 			printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', 'Language : '.Context::getLang('select_lang'), $url, "\n");
91
-		}
92
-		else
98
+		} else
93 99
 		{
94 100
 			printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', Context::getLang('lang_return'), Context::get('return_uri'), "\n");
95 101
 		}
@@ -115,8 +121,7 @@  discard block
 block discarded – undo
115 121
 		if(Context::get('mobile_skt')==1)
116 122
 		{
117 123
 			return "vnd.skmn".parent::getNo();
118
-		}
119
-		else
124
+		} else
120 125
 		{
121 126
 			return parent::getNo();
122 127
 		}
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	{
21 21
 		header("Content-Type: text/vnd.wap.wml");
22 22
 		header("charset: ".$this->charset);
23
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
23
+		if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage);
24 24
 		print("<?xml version=\"1.0\" encoding=\"".$this->charset."\"?><!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
25 25
 		// Card Title
26
-		printf("<wml>\n<card title=\"%s%s\">\n<p>\n",htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
26
+		printf("<wml>\n<card title=\"%s%s\">\n<p>\n", htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
27 27
 	}
28 28
 
29 29
 	/**
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	 */
32 32
 	function printTitle()
33 33
 	{
34
-		if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
35
-		printf('&lt;%s%s&gt;<br/>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false),"\n");
34
+		if ($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)", $this->mobilePage, $this->totalPage);
35
+		printf('&lt;%s%s&gt;<br/>%s', htmlspecialchars($this->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), htmlspecialchars($titlePageStr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false), "\n");
36 36
 	}
37 37
 
38 38
 	/**
@@ -41,18 +41,18 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	function printContent()
43 43
 	{
44
-		if($this->hasChilds())
44
+		if ($this->hasChilds())
45 45
 		{
46
-			foreach($this->getChilds() as $key => $val)
46
+			foreach ($this->getChilds() as $key => $val)
47 47
 			{
48
-				if(!$val['link']) continue;
48
+				if (!$val['link']) continue;
49 49
 				printf('<do type="%s" label="%s"><go href="%s" /></do>%s', $this->getNo(), htmlspecialchars($val['text'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false), $val['href'], "\n");
50
-				if($val['extra']) printf("%s\n",$val['extra']);
50
+				if ($val['extra']) printf("%s\n", $val['extra']);
51 51
 			}
52 52
 		}
53 53
 		else
54 54
 		{
55
-			printf('%s<br/>%s', str_replace("<br>","<br/>",$this->getContent()),"\n");
55
+			printf('%s<br/>%s', str_replace("<br>", "<br/>", $this->getContent()), "\n");
56 56
 		}
57 57
 		print('<br/>');
58 58
 	}
@@ -62,43 +62,43 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	function printBtn()
64 64
 	{
65
-		if($this->nextUrl)
65
+		if ($this->nextUrl)
66 66
 		{
67 67
 			$url = $this->nextUrl;
68 68
 			printf('<do type="vnd.next" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n");
69 69
 		}
70
-		if($this->prevUrl)
70
+		if ($this->prevUrl)
71 71
 		{
72 72
 			$url = $this->prevUrl;
73 73
 			printf('<do type="vnd.prev" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n");
74 74
 		}
75 75
 		// Others are not applicable in charge of the button output (array passed) type??
76
-		if($this->etcBtn)
76
+		if ($this->etcBtn)
77 77
 		{
78
-			if(is_array($this->etcBtn))
78
+			if (is_array($this->etcBtn))
79 79
 			{
80
-				foreach($this->etcBtn as $key=>$val)
80
+				foreach ($this->etcBtn as $key=>$val)
81 81
 				{
82 82
 					printf('<do type="vnd.btn%s" label="%s"><go href="%s"/></do>%s', $key, $val['text'], $val['url'], "\n");
83 83
 				}
84 84
 			}
85 85
 		}
86 86
 		// Select Language
87
-		if(!parent::isLangChange())
87
+		if (!parent::isLangChange())
88 88
 		{
89
-			$url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
89
+			$url = getUrl('', 'lcm', '1', 'sel_lang', Context::getLangType(), 'return_uri', Context::get('current_url'));
90 90
 			printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', 'Language : '.Context::getLang('select_lang'), $url, "\n");
91 91
 		}
92 92
 		else
93 93
 		{
94 94
 			printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', Context::getLang('lang_return'), Context::get('return_uri'), "\n");
95 95
 		}
96
-		if($this->homeUrl)
96
+		if ($this->homeUrl)
97 97
 		{
98 98
 			$url = $this->homeUrl;
99 99
 			printf('<do type="access" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n");
100 100
 		}
101
-		if($this->upperUrl)
101
+		if ($this->upperUrl)
102 102
 		{
103 103
 			$url = $this->upperUrl;
104 104
 			printf('<do type="vnd.up" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n");
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	// And returns a list of serial numbers in
113 113
 	function getNo()
114 114
 	{
115
-		if(Context::get('mobile_skt')==1)
115
+		if (Context::get('mobile_skt') == 1)
116 116
 		{
117 117
 			return "vnd.skmn".parent::getNo();
118 118
 		}
Please login to merge, or discard this patch.
addons/mobile/mobile.addon.php 2 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-if(!defined('__XE__'))
4
+if(!defined('__XE__')) {
5 5
 	exit();
6
+}
6 7
 
7 8
 /**
8 9
  * @file mobile.addon.php
@@ -66,8 +67,7 @@  discard block
 block discarded – undo
66 67
 		$oMobile->displayModuleContent();
67 68
 	}
68 69
 	// If neither navigation mode nor WAP class is, display the module's result
69
-}
70
-else if($called_position == 'after_module_proc')
70
+} else if($called_position == 'after_module_proc')
71 71
 {
72 72
 	// Display
73 73
 	$oMobile->displayContent();
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-if(!defined('__XE__'))
4
+if (!defined('__XE__'))
5 5
 	exit();
6 6
 
7 7
 /**
@@ -19,24 +19,24 @@  discard block
 block discarded – undo
19 19
  * Condition
20 20
  * */
21 21
 // Ignore admin page
22
-if(Context::get('module') == 'admin')
22
+if (Context::get('module') == 'admin')
23 23
 {
24 24
 	return;
25 25
 }
26 26
 // Manage when to call it
27
-if($called_position != 'before_module_proc' && $called_position != 'after_module_proc')
27
+if ($called_position != 'before_module_proc' && $called_position != 'after_module_proc')
28 28
 {
29 29
 	return;
30 30
 }
31 31
 // Ignore if not mobile browser
32
-require_once(_XE_PATH_ . 'addons/mobile/classes/mobile.class.php');
33
-if(!mobileXE::getBrowserType())
32
+require_once(_XE_PATH_.'addons/mobile/classes/mobile.class.php');
33
+if (!mobileXE::getBrowserType())
34 34
 {
35 35
 	return;
36 36
 }
37 37
 // Generate mobile instance
38 38
 $oMobile = &mobileXE::getInstance();
39
-if(!$oMobile)
39
+if (!$oMobile)
40 40
 {
41 41
 	return;
42 42
 }
@@ -48,15 +48,15 @@  discard block
 block discarded – undo
48 48
 $oMobile->setModuleInstance($this);
49 49
 
50 50
 // Extract content and display/exit if navigate mode is or if WAP class exists
51
-if($called_position == 'before_module_proc')
51
+if ($called_position == 'before_module_proc')
52 52
 {
53
-	if($oMobile->isLangChange())
53
+	if ($oMobile->isLangChange())
54 54
 	{
55 55
 		$oMobile->setLangType();
56 56
 		$oMobile->displayLangSelect();
57 57
 	}
58 58
 	// On navigation mode, display navigation content
59
-	if($oMobile->isNavigationMode())
59
+	if ($oMobile->isNavigationMode())
60 60
 	{
61 61
 		$oMobile->displayNavigationContent();
62 62
 	}
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	}
68 68
 	// If neither navigation mode nor WAP class is, display the module's result
69 69
 }
70
-else if($called_position == 'after_module_proc')
70
+else if ($called_position == 'after_module_proc')
71 71
 {
72 72
 	// Display
73 73
 	$oMobile->displayContent();
Please login to merge, or discard this patch.
addons/oembed/oembed.addon.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-if(!defined('__XE__'))
4
+if (!defined('__XE__'))
5 5
 {
6 6
 	exit();
7 7
 }
8 8
 
9
-if($called_position == 'after_module_proc' && Context::getResponseMethod() == 'HTML')
9
+if ($called_position == 'after_module_proc' && Context::getResponseMethod() == 'HTML')
10 10
 {
11 11
 	Context::loadFile('./addons/oembed/jquery.oembed.css');
12 12
 	Context::loadFile(array('./addons/oembed/jquery.oembed.js', 'body', '', null), true);
Please login to merge, or discard this patch.
addons/point_level_icon/point_level_icon.addon.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,8 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-if(!defined('__XE__'))
4
+if(!defined('__XE__')) {
5 5
 	exit();
6
+}
6 7
 
7 8
 /**
8 9
  * @file point.addon.php
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-if(!defined('__XE__'))
4
+if (!defined('__XE__'))
5 5
 	exit();
6 6
 
7 7
 /**
@@ -12,15 +12,15 @@  discard block
 block discarded – undo
12 12
  * Display point level icon before user name when point system is enabled.
13 13
  * */
14 14
 // return unless before_display_content
15
-if($called_position != "before_display_content" || Context::get('act') == 'dispPageAdminContentModify' || Context::getResponseMethod() != 'HTML' || isCrawler())
15
+if ($called_position != "before_display_content" || Context::get('act') == 'dispPageAdminContentModify' || Context::getResponseMethod() != 'HTML' || isCrawler())
16 16
 {
17 17
 	return;
18 18
 }
19 19
 
20
-require_once(_XE_PATH_ . 'addons/point_level_icon/point_level_icon.lib.php');
20
+require_once(_XE_PATH_.'addons/point_level_icon/point_level_icon.lib.php');
21 21
 
22 22
 $temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'pointLevelIconTrans', $output);
23
-if($temp_output)
23
+if ($temp_output)
24 24
 {
25 25
 	$output = $temp_output;
26 26
 }
Please login to merge, or discard this patch.
addons/resize_image/resize_image.addon.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-if(!defined('__XE__'))
4
+if (!defined('__XE__'))
5 5
 {
6 6
 	exit();
7 7
 }
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
  * @author NAVER ([email protected])
12 12
  * @brief Add-on to resize images in the body
13 13
  */
14
-if($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML" && !isCrawler())
14
+if ($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML" && !isCrawler())
15 15
 {
16
-	if(Mobile::isFromMobilePhone())
16
+	if (Mobile::isFromMobilePhone())
17 17
 	{
18 18
 		Context::loadFile('./addons/resize_image/css/resize_image.mobile.css', true);
19 19
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@
 block discarded – undo
16 16
 	if(Mobile::isFromMobilePhone())
17 17
 	{
18 18
 		Context::loadFile('./addons/resize_image/css/resize_image.mobile.css', true);
19
-	}
20
-	else
19
+	} else
21 20
 	{
22 21
 		Context::loadJavascriptPlugin('ui');
23 22
 		Context::loadFile(array('./addons/resize_image/js/resize_image.min.js', 'body', '', null), true);
Please login to merge, or discard this patch.
classes/cache/CacheHandler.class.php 3 patches
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -63,37 +63,30 @@
 block discarded – undo
63 63
 				if($info->use_object_cache == 'apc')
64 64
 				{
65 65
 					$type = 'apc';
66
-				}
67
-				else if(substr($info->use_object_cache, 0, 8) == 'memcache')
66
+				} else if(substr($info->use_object_cache, 0, 8) == 'memcache')
68 67
 				{
69 68
 					$type = 'memcache';
70 69
 					$url = $info->use_object_cache;
71
-				}
72
-				else if($info->use_object_cache == 'wincache')
70
+				} else if($info->use_object_cache == 'wincache')
73 71
 				{
74 72
 					$type = 'wincache';
75
-				}
76
-				else if($info->use_object_cache == 'file')
73
+				} else if($info->use_object_cache == 'file')
77 74
 				{
78 75
 					$type = 'file';
79
-				}
80
-				else if($always_use_file)
76
+				} else if($always_use_file)
81 77
 				{
82 78
 					$type = 'file';
83 79
 				}
84
-			}
85
-			else if($target == 'template')
80
+			} else if($target == 'template')
86 81
 			{
87 82
 				if($info->use_template_cache == 'apc')
88 83
 				{
89 84
 					$type = 'apc';
90
-				}
91
-				else if(substr($info->use_template_cache, 0, 8) == 'memcache')
85
+				} else if(substr($info->use_template_cache, 0, 8) == 'memcache')
92 86
 				{
93 87
 					$type = 'memcache';
94 88
 					$url = $info->use_template_cache;
95
-				}
96
-				else if($info->use_template_cache == 'wincache')
89
+				} else if($info->use_template_cache == 'wincache')
97 90
 				{
98 91
 					$type = 'wincache';
99 92
 				}
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	function &getInstance($target = 'object', $info = null, $always_use_file = false)
32 32
 	{
33
-		$cache_handler_key = $target . ($always_use_file ? '_file' : '');
34
-		if(!$GLOBALS['__XE_CACHE_HANDLER__'][$cache_handler_key])
33
+		$cache_handler_key = $target.($always_use_file ? '_file' : '');
34
+		if (!$GLOBALS['__XE_CACHE_HANDLER__'][$cache_handler_key])
35 35
 		{
36 36
 			$GLOBALS['__XE_CACHE_HANDLER__'][$cache_handler_key] = new CacheHandler($target, $info, $always_use_file);
37 37
 		}
@@ -51,61 +51,61 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	function CacheHandler($target, $info = null, $always_use_file = false)
53 53
 	{
54
-		if(!$info)
54
+		if (!$info)
55 55
 		{
56 56
 			$info = Context::getDBInfo();
57 57
 		}
58 58
 
59
-		if($info)
59
+		if ($info)
60 60
 		{
61
-			if($target == 'object')
61
+			if ($target == 'object')
62 62
 			{
63
-				if($info->use_object_cache == 'apc')
63
+				if ($info->use_object_cache == 'apc')
64 64
 				{
65 65
 					$type = 'apc';
66 66
 				}
67
-				else if(substr($info->use_object_cache, 0, 8) == 'memcache')
67
+				else if (substr($info->use_object_cache, 0, 8) == 'memcache')
68 68
 				{
69 69
 					$type = 'memcache';
70 70
 					$url = $info->use_object_cache;
71 71
 				}
72
-				else if($info->use_object_cache == 'wincache')
72
+				else if ($info->use_object_cache == 'wincache')
73 73
 				{
74 74
 					$type = 'wincache';
75 75
 				}
76
-				else if($info->use_object_cache == 'file')
76
+				else if ($info->use_object_cache == 'file')
77 77
 				{
78 78
 					$type = 'file';
79 79
 				}
80
-				else if($always_use_file)
80
+				else if ($always_use_file)
81 81
 				{
82 82
 					$type = 'file';
83 83
 				}
84 84
 			}
85
-			else if($target == 'template')
85
+			else if ($target == 'template')
86 86
 			{
87
-				if($info->use_template_cache == 'apc')
87
+				if ($info->use_template_cache == 'apc')
88 88
 				{
89 89
 					$type = 'apc';
90 90
 				}
91
-				else if(substr($info->use_template_cache, 0, 8) == 'memcache')
91
+				else if (substr($info->use_template_cache, 0, 8) == 'memcache')
92 92
 				{
93 93
 					$type = 'memcache';
94 94
 					$url = $info->use_template_cache;
95 95
 				}
96
-				else if($info->use_template_cache == 'wincache')
96
+				else if ($info->use_template_cache == 'wincache')
97 97
 				{
98 98
 					$type = 'wincache';
99 99
 				}
100 100
 			}
101 101
 
102
-			if($type)
102
+			if ($type)
103 103
 			{
104
-				$class = 'Cache' . ucfirst($type);
104
+				$class = 'Cache'.ucfirst($type);
105 105
 				include_once sprintf('%sclasses/cache/%s.class.php', _XE_PATH_, $class);
106 106
 				$this->handler = call_user_func(array($class, 'getInstance'), $url);
107 107
 				$this->keyGroupVersions = $this->handler->get('key_group_versions', 0);
108
-				if(!$this->keyGroupVersions)
108
+				if (!$this->keyGroupVersions)
109 109
 				{
110 110
 					$this->keyGroupVersions = array();
111 111
 					$this->handler->put('key_group_versions', $this->keyGroupVersions, 0);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	function isSupport()
123 123
 	{
124
-		if($this->handler && $this->handler->isSupport())
124
+		if ($this->handler && $this->handler->isSupport())
125 125
 		{
126 126
 			return true;
127 127
 		}
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	{
140 140
 		$key = str_replace('/', ':', $key);
141 141
 
142
-		return __XE_VERSION__ . ':' . $key;
142
+		return __XE_VERSION__.':'.$key;
143 143
 	}
144 144
 
145 145
 	/**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	 */
153 153
 	function get($key, $modified_time = 0)
154 154
 	{
155
-		if(!$this->handler)
155
+		if (!$this->handler)
156 156
 		{
157 157
 			return false;
158 158
 		}
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	 */
175 175
 	function put($key, $obj, $valid_time = 0)
176 176
 	{
177
-		if(!$this->handler && !$key)
177
+		if (!$this->handler && !$key)
178 178
 		{
179 179
 			return false;
180 180
 		}
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 */
193 193
 	function delete($key)
194 194
 	{
195
-		if(!$this->handler)
195
+		if (!$this->handler)
196 196
 		{
197 197
 			return false;
198 198
 		}
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	function isValid($key, $modified_time)
214 214
 	{
215
-		if(!$this->handler)
215
+		if (!$this->handler)
216 216
 		{
217 217
 			return false;
218 218
 		}
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	 */
230 230
 	function truncate()
231 231
 	{
232
-		if(!$this->handler)
232
+		if (!$this->handler)
233 233
 		{
234 234
 			return false;
235 235
 		}
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
 	 */
256 256
 	function getGroupKey($keyGroupName, $key)
257 257
 	{
258
-		if(!$this->keyGroupVersions[$keyGroupName])
258
+		if (!$this->keyGroupVersions[$keyGroupName])
259 259
 		{
260 260
 			$this->keyGroupVersions[$keyGroupName] = 1;
261 261
 			$this->handler->put('key_group_versions', $this->keyGroupVersions, 0);
262 262
 		}
263 263
 
264
-		return 'cache_group_' . $this->keyGroupVersions[$keyGroupName] . ':' . $keyGroupName . ':' . $key;
264
+		return 'cache_group_'.$this->keyGroupVersions[$keyGroupName].':'.$keyGroupName.':'.$key;
265 265
 	}
266 266
 
267 267
 	/**
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @param string $key Cache key
149 149
 	 * @param int $modified_time 	Unix time of data modified.
150 150
 	 * 								If stored time is older then modified time, return false.
151
-	 * @return false|mixed Return false on failure or older then modified time. Return the string associated with the $key on success.
151
+	 * @return boolean Return false on failure or older then modified time. Return the string associated with the $key on success.
152 152
 	 */
153 153
 	function get($key, $modified_time = 0)
154 154
 	{
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	 * @param string $key Cache key
298 298
 	 * @param int $modified_time 	Unix time of data modified.
299 299
 	 * 								If stored time is older then modified time, return false.
300
-	 * @return false|mixed Return false on failure or older then modified time. Return the string associated with the $key on success.
300
+	 * @return boolean Return false on failure or older then modified time. Return the string associated with the $key on success.
301 301
 	 */
302 302
 	function get($key, $modified_time = 0)
303 303
 	{
Please login to merge, or discard this patch.
classes/db/DBMysqli.class.php 3 patches
Braces   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@  discard block
 block discarded – undo
51 51
 							, $connection["db_password"]
52 52
 							, $connection["db_database"]
53 53
 							, $connection["db_port"]);
54
-		}
55
-		else
54
+		} else
56 55
 		{
57 56
 			$result = @mysqli_connect($connection["db_hostname"]
58 57
 							, $connection["db_userid"]
@@ -209,8 +208,7 @@  discard block
 block discarded – undo
209 208
 					$params[] = $v;
210 209
 					$types .= $type;
211 210
 				}
212
-			}
213
-			else
211
+			} else
214 212
 			{
215 213
 				$params[] = $value;
216 214
 				$types .= $type;
@@ -249,10 +247,12 @@  discard block
 block discarded – undo
249 247
 		$longtext_exists = false;
250 248
 		foreach($fields as $field)
251 249
 		{
252
-			if(isset($resultArray[$field->name])) // When joined tables are used and the same column name appears twice, we should add it separately, otherwise bind_result fails
250
+			if(isset($resultArray[$field->name])) {
251
+				// When joined tables are used and the same column name appears twice, we should add it separately, otherwise bind_result fails
253 252
 			{
254 253
 				$field->name = 'repeat_' . $field->name;
255 254
 			}
255
+			}
256 256
 
257 257
 			// Array passed needs to contain references, not values
258 258
 			$row[$field->name] = "";
@@ -301,8 +301,7 @@  discard block
 block discarded – undo
301 301
 			{
302 302
 				$output[$arrayIndexEndValue--] = $row;
303 303
 			}
304
-		}
305
-		else
304
+		} else
306 305
 		{
307 306
 			$output = $rows;
308 307
 		}
@@ -312,8 +311,7 @@  discard block
 block discarded – undo
312 311
 			if(isset($arrayIndexEndValue))
313 312
 			{
314 313
 				return $output;
315
-			}
316
-			else
314
+			} else
317 315
 			{
318 316
 				return $output[0];
319 317
 			}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	/**
31 31
 	 * Search Result
32 32
 	 *
33
-	 * @return Object
33
+	 * @return Object|null
34 34
 	 */
35 35
 	function IS()
36 36
 	{
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	function __connect($connection)
45 45
 	{
46 46
 		// Attempt to connect
47
-		if($connection["db_port"])
47
+		if ($connection["db_port"])
48 48
 		{
49 49
 			$result = @mysqli_connect($connection["db_hostname"]
50 50
 							, $connection["db_userid"]
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 							, $connection["db_database"]);
61 61
 		}
62 62
 		$error = mysqli_connect_errno();
63
-		if($error)
63
+		if ($error)
64 64
 		{
65 65
 			$this->setError($error, mysqli_connect_error());
66 66
 			return;
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	function addQuotes($string)
89 89
 	{
90
-		if(version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
90
+		if (version_compare(PHP_VERSION, "5.4.0", "<") && get_magic_quotes_gpc())
91 91
 		{
92 92
 			$string = stripslashes(str_replace("\\", "\\\\", $string));
93 93
 		}
94
-		if(!is_numeric($string))
94
+		if (!is_numeric($string))
95 95
 		{
96 96
 			$connection = $this->_getConnection('master');
97 97
 			$string = mysqli_escape_string($connection, $string);
@@ -108,23 +108,23 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	function __query($query, $connection)
110 110
 	{
111
-		if($this->use_prepared_statements == 'Y')
111
+		if ($this->use_prepared_statements == 'Y')
112 112
 		{
113 113
 			// 1. Prepare query
114 114
 			$stmt = mysqli_prepare($connection, $query);
115
-			if($stmt)
115
+			if ($stmt)
116 116
 			{
117 117
 				$types = '';
118 118
 				$params = array();
119 119
 				$this->_prepareQueryParameters($types, $params);
120 120
 
121
-				if(!empty($params))
121
+				if (!empty($params))
122 122
 				{
123 123
 					$args[0] = $stmt;
124 124
 					$args[1] = $types;
125 125
 
126 126
 					$i = 2;
127
-					foreach($params as $key => $param)
127
+					foreach ($params as $key => $param)
128 128
 					{
129 129
 						$copy[$key] = $param;
130 130
 						$args[$i++] = &$copy[$key];
@@ -132,18 +132,18 @@  discard block
 block discarded – undo
132 132
 
133 133
 					// 2. Bind parameters
134 134
 					$status = call_user_func_array('mysqli_stmt_bind_param', $args);
135
-					if(!$status)
135
+					if (!$status)
136 136
 					{
137
-						$this->setError(-1, "Invalid arguments: $query" . mysqli_error($connection) . PHP_EOL . print_r($args, true));
137
+						$this->setError(-1, "Invalid arguments: $query".mysqli_error($connection).PHP_EOL.print_r($args, true));
138 138
 					}
139 139
 				}
140 140
 
141 141
 				// 3. Execute query
142 142
 				$status = mysqli_stmt_execute($stmt);
143 143
 
144
-				if(!$status)
144
+				if (!$status)
145 145
 				{
146
-					$this->setError(-1, "Prepared statement failed: $query" . mysqli_error($connection) . PHP_EOL . print_r($args, true));
146
+					$this->setError(-1, "Prepared statement failed: $query".mysqli_error($connection).PHP_EOL.print_r($args, true));
147 147
 				}
148 148
 
149 149
 				// Return stmt for other processing - like retrieving resultset (_fetch)
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		$result = mysqli_query($connection, $query);
156 156
 		// Error Check
157 157
 		$error = mysqli_error($connection);
158
-		if($error)
158
+		if ($error)
159 159
 		{
160 160
 			$this->setError(mysqli_errno($connection), $error);
161 161
 		}
@@ -174,23 +174,23 @@  discard block
 block discarded – undo
174 174
 	{
175 175
 		$types = '';
176 176
 		$params = array();
177
-		if(!$this->param)
177
+		if (!$this->param)
178 178
 		{
179 179
 			return;
180 180
 		}
181 181
 
182
-		foreach($this->param as $k => $o)
182
+		foreach ($this->param as $k => $o)
183 183
 		{
184 184
 			$value = $o->getUnescapedValue();
185 185
 			$type = $o->getType();
186 186
 
187 187
 			// Skip column names -> this should be concatenated to query string
188
-			if($o->isColumnName())
188
+			if ($o->isColumnName())
189 189
 			{
190 190
 				continue;
191 191
 			}
192 192
 
193
-			switch($type)
193
+			switch ($type)
194 194
 			{
195 195
 				case 'number' :
196 196
 					$type = 'i';
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
 					$type = 's';
203 203
 			}
204 204
 
205
-			if(is_array($value))
205
+			if (is_array($value))
206 206
 			{
207
-				foreach($value as $v)
207
+				foreach ($value as $v)
208 208
 				{
209 209
 					$params[] = $v;
210 210
 					$types .= $type;
@@ -226,12 +226,12 @@  discard block
 block discarded – undo
226 226
 	 */
227 227
 	function _fetch($result, $arrayIndexEndValue = NULL)
228 228
 	{
229
-		if($this->use_prepared_statements != 'Y')
229
+		if ($this->use_prepared_statements != 'Y')
230 230
 		{
231 231
 			return parent::_fetch($result, $arrayIndexEndValue);
232 232
 		}
233 233
 		$output = array();
234
-		if(!$this->isConnected() || $this->isError() || !$result)
234
+		if (!$this->isConnected() || $this->isError() || !$result)
235 235
 		{
236 236
 			return $output;
237 237
 		}
@@ -247,25 +247,25 @@  discard block
 block discarded – undo
247 247
 		 * MYSQLI_TYPE for longtext is 252
248 248
 		 */
249 249
 		$longtext_exists = false;
250
-		foreach($fields as $field)
250
+		foreach ($fields as $field)
251 251
 		{
252
-			if(isset($resultArray[$field->name])) // When joined tables are used and the same column name appears twice, we should add it separately, otherwise bind_result fails
252
+			if (isset($resultArray[$field->name])) // When joined tables are used and the same column name appears twice, we should add it separately, otherwise bind_result fails
253 253
 			{
254
-				$field->name = 'repeat_' . $field->name;
254
+				$field->name = 'repeat_'.$field->name;
255 255
 			}
256 256
 
257 257
 			// Array passed needs to contain references, not values
258 258
 			$row[$field->name] = "";
259 259
 			$resultArray[$field->name] = &$row[$field->name];
260 260
 
261
-			if($field->type == 252)
261
+			if ($field->type == 252)
262 262
 			{
263 263
 				$longtext_exists = true;
264 264
 			}
265 265
 		}
266 266
 		$resultArray = array_merge(array($stmt), $resultArray);
267 267
 
268
-		if($longtext_exists)
268
+		if ($longtext_exists)
269 269
 		{
270 270
 			mysqli_stmt_store_result($stmt);
271 271
 		}
@@ -273,17 +273,17 @@  discard block
 block discarded – undo
273 273
 		call_user_func_array('mysqli_stmt_bind_result', $resultArray);
274 274
 
275 275
 		$rows = array();
276
-		while(mysqli_stmt_fetch($stmt))
276
+		while (mysqli_stmt_fetch($stmt))
277 277
 		{
278 278
 			$resultObject = new stdClass();
279 279
 
280
-			foreach($resultArray as $key => $value)
280
+			foreach ($resultArray as $key => $value)
281 281
 			{
282
-				if($key === 0)
282
+				if ($key === 0)
283 283
 				{
284 284
 					continue; // Skip stmt object
285 285
 				}
286
-				if(strpos($key, 'repeat_'))
286
+				if (strpos($key, 'repeat_'))
287 287
 				{
288 288
 					$key = substr($key, 6);
289 289
 				}
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
 
296 296
 		mysqli_stmt_close($stmt);
297 297
 
298
-		if($arrayIndexEndValue)
298
+		if ($arrayIndexEndValue)
299 299
 		{
300
-			foreach($rows as $row)
300
+			foreach ($rows as $row)
301 301
 			{
302 302
 				$output[$arrayIndexEndValue--] = $row;
303 303
 			}
@@ -307,9 +307,9 @@  discard block
 block discarded – undo
307 307
 			$output = $rows;
308 308
 		}
309 309
 
310
-		if(count($output) == 1)
310
+		if (count($output) == 1)
311 311
 		{
312
-			if(isset($arrayIndexEndValue))
312
+			if (isset($arrayIndexEndValue))
313 313
 			{
314 314
 				return $output;
315 315
 			}
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	 */
331 331
 	function _executeInsertAct($queryObject, $with_values = false)
332 332
 	{
333
-		if($this->use_prepared_statements != 'Y')
333
+		if ($this->use_prepared_statements != 'Y')
334 334
 		{
335 335
 			return parent::_executeInsertAct($queryObject);
336 336
 		}
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 	 */
349 349
 	function _executeUpdateAct($queryObject, $with_values = false)
350 350
 	{
351
-		if($this->use_prepared_statements != 'Y')
351
+		if ($this->use_prepared_statements != 'Y')
352 352
 		{
353 353
 			return parent::_executeUpdateAct($queryObject);
354 354
 		}
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 	 */
367 367
 	function _executeDeleteAct($queryObject, $with_values = false)
368 368
 	{
369
-		if($this->use_prepared_statements != 'Y')
369
+		if ($this->use_prepared_statements != 'Y')
370 370
 		{
371 371
 			return parent::_executeDeleteAct($queryObject);
372 372
 		}
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 	 */
388 388
 	function _executeSelectAct($queryObject, $connection = null, $with_values = false)
389 389
 	{
390
-		if($this->use_prepared_statements != 'Y')
390
+		if ($this->use_prepared_statements != 'Y')
391 391
 		{
392 392
 			return parent::_executeSelectAct($queryObject, $connection);
393 393
 		}
Please login to merge, or discard this patch.