@@ -159,9 +159,12 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface |
161 | 161 | { |
162 | - try { |
|
162 | + try |
|
163 | + { |
|
163 | 164 | $values['log.siteid'] = $this->context()->locale()->getSiteId(); |
164 | - } catch( \Exception $e ) { |
|
165 | + } |
|
166 | + catch( \Exception $e ) |
|
167 | + { |
|
165 | 168 | $values['log.siteid'] = null; |
166 | 169 | } |
167 | 170 | |
@@ -185,9 +188,12 @@ discard block |
||
185 | 188 | $context = $this->context(); |
186 | 189 | $conn = $context->db( $this->getResourceName() ); |
187 | 190 | |
188 | - try { |
|
191 | + try |
|
192 | + { |
|
189 | 193 | $siteid = $context->locale()->getSiteId(); |
190 | - } catch( \Exception $e ) { |
|
194 | + } |
|
195 | + catch( \Exception $e ) |
|
196 | + { |
|
191 | 197 | $siteid = ''; |
192 | 198 | } |
193 | 199 | |
@@ -233,8 +239,7 @@ discard block |
||
233 | 239 | */ |
234 | 240 | $path = 'madmin/log/manager/insert'; |
235 | 241 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
236 | - } |
|
237 | - else |
|
242 | + } else |
|
238 | 243 | { |
239 | 244 | /** madmin/log/manager/update/mysql |
240 | 245 | * Updates an existing log record in the database |
@@ -153,8 +153,8 @@ |
||
153 | 153 | { |
154 | 154 | $map = []; |
155 | 155 | |
156 | - $conn = $this->context()->db( 'db-locale' ); |
|
157 | - $tconn = $this->context()->db( 'db-locale', true ); |
|
156 | + $conn = $this->context()->db( 'db-locale' ); |
|
157 | + $tconn = $this->context()->db( 'db-locale', true ); |
|
158 | 158 | |
159 | 159 | $type = \Aimeos\Base\DB\Statement\Base::PARAM_INT; |
160 | 160 | $roots = $conn->create( 'SELECT id, nleft, nright FROM mshop_locale_site WHERE level = 0' )->execute(); |