@@ -89,8 +89,7 @@ discard block |
||
89 | 89 | && in_array( 'ROLE_SUPER_ADMIN', (array) $token->getUser()->getRoles() ) ) |
90 | 90 | { |
91 | 91 | $helper = new \Aimeos\MW\View\Helper\Access\All( $view ); |
92 | - } |
|
93 | - else |
|
92 | + } else |
|
94 | 93 | { |
95 | 94 | $fcn = function() use ( $container, $context ) { |
96 | 95 | return $container->get( 'aimeos.support' )->getGroups( $context ); |
@@ -244,8 +243,7 @@ discard block |
||
244 | 243 | { |
245 | 244 | $i18n = $this->container->get( 'aimeos.i18n' )->get( array( $locale ) ); |
246 | 245 | $translation = $i18n[$locale]; |
247 | - } |
|
248 | - else |
|
246 | + } else |
|
249 | 247 | { |
250 | 248 | $translation = new \Aimeos\MW\Translation\None( 'en' ); |
251 | 249 | } |
@@ -75,9 +75,12 @@ |
||
75 | 75 | { |
76 | 76 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); |
77 | 77 | |
78 | - try { |
|
78 | + try |
|
79 | + { |
|
79 | 80 | $localeItem = $localeManager->bootstrap( $site, '', '', false, null, true ); |
80 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
81 | + } |
|
82 | + catch( \Aimeos\MShop\Exception $e ) |
|
83 | + { |
|
81 | 84 | $localeItem = $localeManager->createItem(); |
82 | 85 | } |
83 | 86 |
@@ -33,22 +33,22 @@ |
||
33 | 33 | |
34 | 34 | $rootNode |
35 | 35 | ->children() |
36 | - ->booleanNode('disable_sites')->defaultValue( true )->end() |
|
37 | - ->booleanNode('apc_enable')->defaultValue( false )->end() |
|
38 | - ->scalarNode('apc_prefix')->defaultValue( 'sf2:' )->end() |
|
39 | - ->scalarNode('extdir')->end() |
|
40 | - ->scalarNode('uploaddir')->end() |
|
41 | - ->variableNode('admin')->defaultValue( array() )->end() |
|
42 | - ->variableNode('client')->defaultValue( array() )->end() |
|
43 | - ->variableNode('controller')->defaultValue( array() )->end() |
|
44 | - ->variableNode('i18n')->defaultValue( array() )->end() |
|
45 | - ->variableNode('madmin')->defaultValue( array() )->end() |
|
46 | - ->variableNode('mshop')->defaultValue( array() )->end() |
|
47 | - ->variableNode('resource')->defaultValue( array() )->end() |
|
48 | - ->variableNode('page')->defaultValue( array() )->end() |
|
49 | - ->variableNode('backend')->defaultValue( array() )->end() |
|
50 | - ->variableNode('frontend')->defaultValue( array() )->end() |
|
51 | - ->variableNode('command')->defaultValue( array() )->end() |
|
36 | + ->booleanNode( 'disable_sites' )->defaultValue( true )->end() |
|
37 | + ->booleanNode( 'apc_enable' )->defaultValue( false )->end() |
|
38 | + ->scalarNode( 'apc_prefix' )->defaultValue( 'sf2:' )->end() |
|
39 | + ->scalarNode( 'extdir' )->end() |
|
40 | + ->scalarNode( 'uploaddir' )->end() |
|
41 | + ->variableNode( 'admin' )->defaultValue( array() )->end() |
|
42 | + ->variableNode( 'client' )->defaultValue( array() )->end() |
|
43 | + ->variableNode( 'controller' )->defaultValue( array() )->end() |
|
44 | + ->variableNode( 'i18n' )->defaultValue( array() )->end() |
|
45 | + ->variableNode( 'madmin' )->defaultValue( array() )->end() |
|
46 | + ->variableNode( 'mshop' )->defaultValue( array() )->end() |
|
47 | + ->variableNode( 'resource' )->defaultValue( array() )->end() |
|
48 | + ->variableNode( 'page' )->defaultValue( array() )->end() |
|
49 | + ->variableNode( 'backend' )->defaultValue( array() )->end() |
|
50 | + ->variableNode( 'frontend' )->defaultValue( array() )->end() |
|
51 | + ->variableNode( 'command' )->defaultValue( array() )->end() |
|
52 | 52 | ->end() |
53 | 53 | ; |
54 | 54 |
@@ -127,10 +127,10 @@ |
||
127 | 127 | $templatePaths = $aimeos->getCustomPaths( 'admin/jsonadm/templates' ); |
128 | 128 | |
129 | 129 | $context = $this->get( 'aimeos.context' )->get( false, 'backend' ); |
130 | - $context->setI18n( $this->get('aimeos.i18n')->get( array( $lang, 'en' ) ) ); |
|
131 | - $context->setLocale( $this->get('aimeos.locale')->getBackend( $context, $site ) ); |
|
130 | + $context->setI18n( $this->get( 'aimeos.i18n' )->get( array( $lang, 'en' ) ) ); |
|
131 | + $context->setLocale( $this->get( 'aimeos.locale' )->getBackend( $context, $site ) ); |
|
132 | 132 | |
133 | - $view = $this->get('aimeos.view')->create( $context, $templatePaths, $lang ); |
|
133 | + $view = $this->get( 'aimeos.view' )->create( $context, $templatePaths, $lang ); |
|
134 | 134 | $context->setView( $view ); |
135 | 135 | |
136 | 136 | return \Aimeos\Admin\JsonAdm::create( $context, $aimeos, $resource ); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | |
43 | 43 | public function testFilterTree() |
44 | - { |
|
44 | + { |
|
45 | 45 | $client = static::createClient(); |
46 | 46 | $crawler = $client->request( 'GET', '/unittest/de/EUR/shop/' ); |
47 | 47 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | $response = $this->render( '@AimeosShop/Checkout/confirm.html.twig', $params ); |
42 | - $response->headers->set('Cache-Control', 'no-store'); |
|
42 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
43 | 43 | return $response; |
44 | 44 | } |
45 | 45 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | $response = $this->render( '@AimeosShop/Checkout/index.html.twig', $params ); |
64 | - $response->headers->set('Cache-Control', 'no-store'); |
|
64 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
65 | 65 | return $response; |
66 | 66 | } |
67 | 67 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | $response = $this->render( '@AimeosShop/Checkout/update.html.twig', $params ); |
86 | - $response->headers->set('Cache-Control', 'no-store'); |
|
86 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
87 | 87 | return $response; |
88 | 88 | } |
89 | 89 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $this->container->get( 'twig' )->addGlobal( 'aiheader', (string) $client->getHeader() ); |
100 | 100 | |
101 | 101 | $response = new Response( (string) $client->getBody() ); |
102 | - $response->headers->set('Cache-Control', 'no-store'); |
|
102 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
103 | 103 | return $response; |
104 | 104 | } |
105 | 105 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $this->container->get( 'twig' )->addGlobal( 'aiheader', (string) $client->getHeader() ); |
116 | 116 | |
117 | 117 | $response = new Response( (string) $client->getBody() ); |
118 | - $response->headers->set('Cache-Control', 'no-store'); |
|
118 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
119 | 119 | return $response; |
120 | 120 | } |
121 | 121 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $this->container->get( 'twig' )->addGlobal( 'aiheader', (string) $client->getHeader() ); |
132 | 132 | |
133 | 133 | $response = new Response( (string) $client->getBody() ); |
134 | - $response->headers->set('Cache-Control', 'no-store'); |
|
134 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
135 | 135 | return $response; |
136 | 136 | } |
137 | 137 | } |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | $params['aibody'][$name] = $shop->get( $name )->getBody(); |
39 | 39 | } |
40 | 40 | |
41 | - $response = $this->render( '@AimeosShop/Basket/index.html.twig', $params ); |
|
42 | - $response->headers->set('Cache-Control', 'no-store'); |
|
41 | + $response = $this->render( '@AimeosShop/Basket/index.html.twig', $params ); |
|
42 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
43 | 43 | return $response; |
44 | 44 | } |
45 | 45 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $this->container->get( 'twig' )->addGlobal( 'aiheader', (string) $client->getHeader() ); |
55 | 55 | |
56 | 56 | $response = new Response( (string) $client->getBody() ); |
57 | - $response->headers->set('Cache-Control', 'no-store'); |
|
57 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
58 | 58 | return $response; |
59 | 59 | } |
60 | 60 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $this->container->get( 'twig' )->addGlobal( 'aiheader', (string) $client->getHeader() ); |
71 | 71 | |
72 | 72 | $response = new Response( (string) $client->getBody() ); |
73 | - $response->headers->set('Cache-Control', 'no-store'); |
|
73 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
74 | 74 | return $response; |
75 | 75 | } |
76 | 76 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->container->get( 'twig' )->addGlobal( 'aiheader', (string) $client->getHeader() ); |
87 | 87 | |
88 | 88 | $response = new Response( (string) $client->getBody() ); |
89 | - $response->headers->set('Cache-Control', 'no-store'); |
|
89 | + $response->headers->set( 'Cache-Control', 'no-store' ); |
|
90 | 90 | return $response; |
91 | 91 | } |
92 | 92 | } |
@@ -71,9 +71,12 @@ |
||
71 | 71 | |
72 | 72 | $manager = \Aimeos\MShop::create( $context, 'customer' ); |
73 | 73 | |
74 | - try { |
|
74 | + try |
|
75 | + { |
|
75 | 76 | $item = $manager->findItem( $email ); |
76 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
77 | + } |
|
78 | + catch( \Aimeos\MShop\Exception $e ) |
|
79 | + { |
|
77 | 80 | $item = $manager->createItem(); |
78 | 81 | } |
79 | 82 |
@@ -216,8 +216,7 @@ |
||
216 | 216 | $username = $token->getUser()->getUsername(); |
217 | 217 | $userid = $token->getUser()->getId(); |
218 | 218 | $context->setUserId( $userid ); |
219 | - $context->setGroupIds( function() use ( $context, $userid ) |
|
220 | - { |
|
219 | + $context->setGroupIds( function() use ( $context, $userid ) { |
|
221 | 220 | $manager = \Aimeos\MShop::create( $context, 'customer' ); |
222 | 221 | return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups(); |
223 | 222 | } ); |