@@ -78,8 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->deleteProduct( $entry->id ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->deleteProduct( $relId ); |
| 85 | 84 | } |
@@ -87,13 +86,11 @@ discard block |
||
| 87 | 86 | |
| 88 | 87 | $view->item = $this->controller->get(); |
| 89 | 88 | $status = 200; |
| 90 | - } |
|
| 91 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 89 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | 90 | { |
| 93 | 91 | $status = 404; |
| 94 | 92 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 95 | - } |
|
| 96 | - catch( \Exception $e ) |
|
| 93 | + } catch( \Exception $e ) |
|
| 97 | 94 | { |
| 98 | 95 | $status = 500; |
| 99 | 96 | $view->errors = $this->getErrorDetails( $e ); |
@@ -146,13 +143,11 @@ discard block |
||
| 146 | 143 | |
| 147 | 144 | $view->item = $this->controller->get(); |
| 148 | 145 | $status = 200; |
| 149 | - } |
|
| 150 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 146 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 151 | 147 | { |
| 152 | 148 | $status = 404; |
| 153 | 149 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 154 | - } |
|
| 155 | - catch( \Exception $e ) |
|
| 150 | + } catch( \Exception $e ) |
|
| 156 | 151 | { |
| 157 | 152 | $status = 500; |
| 158 | 153 | $view->errors = $this->getErrorDetails( $e ); |
@@ -206,13 +201,11 @@ discard block |
||
| 206 | 201 | |
| 207 | 202 | $view->item = $this->controller->get(); |
| 208 | 203 | $status = 201; |
| 209 | - } |
|
| 210 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 204 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 211 | 205 | { |
| 212 | 206 | $status = 404; |
| 213 | 207 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 214 | - } |
|
| 215 | - catch( \Exception $e ) |
|
| 208 | + } catch( \Exception $e ) |
|
| 216 | 209 | { |
| 217 | 210 | $status = 500; |
| 218 | 211 | $view->errors = $this->getErrorDetails( $e ); |
@@ -59,13 +59,11 @@ discard block |
||
| 59 | 59 | $status = 200; |
| 60 | 60 | $type = $view->param( 'id', 'default' ); |
| 61 | 61 | $view->item = $this->controller->setType( $type )->clear()->get(); |
| 62 | - } |
|
| 63 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 62 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 64 | 63 | { |
| 65 | 64 | $status = 404; |
| 66 | 65 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 67 | - } |
|
| 68 | - catch( \Exception $e ) |
|
| 66 | + } catch( \Exception $e ) |
|
| 69 | 67 | { |
| 70 | 68 | $status = 500; |
| 71 | 69 | $view->errors = $this->getErrorDetails( $e ); |
@@ -93,21 +91,18 @@ discard block |
||
| 93 | 91 | try |
| 94 | 92 | { |
| 95 | 93 | $view->item = $this->controller->load( $id, $this->getParts( $view ) ); |
| 96 | - } |
|
| 97 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 94 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 98 | 95 | { |
| 99 | 96 | $view->item = $this->controller->setType( $id )->get(); |
| 100 | 97 | $allow = true; |
| 101 | 98 | } |
| 102 | 99 | |
| 103 | 100 | $status = 200; |
| 104 | - } |
|
| 105 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 101 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 106 | 102 | { |
| 107 | 103 | $status = 404; |
| 108 | 104 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 109 | - } |
|
| 110 | - catch( \Exception $e ) |
|
| 105 | + } catch( \Exception $e ) |
|
| 111 | 106 | { |
| 112 | 107 | $status = 500; |
| 113 | 108 | $view->errors = $this->getErrorDetails( $e ); |
@@ -141,13 +136,11 @@ discard block |
||
| 141 | 136 | |
| 142 | 137 | $view->item = $basket; |
| 143 | 138 | $status = 200; |
| 144 | - } |
|
| 145 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 139 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 146 | 140 | { |
| 147 | 141 | $status = 404; |
| 148 | 142 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 149 | - } |
|
| 150 | - catch( \Exception $e ) |
|
| 143 | + } catch( \Exception $e ) |
|
| 151 | 144 | { |
| 152 | 145 | $status = 500; |
| 153 | 146 | $view->errors = $this->getErrorDetails( $e ); |
@@ -175,13 +168,11 @@ discard block |
||
| 175 | 168 | |
| 176 | 169 | $view->item = $item; |
| 177 | 170 | $status = 200; |
| 178 | - } |
|
| 179 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 171 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 180 | 172 | { |
| 181 | 173 | $status = 404; |
| 182 | 174 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 183 | - } |
|
| 184 | - catch( \Exception $e ) |
|
| 175 | + } catch( \Exception $e ) |
|
| 185 | 176 | { |
| 186 | 177 | $status = 500; |
| 187 | 178 | $view->errors = $this->getErrorDetails( $e ); |
@@ -78,8 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->deleteCoupon( $entry->id ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->deleteCoupon( $relId ); |
| 85 | 84 | } |
@@ -87,13 +86,11 @@ discard block |
||
| 87 | 86 | |
| 88 | 87 | $view->item = $this->controller->get(); |
| 89 | 88 | $status = 200; |
| 90 | - } |
|
| 91 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 89 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | 90 | { |
| 93 | 91 | $status = 404; |
| 94 | 92 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 95 | - } |
|
| 96 | - catch( \Exception $e ) |
|
| 93 | + } catch( \Exception $e ) |
|
| 97 | 94 | { |
| 98 | 95 | $status = 500; |
| 99 | 96 | $view->errors = $this->getErrorDetails( $e ); |
@@ -139,13 +136,11 @@ discard block |
||
| 139 | 136 | |
| 140 | 137 | $view->item = $this->controller->get(); |
| 141 | 138 | $status = 201; |
| 142 | - } |
|
| 143 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 139 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 144 | 140 | { |
| 145 | 141 | $status = 404; |
| 146 | 142 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 147 | - } |
|
| 148 | - catch( \Exception $e ) |
|
| 143 | + } catch( \Exception $e ) |
|
| 149 | 144 | { |
| 150 | 145 | $status = 500; |
| 151 | 146 | $view->errors = $this->getErrorDetails( $e ); |
@@ -44,13 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $status = 200; |
| 47 | - } |
|
| 48 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 47 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | 48 | { |
| 50 | 49 | $status = 404; |
| 51 | 50 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 52 | - } |
|
| 53 | - catch( \Exception $e ) |
|
| 51 | + } catch( \Exception $e ) |
|
| 54 | 52 | { |
| 55 | 53 | $status = 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |
@@ -44,13 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $status = 200; |
| 47 | - } |
|
| 48 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 47 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | 48 | { |
| 50 | 49 | $status = 404; |
| 51 | 50 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 52 | - } |
|
| 53 | - catch( \Exception $e ) |
|
| 51 | + } catch( \Exception $e ) |
|
| 54 | 52 | { |
| 55 | 53 | $status = 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |
@@ -101,8 +101,7 @@ |
||
| 101 | 101 | foreach( $items as $item ) { |
| 102 | 102 | $data[] = $entryFcn( $item ); |
| 103 | 103 | } |
| 104 | - } |
|
| 105 | - else |
|
| 104 | + } else |
|
| 106 | 105 | { |
| 107 | 106 | $data = $entryFcn( $items ); |
| 108 | 107 | } |
@@ -79,25 +79,21 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | $this->controller->deleteListItem( $entry->id ); |
| 81 | 81 | } |
| 82 | - } |
|
| 83 | - else |
|
| 82 | + } else |
|
| 84 | 83 | { |
| 85 | 84 | $this->controller->deleteListItem( $relId ); |
| 86 | 85 | } |
| 87 | 86 | |
| 88 | 87 | $status = 200; |
| 89 | - } |
|
| 90 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 88 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 91 | 89 | { |
| 92 | 90 | $status = 403; |
| 93 | 91 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 94 | - } |
|
| 95 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 96 | 93 | { |
| 97 | 94 | $status = 404; |
| 98 | 95 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 99 | - } |
|
| 100 | - catch( \Exception $e ) |
|
| 96 | + } catch( \Exception $e ) |
|
| 101 | 97 | { |
| 102 | 98 | $status = 500; |
| 103 | 99 | $view->errors = $this->getErrorDetails( $e ); |
@@ -130,26 +126,22 @@ discard block |
||
| 130 | 126 | { |
| 131 | 127 | $filter = $this->initCriteria( $cntl->createListsFilter(), $view->param( 'filter', [] ) ); |
| 132 | 128 | $view->items = $cntl->searchListItems( $filter, $total ); |
| 133 | - } |
|
| 134 | - else |
|
| 129 | + } else |
|
| 135 | 130 | { |
| 136 | 131 | $view->items = $cntl->getListItem( $relId ); |
| 137 | 132 | } |
| 138 | 133 | |
| 139 | 134 | $view->total = $total; |
| 140 | 135 | $status = 200; |
| 141 | - } |
|
| 142 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 136 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 143 | 137 | { |
| 144 | 138 | $status = 403; |
| 145 | 139 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 146 | - } |
|
| 147 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 140 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 148 | 141 | { |
| 149 | 142 | $status = 404; |
| 150 | 143 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 151 | - } |
|
| 152 | - catch( \Exception $e ) |
|
| 144 | + } catch( \Exception $e ) |
|
| 153 | 145 | { |
| 154 | 146 | $status = 500; |
| 155 | 147 | $view->errors = $this->getErrorDetails( $e ); |
@@ -185,18 +177,15 @@ discard block |
||
| 185 | 177 | $view->items = $cntl->editListItem( $view->param( 'relatedid' ), (array) $payload->data->attributes ); |
| 186 | 178 | $view->total = 1; |
| 187 | 179 | $status = 200; |
| 188 | - } |
|
| 189 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 180 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 190 | 181 | { |
| 191 | 182 | $status = 403; |
| 192 | 183 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 193 | - } |
|
| 194 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 184 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 195 | 185 | { |
| 196 | 186 | $status = 404; |
| 197 | 187 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 198 | - } |
|
| 199 | - catch( \Exception $e ) |
|
| 188 | + } catch( \Exception $e ) |
|
| 200 | 189 | { |
| 201 | 190 | $status = 500; |
| 202 | 191 | $view->errors = $this->getErrorDetails( $e ); |
@@ -245,18 +234,15 @@ discard block |
||
| 245 | 234 | $view->total = count( $list ); |
| 246 | 235 | $view->items = $list; |
| 247 | 236 | $status = 201; |
| 248 | - } |
|
| 249 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 237 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 250 | 238 | { |
| 251 | 239 | $status = 403; |
| 252 | 240 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 253 | - } |
|
| 254 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 241 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 255 | 242 | { |
| 256 | 243 | $status = 404; |
| 257 | 244 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 258 | - } |
|
| 259 | - catch( \Exception $e ) |
|
| 245 | + } catch( \Exception $e ) |
|
| 260 | 246 | { |
| 261 | 247 | $status = 500; |
| 262 | 248 | $view->errors = $this->getErrorDetails( $e ); |
@@ -96,8 +96,7 @@ |
||
| 96 | 96 | foreach( $items as $item ) { |
| 97 | 97 | $data[] = $entryFcn( $item, $this->get( 'form' ) ); |
| 98 | 98 | } |
| 99 | - } |
|
| 100 | - else |
|
| 99 | + } else |
|
| 101 | 100 | { |
| 102 | 101 | $data = $entryFcn( $items, $this->get( 'form' ) ); |
| 103 | 102 | } |
@@ -42,18 +42,15 @@ discard block |
||
| 42 | 42 | $cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'customer' ); |
| 43 | 43 | $cntl->deleteItem( $view->param( 'id' ) ); |
| 44 | 44 | $status = 200; |
| 45 | - } |
|
| 46 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 45 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 47 | 46 | { |
| 48 | 47 | $status = 403; |
| 49 | 48 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 50 | - } |
|
| 51 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 52 | 50 | { |
| 53 | 51 | $status = 404; |
| 54 | 52 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 55 | - } |
|
| 56 | - catch( \Exception $e ) |
|
| 53 | + } catch( \Exception $e ) |
|
| 57 | 54 | { |
| 58 | 55 | $status = 500; |
| 59 | 56 | $view->errors = $this->getErrorDetails( $e ); |
@@ -88,18 +85,15 @@ discard block |
||
| 88 | 85 | |
| 89 | 86 | $view->item = $cntl->getItem( $view->param( 'id' ), $ref ); |
| 90 | 87 | $status = 200; |
| 91 | - } |
|
| 92 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 88 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 93 | 89 | { |
| 94 | 90 | $status = 403; |
| 95 | 91 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 96 | - } |
|
| 97 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 92 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 98 | 93 | { |
| 99 | 94 | $status = 404; |
| 100 | 95 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 101 | - } |
|
| 102 | - catch( \Exception $e ) |
|
| 96 | + } catch( \Exception $e ) |
|
| 103 | 97 | { |
| 104 | 98 | $status = 500; |
| 105 | 99 | $view->errors = $this->getErrorDetails( $e ); |
@@ -134,18 +128,15 @@ discard block |
||
| 134 | 128 | |
| 135 | 129 | $view->item = $cntl->editItem( $view->param( 'id' ), (array) $payload->data->attributes ); |
| 136 | 130 | $status = 200; |
| 137 | - } |
|
| 138 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 131 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 139 | 132 | { |
| 140 | 133 | $status = 403; |
| 141 | 134 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 142 | - } |
|
| 143 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 135 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 144 | 136 | { |
| 145 | 137 | $status = 404; |
| 146 | 138 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 147 | - } |
|
| 148 | - catch( \Exception $e ) |
|
| 139 | + } catch( \Exception $e ) |
|
| 149 | 140 | { |
| 150 | 141 | $status = 500; |
| 151 | 142 | $view->errors = $this->getErrorDetails( $e ); |
@@ -181,18 +172,15 @@ discard block |
||
| 181 | 172 | $view->item = $cntl->addItem( (array) $payload->data->attributes ); |
| 182 | 173 | $view->nodata = true; // only expose customer ID to attackers |
| 183 | 174 | $status = 201; |
| 184 | - } |
|
| 185 | - catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 175 | + } catch( \Aimeos\Controller\Frontend\Customer\Exception $e ) |
|
| 186 | 176 | { |
| 187 | 177 | $status = 403; |
| 188 | 178 | $view->errors = $this->getErrorDetails( $e, 'controller/frontend' ); |
| 189 | - } |
|
| 190 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 179 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 191 | 180 | { |
| 192 | 181 | $status = 404; |
| 193 | 182 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 194 | - } |
|
| 195 | - catch( \Exception $e ) |
|
| 183 | + } catch( \Exception $e ) |
|
| 196 | 184 | { |
| 197 | 185 | $status = 500; |
| 198 | 186 | $view->errors = $this->getErrorDetails( $e ); |