@@ -95,7 +95,7 @@ |
||
| 95 | 95 | // if this page is set to load from file and loading from file is allowed, try to load it from file. |
| 96 | 96 | // if file is not available, fall back to db content |
| 97 | 97 | if (!$bReturnRaw && $this->config->getCore('allow_pages_from_file') && $basePage->cb_html_from_file === 'Y') { |
| 98 | - $filePath = PATH_BASEDIR . 'customization/pages/' . $this->config->getLang() . $basePage->cb_key; |
|
| 98 | + $filePath = PATH_BASEDIR.'customization/pages/'.$this->config->getLang().$basePage->cb_key; |
|
| 99 | 99 | if (is_file($filePath)) { |
| 100 | 100 | $this->cl_html = file_get_contents($filePath); |
| 101 | 101 | } |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | $this->setupRequest(); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $this->serviceManager->setFactory('config', function () { |
|
| 68 | + $this->serviceManager->setFactory('config', function() { |
|
| 69 | 69 | return new HelperConfig(); |
| 70 | 70 | }); |
| 71 | 71 | $this->config = $this->serviceManager->get('config'); |
| 72 | 72 | |
| 73 | - $this->serviceManager->setFactory('helper', function (ServiceManager $serviceManager) { |
|
| 73 | + $this->serviceManager->setFactory('helper', function(ServiceManager $serviceManager) { |
|
| 74 | 74 | return new \HaaseIT\HCSF\Helper($serviceManager); |
| 75 | 75 | }); |
| 76 | 76 | |
| 77 | - $this->serviceManager->setFactory('helpercustomer', function (ServiceManager $serviceManager) { |
|
| 77 | + $this->serviceManager->setFactory('helpercustomer', function(ServiceManager $serviceManager) { |
|
| 78 | 78 | return new \HaaseIT\HCSF\Customer\Helper($serviceManager); |
| 79 | 79 | }); |
| 80 | 80 | |
| 81 | - $this->serviceManager->setFactory('helpershop', function (ServiceManager $serviceManager) { |
|
| 81 | + $this->serviceManager->setFactory('helpershop', function(ServiceManager $serviceManager) { |
|
| 82 | 82 | return new \HaaseIT\HCSF\Shop\Helper($serviceManager); |
| 83 | 83 | }); |
| 84 | 84 | |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | date_default_timezone_set($this->config->getCore('defaulttimezone')); |
| 106 | 106 | |
| 107 | - $this->serviceManager->setFactory('hardcodedtextcats', function () { |
|
| 107 | + $this->serviceManager->setFactory('hardcodedtextcats', function() { |
|
| 108 | 108 | return $this->setupHardcodedTextcats(); |
| 109 | 109 | }); |
| 110 | 110 | |
| 111 | - $this->serviceManager->setFactory('db', function () { |
|
| 111 | + $this->serviceManager->setFactory('db', function() { |
|
| 112 | 112 | return null; |
| 113 | 113 | }); |
| 114 | 114 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | if ($this->config->getCore('enable_module_shop')) { |
| 126 | - $this->serviceManager->setFactory('oItem', function (ServiceManager $serviceManager) { |
|
| 126 | + $this->serviceManager->setFactory('oItem', function(ServiceManager $serviceManager) { |
|
| 127 | 127 | return new \HaaseIT\HCSF\Shop\Items($serviceManager); |
| 128 | 128 | }); |
| 129 | 129 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | // PSR-7 Stuff |
| 142 | 142 | // Init request object |
| 143 | - $this->serviceManager->setFactory('request', function () { |
|
| 143 | + $this->serviceManager->setFactory('request', function() { |
|
| 144 | 144 | $request = \Zend\Diactoros\ServerRequestFactory::fromGlobals(); |
| 145 | 145 | |
| 146 | 146 | // cleanup request |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | protected function setupDB() |
| 206 | 206 | { |
| 207 | - $this->serviceManager->setFactory('dbal', function () { |
|
| 207 | + $this->serviceManager->setFactory('dbal', function() { |
|
| 208 | 208 | $config = new \Doctrine\DBAL\Configuration(); |
| 209 | 209 | |
| 210 | 210 | $connectionParams = [ |
@@ -225,14 +225,14 @@ discard block |
||
| 225 | 225 | return \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
| 226 | 226 | }); |
| 227 | 227 | |
| 228 | - $this->serviceManager->setFactory('db', function (ServiceManager $serviceManager) { |
|
| 228 | + $this->serviceManager->setFactory('db', function(ServiceManager $serviceManager) { |
|
| 229 | 229 | return $serviceManager->get('dbal')->getWrappedConnection(); |
| 230 | 230 | }); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | protected function setupTextcats() |
| 234 | 234 | { |
| 235 | - $this->serviceManager->setFactory('textcats', function (ServiceManager $serviceManager) { |
|
| 235 | + $this->serviceManager->setFactory('textcats', function(ServiceManager $serviceManager) { |
|
| 236 | 236 | $langavailable = $this->config->getCore('lang_available'); |
| 237 | 237 | $textcats = new \HaaseIT\Toolbox\Textcat( |
| 238 | 238 | $this->config->getLang(), |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | protected function setupTwig() |
| 251 | 251 | { |
| 252 | - $this->serviceManager->setFactory('twig', function (ServiceManager $serviceManager) { |
|
| 252 | + $this->serviceManager->setFactory('twig', function(ServiceManager $serviceManager) { |
|
| 253 | 253 | $loader = new \Twig_Loader_Filesystem([PATH_BASEDIR.'customization/views', HCSF_BASEDIR.'src/views/']); |
| 254 | 254 | |
| 255 | 255 | $twig_options = [ |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | $aP['countrylist'][] = ' | '; |
| 375 | - $configcountries = $this->config->getCountries('countries_' .$this->config->getLang()); |
|
| 375 | + $configcountries = $this->config->getCountries('countries_'.$this->config->getLang()); |
|
| 376 | 376 | foreach ($configcountries as $sKey => $sValue) { |
| 377 | 377 | $aP['countrylist'][] = $sKey.'|'.$sValue; |
| 378 | 378 | } |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | |
| 115 | 115 | if (!empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { // fix for php cgi mode |
| 116 | 116 | //die($_SERVER['REDIRECT_HTTP_AUTHORIZATION']); |
| 117 | - list($user, $pass) = explode(':' , base64_decode(substr(filter_var($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], FILTER_SANITIZE_STRING), 6))); |
|
| 117 | + list($user, $pass) = explode(':', base64_decode(substr(filter_var($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], FILTER_SANITIZE_STRING), 6))); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | if (!empty($user) && !empty($pass)) { |