@@ -77,31 +77,27 @@ discard block |
||
77 | 77 | |
78 | 78 | $this->controller->deleteAddressItem( $entry->id ); |
79 | 79 | } |
80 | - } |
|
81 | - else |
|
80 | + } else |
|
82 | 81 | { |
83 | 82 | $this->controller->deleteAddressItem( $relId ); |
84 | 83 | } |
85 | 84 | |
86 | 85 | $status = 200; |
87 | - } |
|
88 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
86 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
89 | 87 | { |
90 | 88 | $status = 403; |
91 | 89 | $view->errors = array( array( |
92 | 90 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
93 | 91 | 'detail' => $e->getTraceAsString(), |
94 | 92 | ) ); |
95 | - } |
|
96 | - catch( \Aimeos\MShop\Exception $e ) |
|
93 | + } catch( \Aimeos\MShop\Exception $e ) |
|
97 | 94 | { |
98 | 95 | $status = 404; |
99 | 96 | $view->errors = array( array( |
100 | 97 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
101 | 98 | 'detail' => $e->getTraceAsString(), |
102 | 99 | ) ); |
103 | - } |
|
104 | - catch( \Exception $e ) |
|
100 | + } catch( \Exception $e ) |
|
105 | 101 | { |
106 | 102 | $status = 500; |
107 | 103 | $view->errors = array( array( |
@@ -138,24 +134,21 @@ discard block |
||
138 | 134 | |
139 | 135 | $view->total = count( $view->items ); |
140 | 136 | $status = 200; |
141 | - } |
|
142 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
137 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
143 | 138 | { |
144 | 139 | $status = 403; |
145 | 140 | $view->errors = array( array( |
146 | 141 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
147 | 142 | 'detail' => $e->getTraceAsString(), |
148 | 143 | ) ); |
149 | - } |
|
150 | - catch( \Aimeos\MShop\Exception $e ) |
|
144 | + } catch( \Aimeos\MShop\Exception $e ) |
|
151 | 145 | { |
152 | 146 | $status = 404; |
153 | 147 | $view->errors = array( array( |
154 | 148 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
155 | 149 | 'detail' => $e->getTraceAsString(), |
156 | 150 | ) ); |
157 | - } |
|
158 | - catch( \Exception $e ) |
|
151 | + } catch( \Exception $e ) |
|
159 | 152 | { |
160 | 153 | $status = 500; |
161 | 154 | $view->errors = array( array( |
@@ -192,24 +185,21 @@ discard block |
||
192 | 185 | $view->items = $cntl->editAddressItem( $view->param( 'relatedid' ), (array) $payload->data->attributes ); |
193 | 186 | $view->total = 1; |
194 | 187 | $status = 200; |
195 | - } |
|
196 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
188 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
197 | 189 | { |
198 | 190 | $status = 403; |
199 | 191 | $view->errors = array( array( |
200 | 192 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
201 | 193 | 'detail' => $e->getTraceAsString(), |
202 | 194 | ) ); |
203 | - } |
|
204 | - catch( \Aimeos\MShop\Exception $e ) |
|
195 | + } catch( \Aimeos\MShop\Exception $e ) |
|
205 | 196 | { |
206 | 197 | $status = 404; |
207 | 198 | $view->errors = array( array( |
208 | 199 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
209 | 200 | 'detail' => $e->getTraceAsString(), |
210 | 201 | ) ); |
211 | - } |
|
212 | - catch( \Exception $e ) |
|
202 | + } catch( \Exception $e ) |
|
213 | 203 | { |
214 | 204 | $status = 500; |
215 | 205 | $view->errors = array( array( |
@@ -260,24 +250,21 @@ discard block |
||
260 | 250 | $view->total = count( $list ); |
261 | 251 | $view->items = $list; |
262 | 252 | $status = 201; |
263 | - } |
|
264 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
253 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
265 | 254 | { |
266 | 255 | $status = 403; |
267 | 256 | $view->errors = array( array( |
268 | 257 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
269 | 258 | 'detail' => $e->getTraceAsString(), |
270 | 259 | ) ); |
271 | - } |
|
272 | - catch( \Aimeos\MShop\Exception $e ) |
|
260 | + } catch( \Aimeos\MShop\Exception $e ) |
|
273 | 261 | { |
274 | 262 | $status = 404; |
275 | 263 | $view->errors = array( array( |
276 | 264 | 'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ), |
277 | 265 | 'detail' => $e->getTraceAsString(), |
278 | 266 | ) ); |
279 | - } |
|
280 | - catch( \Exception $e ) |
|
267 | + } catch( \Exception $e ) |
|
281 | 268 | { |
282 | 269 | $status = 500; |
283 | 270 | $view->errors = array( array( |
@@ -91,8 +91,7 @@ |
||
91 | 91 | foreach( $items as $addrItem ) { |
92 | 92 | $data[] = $entryFcn( $addrItem ); |
93 | 93 | } |
94 | - } |
|
95 | - else |
|
94 | + } else |
|
96 | 95 | { |
97 | 96 | $data = $entryFcn( $items ); |
98 | 97 | } |