@@ -56,8 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | $view->itemData = $this->toArray( $view->item, true ); |
| 58 | 58 | $view->itemBody = parent::copy(); |
| 59 | - } |
|
| 60 | - catch( \Exception $e ) |
|
| 59 | + } catch( \Exception $e ) |
|
| 61 | 60 | { |
| 62 | 61 | $this->report( $e, 'copy' ); |
| 63 | 62 | } |
@@ -87,8 +86,7 @@ discard block |
||
| 87 | 86 | |
| 88 | 87 | $view->itemData = array_replace_recursive( $this->toArray( $view->item ), $data ); |
| 89 | 88 | $view->itemBody = parent::create(); |
| 90 | - } |
|
| 91 | - catch( \Exception $e ) |
|
| 89 | + } catch( \Exception $e ) |
|
| 92 | 90 | { |
| 93 | 91 | $this->report( $e, 'create' ); |
| 94 | 92 | } |
@@ -129,8 +127,7 @@ discard block |
||
| 129 | 127 | $manager->commit(); |
| 130 | 128 | |
| 131 | 129 | return $this->redirect( 'cms', 'search', null, 'delete' ); |
| 132 | - } |
|
| 133 | - catch( \Exception $e ) |
|
| 130 | + } catch( \Exception $e ) |
|
| 134 | 131 | { |
| 135 | 132 | $manager->rollback(); |
| 136 | 133 | $this->report( $e, 'delete' ); |
@@ -160,8 +157,7 @@ discard block |
||
| 160 | 157 | $view->item = $manager->get( $id, $this->getDomains() ); |
| 161 | 158 | $view->itemData = $this->toArray( $view->item ); |
| 162 | 159 | $view->itemBody = parent::get(); |
| 163 | - } |
|
| 164 | - catch( \Exception $e ) |
|
| 160 | + } catch( \Exception $e ) |
|
| 165 | 161 | { |
| 166 | 162 | $this->report( $e, 'get' ); |
| 167 | 163 | } |
@@ -192,8 +188,7 @@ discard block |
||
| 192 | 188 | $manager->commit(); |
| 193 | 189 | |
| 194 | 190 | return $this->redirect( 'cms', $view->param( 'next' ), $view->item->getId(), 'save' ); |
| 195 | - } |
|
| 196 | - catch( \Exception $e ) |
|
| 191 | + } catch( \Exception $e ) |
|
| 197 | 192 | { |
| 198 | 193 | $manager->rollback(); |
| 199 | 194 | $this->report( $e, 'save' ); |
@@ -224,8 +219,7 @@ discard block |
||
| 224 | 219 | $view->filterOperators = $search->getOperators(); |
| 225 | 220 | $view->itemBody = parent::search(); |
| 226 | 221 | $view->total = $total; |
| 227 | - } |
|
| 228 | - catch( \Exception $e ) |
|
| 222 | + } catch( \Exception $e ) |
|
| 229 | 223 | { |
| 230 | 224 | $this->report( $e, 'search' ); |
| 231 | 225 | } |
@@ -135,9 +135,12 @@ discard block |
||
| 135 | 135 | <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
| 136 | 136 | </div> |
| 137 | 137 | </div> |
| 138 | - <?php else : ?> |
|
| 138 | + <?php else { |
|
| 139 | + : ?> |
|
| 139 | 140 | <input class="text-langid" type="hidden" |
| 140 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.languageid' ) ) ); ?>'.replace('_idx_', idx)" |
|
| 141 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.languageid' ) ) ); |
|
| 142 | +} |
|
| 143 | +?>'.replace('_idx_', idx)" |
|
| 141 | 144 | value="<?= $enc->attr( $languages->getCode()->first() ) ?>" /> |
| 142 | 145 | <?php endif; ?> |
| 143 | 146 | |
@@ -157,9 +160,12 @@ discard block |
||
| 157 | 160 | <?= $enc->html( $this->translate( 'admin', 'Types for additional texts like per one lb/kg or per month' ) ); ?> |
| 158 | 161 | </div> |
| 159 | 162 | </div> |
| 160 | - <?php else : ?> |
|
| 163 | + <?php else { |
|
| 164 | + : ?> |
|
| 161 | 165 | <input class="item-type" type="hidden" |
| 162 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.type' ) ) ); ?>'.replace('_idx_', idx)" |
|
| 166 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'seo', '_idx_', 'text.type' ) ) ); |
|
| 167 | +} |
|
| 168 | +?>'.replace('_idx_', idx)" |
|
| 163 | 169 | value="<?= $enc->attr( $textTypes->getCode()->first() ) ?>" /> |
| 164 | 170 | <?php endif; ?> |
| 165 | 171 | |
@@ -207,9 +213,12 @@ discard block |
||
| 207 | 213 | <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
| 208 | 214 | </div> |
| 209 | 215 | </div> |
| 210 | - <?php else : ?> |
|
| 216 | + <?php else { |
|
| 217 | + : ?> |
|
| 211 | 218 | <input class="listitem-type" type="hidden" |
| 212 | - v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'cms.lists.type'] ) ); ?>'.replace('_idx_', idx)" |
|
| 219 | + v-bind:name="'<?= $enc->attr( $this->formparam( ['seo', '_idx_', 'cms.lists.type'] ) ); |
|
| 220 | +} |
|
| 221 | +?>'.replace('_idx_', idx)" |
|
| 213 | 222 | value="<?= $enc->attr( $listTypes->getCode()->first() ) ?>" /> |
| 214 | 223 | <?php endif; ?> |
| 215 | 224 | |
@@ -68,9 +68,12 @@ |
||
| 68 | 68 | <div class="item-actions"> |
| 69 | 69 | <?php if( isset( $this->itemData ) ) : ?> |
| 70 | 70 | <?= $this->partial( $this->config( 'admin/jqadm/partial/itemactions', 'common/partials/itemactions-standard' ), ['params' => $params] ); ?> |
| 71 | - <?php else : ?> |
|
| 71 | + <?php else { |
|
| 72 | + : ?> |
|
| 72 | 73 | <span class="placeholder"> </span> |
| 73 | - <?php endif; ?> |
|
| 74 | + <?php endif; |
|
| 75 | +} |
|
| 76 | +?> |
|
| 74 | 77 | </div> |
| 75 | 78 | </nav> |
| 76 | 79 | |
@@ -112,9 +112,12 @@ discard block |
||
| 112 | 112 | <?= $enc->html( $this->translate( 'admin', 'Language of the entered text' ) ); ?> |
| 113 | 113 | </div> |
| 114 | 114 | </div> |
| 115 | - <?php else : ?> |
|
| 115 | + <?php else { |
|
| 116 | + : ?> |
|
| 116 | 117 | <input class="text-langid" type="hidden" |
| 117 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.languageid' ) ) ); ?>'.replace('_idx_', idx)" |
|
| 118 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'text.languageid' ) ) ); |
|
| 119 | +} |
|
| 120 | +?>'.replace('_idx_', idx)" |
|
| 118 | 121 | value="<?= $enc->attr( $languages->getCode()->first() ) ?>" /> |
| 119 | 122 | <?php endif; ?> |
| 120 | 123 | |
@@ -148,9 +151,12 @@ discard block |
||
| 148 | 151 | <?= $enc->html( $this->translate( 'admin', 'Second level type for grouping items' ) ); ?> |
| 149 | 152 | </div> |
| 150 | 153 | </div> |
| 151 | - <?php else : ?> |
|
| 154 | + <?php else { |
|
| 155 | + : ?> |
|
| 152 | 156 | <input class="listitem-type" type="hidden" |
| 153 | - v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'cms.lists.type' ) ) ); ?>'.replace('_idx_', idx)" |
|
| 157 | + v-bind:name="'<?= $enc->attr( $this->formparam( array( 'content', '_idx_', 'cms.lists.type' ) ) ); |
|
| 158 | +} |
|
| 159 | +?>'.replace('_idx_', idx)" |
|
| 154 | 160 | value="<?= $enc->attr( $listTypes->getCode()->first() ) ?>" /> |
| 155 | 161 | <?php endif; ?> |
| 156 | 162 | |
@@ -228,8 +228,7 @@ discard block |
||
| 228 | 228 | */ |
| 229 | 229 | $path = 'mshop/cms/manager/insert'; |
| 230 | 230 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 231 | - } |
|
| 232 | - else |
|
| 231 | + } else |
|
| 233 | 232 | { |
| 234 | 233 | /** mshop/cms/manager/update/mysql |
| 235 | 234 | * Updates an existing cms record in the database |
@@ -334,8 +333,7 @@ discard block |
||
| 334 | 333 | $item->setId( $id ); |
| 335 | 334 | |
| 336 | 335 | $dbm->release( $conn, $dbname ); |
| 337 | - } |
|
| 338 | - catch( \Exception $e ) |
|
| 336 | + } catch( \Exception $e ) |
|
| 339 | 337 | { |
| 340 | 338 | $dbm->release( $conn, $dbname ); |
| 341 | 339 | throw $e; |
@@ -637,8 +635,7 @@ discard block |
||
| 637 | 635 | } |
| 638 | 636 | |
| 639 | 637 | $dbm->release( $conn, $dbname ); |
| 640 | - } |
|
| 641 | - catch( \Exception $e ) |
|
| 638 | + } catch( \Exception $e ) |
|
| 642 | 639 | { |
| 643 | 640 | $dbm->release( $conn, $dbname ); |
| 644 | 641 | throw $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 = $e->getCode() >= 100 && $e->getCode() < 600 ? $e->getCode() : 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |
@@ -126,8 +126,7 @@ |
||
| 126 | 126 | foreach( $items as $item ) { |
| 127 | 127 | $data[] = $entryFcn( $item ); |
| 128 | 128 | } |
| 129 | - } |
|
| 130 | - else |
|
| 129 | + } else |
|
| 131 | 130 | { |
| 132 | 131 | $data = $entryFcn( $items ); |
| 133 | 132 | } |
@@ -144,23 +144,19 @@ discard block |
||
| 144 | 144 | $this->setCached( 'body', $uid, $prefixes, $confkey, $html, $this->tags, $this->expire ); |
| 145 | 145 | |
| 146 | 146 | return $html; |
| 147 | - } |
|
| 148 | - catch( \Aimeos\Client\Html\Exception $e ) |
|
| 147 | + } catch( \Aimeos\Client\Html\Exception $e ) |
|
| 149 | 148 | { |
| 150 | 149 | $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) ); |
| 151 | 150 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |
| 152 | - } |
|
| 153 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 151 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 154 | 152 | { |
| 155 | 153 | $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) ); |
| 156 | 154 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |
| 157 | - } |
|
| 158 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 155 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 159 | 156 | { |
| 160 | 157 | $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
| 161 | 158 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |
| 162 | - } |
|
| 163 | - catch( \Exception $e ) |
|
| 159 | + } catch( \Exception $e ) |
|
| 164 | 160 | { |
| 165 | 161 | $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) ); |
| 166 | 162 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |
@@ -168,8 +164,7 @@ discard block |
||
| 168 | 164 | } |
| 169 | 165 | |
| 170 | 166 | $html = $view->render( $view->config( $tplconf, $default ) ); |
| 171 | - } |
|
| 172 | - else |
|
| 167 | + } else |
|
| 173 | 168 | { |
| 174 | 169 | $html = $this->modifyBody( $html, $uid ); |
| 175 | 170 | } |
@@ -234,13 +229,11 @@ discard block |
||
| 234 | 229 | $this->setCached( 'header', $uid, $prefixes, $confkey, $html, $this->tags, $this->expire ); |
| 235 | 230 | |
| 236 | 231 | return $html; |
| 237 | - } |
|
| 238 | - catch( \Exception $e ) |
|
| 232 | + } catch( \Exception $e ) |
|
| 239 | 233 | { |
| 240 | 234 | $this->logException( $e ); |
| 241 | 235 | } |
| 242 | - } |
|
| 243 | - else |
|
| 236 | + } else |
|
| 244 | 237 | { |
| 245 | 238 | $html = $this->modifyHeader( $html, $uid ); |
| 246 | 239 | } |
@@ -349,23 +342,19 @@ discard block |
||
| 349 | 342 | try |
| 350 | 343 | { |
| 351 | 344 | parent::process(); |
| 352 | - } |
|
| 353 | - catch( \Aimeos\Client\Html\Exception $e ) |
|
| 345 | + } catch( \Aimeos\Client\Html\Exception $e ) |
|
| 354 | 346 | { |
| 355 | 347 | $error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) ); |
| 356 | 348 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |
| 357 | - } |
|
| 358 | - catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 349 | + } catch( \Aimeos\Controller\Frontend\Exception $e ) |
|
| 359 | 350 | { |
| 360 | 351 | $error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) ); |
| 361 | 352 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |
| 362 | - } |
|
| 363 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 353 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 364 | 354 | { |
| 365 | 355 | $error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
| 366 | 356 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |
| 367 | - } |
|
| 368 | - catch( \Exception $e ) |
|
| 357 | + } catch( \Exception $e ) |
|
| 369 | 358 | { |
| 370 | 359 | $error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) ); |
| 371 | 360 | $view->pageErrorList = array_merge( $view->get( 'pageErrorList', [] ), $error ); |