@@ -161,10 +161,11 @@ discard block |
||
161 | 161 | } elseif (isset($this->ajaxTransition)) { |
162 | 162 | $call = $this->ajaxTransition; |
163 | 163 | } |
164 | - if (\is_callable($call)) |
|
165 | - $retour = "\t" . $call($responseElement, $jqueryDone) . ";\n"; |
|
166 | - else |
|
167 | - $retour = "\t{$responseElement}.{$jqueryDone}( data );\n"; |
|
164 | + if (\is_callable($call)) { |
|
165 | + $retour = "\t" . $call($responseElement, $jqueryDone) . ";\n"; |
|
166 | + } else { |
|
167 | + $retour = "\t{$responseElement}.{$jqueryDone}( data );\n"; |
|
168 | + } |
|
168 | 169 | } |
169 | 170 | if (isset($history)) { |
170 | 171 | if ($this->params["autoActiveLinks"]) { |
@@ -198,8 +199,9 @@ discard block |
||
198 | 199 | } |
199 | 200 | |
200 | 201 | protected function _correctAjaxUrl($url) { |
201 | - if ($url !== "/" && JString::endsWith($url, "/") === true) |
|
202 | - $url = substr($url, 0, strlen($url) - 1); |
|
202 | + if ($url !== "/" && JString::endsWith($url, "/") === true) { |
|
203 | + $url = substr($url, 0, strlen($url) - 1); |
|
204 | + } |
|
203 | 205 | if (strncmp($url, 'http://', 7) != 0 && strncmp($url, 'https://', 8) != 0) { |
204 | 206 | $url = $this->getUrl($url); |
205 | 207 | } |
@@ -223,8 +225,9 @@ discard block |
||
223 | 225 | public static function _implodeParams($parameters) { |
224 | 226 | $allParameters = []; |
225 | 227 | foreach ($parameters as $params) { |
226 | - if (isset($params)) |
|
227 | - $allParameters[] = self::_correctParams($params); |
|
228 | + if (isset($params)) { |
|
229 | + $allParameters[] = self::_correctParams($params); |
|
230 | + } |
|
228 | 231 | } |
229 | 232 | return \implode("+'&'+", $allParameters); |
230 | 233 | } |
@@ -258,8 +261,9 @@ discard block |
||
258 | 261 | |
259 | 262 | protected function setDefaultParameters(&$parameters, $default) { |
260 | 263 | foreach ($default as $k => $v) { |
261 | - if (! isset($parameters[$k])) |
|
262 | - $parameters[$k] = $v; |
|
264 | + if (! isset($parameters[$k])) { |
|
265 | + $parameters[$k] = $v; |
|
266 | + } |
|
263 | 267 | } |
264 | 268 | } |
265 | 269 | |
@@ -833,8 +837,9 @@ discard block |
||
833 | 837 | $retour .= "$('#'+" . $form . ").submit();\n"; |
834 | 838 | } |
835 | 839 | $retour = $this->_addJsCondition($jsCondition, $retour); |
836 | - if ($immediatly) |
|
837 | - $this->jquery_code_for_compile[] = $retour; |
|
840 | + if ($immediatly) { |
|
841 | + $this->jquery_code_for_compile[] = $retour; |
|
842 | + } |
|
838 | 843 | return $retour; |
839 | 844 | } |
840 | 845 |