@@ -55,17 +55,17 @@ discard block |
||
55 | 55 | $this->aArgs = array(); |
56 | 56 | $this->nMethod = Jaxon::METHOD_UNKNOWN; |
57 | 57 | |
58 | - if(isset($_POST['jxnargs'])) |
|
58 | + if (isset($_POST['jxnargs'])) |
|
59 | 59 | { |
60 | 60 | $this->nMethod = Jaxon::METHOD_POST; |
61 | 61 | $this->aArgs = $_POST['jxnargs']; |
62 | 62 | } |
63 | - elseif(isset($_GET['jxnargs'])) |
|
63 | + elseif (isset($_GET['jxnargs'])) |
|
64 | 64 | { |
65 | 65 | $this->nMethod = Jaxon::METHOD_GET; |
66 | 66 | $this->aArgs = $_GET['jxnargs']; |
67 | 67 | } |
68 | - if(get_magic_quotes_gpc() == 1) |
|
68 | + if (get_magic_quotes_gpc() == 1) |
|
69 | 69 | { |
70 | 70 | array_walk($this->aArgs, array(&$this, '__argumentStripSlashes')); |
71 | 71 | } |
@@ -81,17 +81,17 @@ discard block |
||
81 | 81 | */ |
82 | 82 | private function __convertStringToBool($sValue) |
83 | 83 | { |
84 | - if(strcasecmp($sValue, 'true') == 0) |
|
84 | + if (strcasecmp($sValue, 'true') == 0) |
|
85 | 85 | { |
86 | 86 | return true; |
87 | 87 | } |
88 | - if(strcasecmp($sValue, 'false') == 0) |
|
88 | + if (strcasecmp($sValue, 'false') == 0) |
|
89 | 89 | { |
90 | 90 | return false; |
91 | 91 | } |
92 | - if(is_numeric($sValue)) |
|
92 | + if (is_numeric($sValue)) |
|
93 | 93 | { |
94 | - if($sValue == 0) |
|
94 | + if ($sValue == 0) |
|
95 | 95 | { |
96 | 96 | return false; |
97 | 97 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | private function __argumentStripSlashes(&$sArg) |
111 | 111 | { |
112 | - if(!is_string($sArg)) |
|
112 | + if (!is_string($sArg)) |
|
113 | 113 | { |
114 | 114 | return ''; |
115 | 115 | } |
@@ -157,14 +157,14 @@ discard block |
||
157 | 157 | */ |
158 | 158 | private function __argumentDecode(&$sArg) |
159 | 159 | { |
160 | - if($sArg == '') |
|
160 | + if ($sArg == '') |
|
161 | 161 | { |
162 | 162 | return ''; |
163 | 163 | } |
164 | 164 | |
165 | 165 | $data = json_decode($sArg, true); |
166 | 166 | |
167 | - if($data !== null && $sArg != $data) |
|
167 | + if ($data !== null && $sArg != $data) |
|
168 | 168 | { |
169 | 169 | $sArg = $data; |
170 | 170 | } |
@@ -183,13 +183,13 @@ discard block |
||
183 | 183 | */ |
184 | 184 | private function __argumentDecodeUTF8_iconv(&$mArg) |
185 | 185 | { |
186 | - if(is_array($mArg)) |
|
186 | + if (is_array($mArg)) |
|
187 | 187 | { |
188 | - foreach($mArg as $sKey => &$xArg) |
|
188 | + foreach ($mArg as $sKey => &$xArg) |
|
189 | 189 | { |
190 | 190 | $sNewKey = $sKey; |
191 | 191 | $this->__argumentDecodeUTF8_iconv($sNewKey); |
192 | - if($sNewKey != $sKey) |
|
192 | + if ($sNewKey != $sKey) |
|
193 | 193 | { |
194 | 194 | $mArg[$sNewKey] = $xArg; |
195 | 195 | unset($mArg[$sKey]); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $this->__argumentDecodeUTF8_iconv($xArg); |
199 | 199 | } |
200 | 200 | } |
201 | - elseif(is_string($mArg)) |
|
201 | + elseif (is_string($mArg)) |
|
202 | 202 | { |
203 | 203 | $mArg = iconv("UTF-8", $this->getOption('core.encoding') . '//TRANSLIT', $mArg); |
204 | 204 | } |
@@ -213,13 +213,13 @@ discard block |
||
213 | 213 | */ |
214 | 214 | private function __argumentDecodeUTF8_mb_convert_encoding(&$mArg) |
215 | 215 | { |
216 | - if(is_array($mArg)) |
|
216 | + if (is_array($mArg)) |
|
217 | 217 | { |
218 | - foreach($mArg as $sKey => &$xArg) |
|
218 | + foreach ($mArg as $sKey => &$xArg) |
|
219 | 219 | { |
220 | 220 | $sNewKey = $sKey; |
221 | 221 | $this->__argumentDecodeUTF8_mb_convert_encoding($sNewKey); |
222 | - if($sNewKey != $sKey) |
|
222 | + if ($sNewKey != $sKey) |
|
223 | 223 | { |
224 | 224 | $mArg[$sNewKey] = $xArg; |
225 | 225 | unset($mArg[$sKey]); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $this->__argumentDecodeUTF8_mb_convert_encoding($xArg); |
229 | 229 | } |
230 | 230 | } |
231 | - elseif(is_string($mArg)) |
|
231 | + elseif (is_string($mArg)) |
|
232 | 232 | { |
233 | 233 | $mArg = mb_convert_encoding($mArg, $this->getOption('core.encoding'), "UTF-8"); |
234 | 234 | } |
@@ -243,14 +243,14 @@ discard block |
||
243 | 243 | */ |
244 | 244 | private function __argumentDecodeUTF8_utf8_decode(&$mArg) |
245 | 245 | { |
246 | - if(is_array($mArg)) |
|
246 | + if (is_array($mArg)) |
|
247 | 247 | { |
248 | - foreach($mArg as $sKey => &$xArg) |
|
248 | + foreach ($mArg as $sKey => &$xArg) |
|
249 | 249 | { |
250 | 250 | $sNewKey = $sKey; |
251 | 251 | $this->__argumentDecodeUTF8_utf8_decode($sNewKey); |
252 | 252 | |
253 | - if($sNewKey != $sKey) |
|
253 | + if ($sNewKey != $sKey) |
|
254 | 254 | { |
255 | 255 | $mArg[$sNewKey] = $xArg; |
256 | 256 | unset($mArg[$sKey]); |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $this->__argumentDecodeUTF8_utf8_decode($xArg); |
261 | 261 | } |
262 | 262 | } |
263 | - elseif(is_string($mArg)) |
|
263 | + elseif (is_string($mArg)) |
|
264 | 264 | { |
265 | 265 | $mArg = utf8_decode($mArg); |
266 | 266 | } |
@@ -285,19 +285,19 @@ discard block |
||
285 | 285 | */ |
286 | 286 | public function process() |
287 | 287 | { |
288 | - if(($this->getOption('core.decode_utf8'))) |
|
288 | + if (($this->getOption('core.decode_utf8'))) |
|
289 | 289 | { |
290 | 290 | $sFunction = ''; |
291 | 291 | |
292 | - if(function_exists('iconv')) |
|
292 | + if (function_exists('iconv')) |
|
293 | 293 | { |
294 | 294 | $sFunction = "iconv"; |
295 | 295 | } |
296 | - elseif(function_exists('mb_convert_encoding')) |
|
296 | + elseif (function_exists('mb_convert_encoding')) |
|
297 | 297 | { |
298 | 298 | $sFunction = "mb_convert_encoding"; |
299 | 299 | } |
300 | - elseif($this->getOption('core.encoding') == "ISO-8859-1") |
|
300 | + elseif ($this->getOption('core.encoding') == "ISO-8859-1") |
|
301 | 301 | { |
302 | 302 | $sFunction = "utf8_decode"; |
303 | 303 | } |