| @@ -100,8 +100,7 @@ discard block | ||
| 100 | 100 | || ( ( $user = \Illuminate\Support\Facades\Auth::user() ) !== null && $user->superuser ) | 
| 101 | 101 |  		) { | 
| 102 | 102 | $helper = new \Aimeos\MW\View\Helper\Access\All( $view ); | 
| 103 | - } | |
| 104 | - else | |
| 103 | + } else | |
| 105 | 104 |  		{ | 
| 106 | 105 | $support = $this->support; | 
| 107 | 106 | |
| @@ -245,8 +244,7 @@ discard block | ||
| 245 | 244 |  		{ | 
| 246 | 245 | $i18n = $this->i18n->get( array( $locale ) ); | 
| 247 | 246 | $translation = $i18n[$locale]; | 
| 248 | - } | |
| 249 | - else | |
| 247 | + } else | |
| 250 | 248 |  		{ | 
| 251 | 249 | $translation = new \Aimeos\MW\Translation\None( 'en' ); | 
| 252 | 250 | } | 
| @@ -69,9 +69,12 @@ | ||
| 69 | 69 | $this->cache[$user->id][$groups] = false; | 
| 70 | 70 | $context = $this->context->get( false ); | 
| 71 | 71 | |
| 72 | -		try { | |
| 72 | + try | |
| 73 | +		{ | |
| 73 | 74 | $site = \Aimeos\MShop::create( $context, 'locale/site' )->getItem( $user->siteid )->getCode(); | 
| 74 | -		} catch( \Exception $e ) { | |
| 75 | + } | |
| 76 | + catch( \Exception $e ) | |
| 77 | +		{ | |
| 75 | 78 | $site = ( Route::current() ? Route::input( 'site', Input::get( 'site', 'default' ) ) : 'default' ); | 
| 76 | 79 | } | 
| 77 | 80 | |
| @@ -162,9 +162,12 @@ | ||
| 162 | 162 |  	{ | 
| 163 | 163 | $manager = \Aimeos\MShop::create( $context, 'customer' ); | 
| 164 | 164 | |
| 165 | -		try { | |
| 165 | + try | |
| 166 | +		{ | |
| 166 | 167 | $item = $manager->findItem( $email ); | 
| 167 | -		} catch( \Aimeos\MShop\Exception $e ) { | |
| 168 | + } | |
| 169 | + catch( \Aimeos\MShop\Exception $e ) | |
| 170 | +		{ | |
| 168 | 171 | $item = $manager->createItem(); | 
| 169 | 172 | } | 
| 170 | 173 | |
| @@ -19,7 +19,8 @@ | ||
| 19 | 19 | * Aimeos shop service provider for Laravel | 
| 20 | 20 | * @package laravel | 
| 21 | 21 | */ | 
| 22 | -class ShopServiceProvider extends ServiceProvider { | |
| 22 | +class ShopServiceProvider extends ServiceProvider | |
| 23 | +{ | |
| 23 | 24 | |
| 24 | 25 | /** | 
| 25 | 26 | * Indicates if loading of the provider is deferred. | 
| @@ -260,8 +260,7 @@ | ||
| 260 | 260 |  	{ | 
| 261 | 261 | if( ( $userid = Auth::id() ) !== null ) | 
| 262 | 262 |  		{ | 
| 263 | - $context->setGroupIds( function() use ( $context, $userid ) | |
| 264 | -			{ | |
| 263 | +			$context->setGroupIds( function() use ( $context, $userid ) { | |
| 265 | 264 | $manager = \Aimeos\MShop::create( $context, 'customer' ); | 
| 266 | 265 | return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups(); | 
| 267 | 266 | } ); | 
| @@ -68,9 +68,12 @@ discard block | ||
| 68 | 68 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); | 
| 69 | 69 | $disableSites = $this->config->get( 'shop.disableSites', true ); | 
| 70 | 70 | |
| 71 | -			try { | |
| 71 | + try | |
| 72 | +			{ | |
| 72 | 73 | $this->locale = $localeManager->bootstrap( $site, $lang, $currency, $disableSites ); | 
| 73 | -			} catch( \Aimeos\MShop\Locale\Exception $e ) { | |
| 74 | + } | |
| 75 | + catch( \Aimeos\MShop\Locale\Exception $e ) | |
| 76 | +			{ | |
| 74 | 77 | $this->locale = $localeManager->bootstrap( 'default', $lang, $currency, $disableSites ); | 
| 75 | 78 | } | 
| 76 | 79 | } | 
| @@ -90,9 +93,12 @@ discard block | ||
| 90 | 93 |  	{ | 
| 91 | 94 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); | 
| 92 | 95 | |
| 93 | -		try { | |
| 96 | + try | |
| 97 | +		{ | |
| 94 | 98 | $localeItem = $localeManager->bootstrap( $site, '', '', false, null, true ); | 
| 95 | -		} catch( \Aimeos\MShop\Exception $e ) { | |
| 99 | + } | |
| 100 | + catch( \Aimeos\MShop\Exception $e ) | |
| 101 | +		{ | |
| 96 | 102 | $localeItem = $localeManager->createItem(); | 
| 97 | 103 | } | 
| 98 | 104 | |