@@ -60,8 +60,7 @@ |
||
60 | 60 | |
61 | 61 | $db->setQuery($query); |
62 | 62 | $db->execute(); |
63 | - } |
|
64 | - catch (RuntimeException $e) |
|
63 | + } catch (RuntimeException $e) |
|
65 | 64 | { |
66 | 65 | JLog::add($e->getMessage(), JLog::ERROR, 'jerror'); |
67 | 66 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | if ($post['mc_gross'] != $payment->amount_total) |
154 | 154 | { |
155 | - $statusText = JText::sprintf( |
|
155 | + $statusText = JText::sprintf( |
|
156 | 156 | 'LIB_REDCORE_PAYMENT_ERROR_PRICE_MISMATCH', $extensionName, $this->paymentName, $payment->amount_total, $post['mc_gross'] |
157 | 157 | ); |
158 | 158 | RApiPaymentHelper::logToFile( |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } |
171 | 171 | elseif ($post['mc_currency'] != $payment->currency) |
172 | 172 | { |
173 | - $statusText = JText::sprintf( |
|
173 | + $statusText = JText::sprintf( |
|
174 | 174 | 'LIB_REDCORE_PAYMENT_ERROR_CURRENCY_MISMATCH', $extensionName, $this->paymentName, $payment->currency, $post['mc_currency'] |
175 | 175 | ); |
176 | 176 | RApiPaymentHelper::logToFile( |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | elseif (strcmp($response, "INVALID") == 0) |
215 | 215 | { |
216 | - $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_ERROR_IN_PAYMENT_GATEWAY', $extensionName, $this->paymentName, 'INVALID IPN'); |
|
216 | + $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_ERROR_IN_PAYMENT_GATEWAY', $extensionName, $this->paymentName, 'INVALID IPN'); |
|
217 | 217 | RApiPaymentHelper::logToFile( |
218 | 218 | $this->paymentName, |
219 | 219 | $extensionName, |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | else |
231 | 231 | { |
232 | - $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_ERROR_IN_PAYMENT_GATEWAY', $extensionName, $this->paymentName, 'HTTP ERROR'); |
|
232 | + $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_ERROR_IN_PAYMENT_GATEWAY', $extensionName, $this->paymentName, 'HTTP ERROR'); |
|
233 | 233 | RApiPaymentHelper::logToFile( |
234 | 234 | $this->paymentName, |
235 | 235 | $extensionName, |
@@ -116,8 +116,7 @@ discard block |
||
116 | 116 | if (version_compare(JVERSION, 3) >= 0) |
117 | 117 | { |
118 | 118 | $post = JFactory::getApplication()->input->post->getArray(); |
119 | - } |
|
120 | - else |
|
119 | + } else |
|
121 | 120 | { |
122 | 121 | $post = JRequest::get('post'); |
123 | 122 | } |
@@ -167,8 +166,7 @@ discard block |
||
167 | 166 | $logData['message_text'] = $statusText; |
168 | 167 | |
169 | 168 | return false; |
170 | - } |
|
171 | - elseif ($post['mc_currency'] != $payment->currency) |
|
169 | + } elseif ($post['mc_currency'] != $payment->currency) |
|
172 | 170 | { |
173 | 171 | $statusText = JText::sprintf( |
174 | 172 | 'LIB_REDCORE_PAYMENT_ERROR_CURRENCY_MISMATCH', $extensionName, $this->paymentName, $payment->currency, $post['mc_currency'] |
@@ -197,8 +195,7 @@ discard block |
||
197 | 195 | if ($logData['status'] == RApiPaymentStatus::getStatusCompleted()) |
198 | 196 | { |
199 | 197 | $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_SUCCESSFUL', $extensionName, $this->paymentName); |
200 | - } |
|
201 | - else |
|
198 | + } else |
|
202 | 199 | { |
203 | 200 | $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_CALLBACK_STATUS', $extensionName, $logData['status'], $this->paymentName); |
204 | 201 | } |
@@ -210,8 +207,7 @@ discard block |
||
210 | 207 | $isValid = true, |
211 | 208 | $statusText |
212 | 209 | ); |
213 | - } |
|
214 | - elseif (strcmp($response, "INVALID") == 0) |
|
210 | + } elseif (strcmp($response, "INVALID") == 0) |
|
215 | 211 | { |
216 | 212 | $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_ERROR_IN_PAYMENT_GATEWAY', $extensionName, $this->paymentName, 'INVALID IPN'); |
217 | 213 | RApiPaymentHelper::logToFile( |
@@ -226,8 +222,7 @@ discard block |
||
226 | 222 | $logData['message_text'] = $statusText; |
227 | 223 | |
228 | 224 | return false; |
229 | - } |
|
230 | - else |
|
225 | + } else |
|
231 | 226 | { |
232 | 227 | $statusText = JText::sprintf('LIB_REDCORE_PAYMENT_ERROR_IN_PAYMENT_GATEWAY', $extensionName, $this->paymentName, 'HTTP ERROR'); |
233 | 228 | RApiPaymentHelper::logToFile( |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $autoSubmit = !empty($data['options']['autoSubmit']); |
26 | 26 | ?> |
27 | 27 | <form action="<?php echo $action ?>" class="adminForm" method="post" name="<?php echo $formName ?>" id="<?php echo $formName ?>"> |
28 | - <?php if(!empty($fields)) : |
|
28 | + <?php if (!empty($fields)) : |
|
29 | 29 | foreach ($fields as $fieldName => $fieldValue) : ?> |
30 | 30 | <input type="hidden" name="<?php echo $fieldName; ?>" value="<?php echo $fieldValue; ?>" /> |
31 | 31 | <?php endforeach; |
@@ -38,8 +38,10 @@ |
||
38 | 38 | document.getElementById("<?php echo $formName ?>").submit(); |
39 | 39 | } |
40 | 40 | </script> |
41 | - <?php else : |
|
41 | + <?php else { |
|
42 | + : |
|
42 | 43 | $text = JText::sprintf('LIB_REDCORE_PAYMENT_SUBMIT_TO_PAYMENT', $paymentTitle); |
44 | +} |
|
43 | 45 | ?> |
44 | 46 | <input |
45 | 47 | type="submit" |
@@ -83,8 +83,7 @@ discard block |
||
83 | 83 | if (version_compare(JVERSION, '3') >= 0) |
84 | 84 | { |
85 | 85 | $dataGet = $input->get->getArray(); |
86 | - } |
|
87 | - else |
|
86 | + } else |
|
88 | 87 | { |
89 | 88 | $dataGet = $input->get->getArray($_GET); |
90 | 89 | } |
@@ -121,8 +120,7 @@ discard block |
||
121 | 120 | |
122 | 121 | // Display output |
123 | 122 | $api->render(); |
124 | - } |
|
125 | - catch (Exception $e) |
|
123 | + } catch (Exception $e) |
|
126 | 124 | { |
127 | 125 | $code = $e->getCode() > 0 ? $e->getCode() : 500; |
128 | 126 | |
@@ -134,8 +132,7 @@ discard block |
||
134 | 132 | header("Content-length: " . strlen($message)); |
135 | 133 | header("Status: 200"); |
136 | 134 | echo $message; |
137 | - } |
|
138 | - else |
|
135 | + } else |
|
139 | 136 | { |
140 | 137 | // Set the server response code. |
141 | 138 | header('Status: ' . $code, true, $code); |
@@ -110,12 +110,10 @@ |
||
110 | 110 | if (file_exists($tPath)) |
111 | 111 | { |
112 | 112 | return $tPath; |
113 | - } |
|
114 | - elseif (file_exists($bPath)) |
|
113 | + } elseif (file_exists($bPath)) |
|
115 | 114 | { |
116 | 115 | return $bPath; |
117 | - } |
|
118 | - else |
|
116 | + } else |
|
119 | 117 | { |
120 | 118 | return $dPath; |
121 | 119 | } |
@@ -39,8 +39,7 @@ |
||
39 | 39 | if ($currentPage % $step == 0) |
40 | 40 | { |
41 | 41 | $range = ceil($currentPage / $step) + 1; |
42 | - } |
|
43 | - else |
|
42 | + } else |
|
44 | 43 | { |
45 | 44 | $range = ceil($currentPage / $step); |
46 | 45 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'currentPage' => $currentPage, |
63 | 63 | 'numberOfPages' => $numberOfPages |
64 | 64 | ) |
65 | - );?> |
|
65 | + ); ?> |
|
66 | 66 | |
67 | 67 | <?php if ($numberOfPages > $paginationButtons - 4): ?> |
68 | 68 | <?php for ($i = 1; $i <= $numberOfPages; $i++) : ?> |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | $showPoints = true; |
84 | 84 | echo $output; |
85 | 85 | ?> |
86 | - <?php elseif($showPoints) : ?> |
|
86 | + <?php elseif ($showPoints) : ?> |
|
87 | 87 | <li><span>...</span></li> |
88 | 88 | <?php $showPoints = false; ?> |
89 | - <?php endif;?> |
|
89 | + <?php endif; ?> |
|
90 | 90 | |
91 | 91 | <?php endfor; ?> |
92 | 92 | <?php else :?> |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | <?php echo $output; ?> |
107 | 107 | <?php endfor; ?> |
108 | - <?php endif;?> |
|
108 | + <?php endif; ?> |
|
109 | 109 | |
110 | 110 | <?php |
111 | 111 | echo RLayoutHelper::render( |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | 'currentPage' => $currentPage, |
128 | 128 | 'numberOfPages' => $numberOfPages |
129 | 129 | ) |
130 | - );?> |
|
130 | + ); ?> |
|
131 | 131 | |
132 | 132 | </ul> |
133 | 133 | </div> |
@@ -89,8 +89,11 @@ |
||
89 | 89 | <?php endif;?> |
90 | 90 | |
91 | 91 | <?php endfor; ?> |
92 | - <?php else :?> |
|
93 | - <?php for ($i = 1; $i <= $numberOfPages; $i++) : ?> |
|
92 | + <?php else { |
|
93 | + :?> |
|
94 | + <?php for ($i = 1; |
|
95 | +} |
|
96 | +$i <= $numberOfPages; $i++) : ?> |
|
94 | 97 | |
95 | 98 | <?php $output = RLayoutHelper::render( |
96 | 99 | 'pagination.ajax.link', |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'currentPage' => $currentPage, |
63 | 63 | 'numberOfPages' => $numberOfPages |
64 | 64 | ) |
65 | - );?> |
|
65 | + ); ?> |
|
66 | 66 | |
67 | 67 | <?php if ($numberOfPages > $paginationButtons - 4): ?> |
68 | 68 | <?php for ($i = 1; $i <= $numberOfPages; $i++) : ?> |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | $showPoints = true; |
84 | 84 | echo $output; |
85 | 85 | ?> |
86 | - <?php elseif($showPoints) : ?> |
|
86 | + <?php elseif ($showPoints) : ?> |
|
87 | 87 | <li><span>...</span></li> |
88 | 88 | <?php $showPoints = false; ?> |
89 | - <?php endif;?> |
|
89 | + <?php endif; ?> |
|
90 | 90 | |
91 | 91 | <?php endfor; ?> |
92 | 92 | <?php else :?> |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | <?php echo $output; ?> |
107 | 107 | <?php endfor; ?> |
108 | - <?php endif;?> |
|
108 | + <?php endif; ?> |
|
109 | 109 | |
110 | 110 | <?php |
111 | 111 | echo RLayoutHelper::render( |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | 'currentPage' => $currentPage, |
128 | 128 | 'numberOfPages' => $numberOfPages |
129 | 129 | ) |
130 | - );?> |
|
130 | + ); ?> |
|
131 | 131 | |
132 | 132 | </ul> |
133 | 133 | </div> |
@@ -89,8 +89,11 @@ |
||
89 | 89 | <?php endif;?> |
90 | 90 | |
91 | 91 | <?php endfor; ?> |
92 | - <?php else :?> |
|
93 | - <?php for ($i = 1; $i <= $numberOfPages; $i++) : ?> |
|
92 | + <?php else { |
|
93 | + :?> |
|
94 | + <?php for ($i = 1; |
|
95 | +} |
|
96 | +$i <= $numberOfPages; $i++) : ?> |
|
94 | 97 | |
95 | 98 | <?php $output = RLayoutHelper::render( |
96 | 99 | 'pagination.ajax.link', |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | if ($icon !== null) |
51 | 51 | { |
52 | 52 | $display = '<i class="' . $icon . '"></i>'; |
53 | -} |
|
54 | -else |
|
53 | +} else |
|
55 | 54 | { |
56 | 55 | $display = $text; |
57 | 56 | } |
@@ -70,8 +69,7 @@ discard block |
||
70 | 69 | } |
71 | 70 | |
72 | 71 | $onClick = $ajaxJS . '(' . $moveTo . ');'; |
73 | -} |
|
74 | -else |
|
72 | +} else |
|
75 | 73 | { |
76 | 74 | $class = 'disabled'; |
77 | 75 | } |
@@ -82,8 +80,11 @@ discard block |
||
82 | 80 | <?php echo $display; ?> |
83 | 81 | </a> |
84 | 82 | </li> |
85 | -<?php else : ?> |
|
86 | - <li class="<?php echo $class; ?>"> |
|
83 | +<?php else { |
|
84 | + : ?> |
|
85 | + <li class="<?php echo $class; |
|
86 | +} |
|
87 | +?>"> |
|
87 | 88 | <span><?php echo $display; ?></span> |
88 | 89 | </li> |
89 | 90 | <?php endif; |