Fixes
This commit is contained in:
parent
0715914ac4
commit
15a0c5cadb
@ -12,10 +12,12 @@ services:
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
web:
|
||||
environment:
|
||||
- APP_ENV=dev
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
php-fpm:
|
||||
environment:
|
||||
- APP_ENV=dev
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
environment:
|
||||
- APP_ENV=test
|
||||
|
||||
Binary file not shown.
@ -1500,7 +1500,7 @@ CREATE TABLE `credit_system` (
|
||||
|
||||
LOCK TABLES `credit_system` WRITE;
|
||||
/*!40000 ALTER TABLE `credit_system` DISABLE KEYS */;
|
||||
INSERT INTO `credit_system` VALUES (1,1,1,'2015-03-18 11:30:30','2015-03-18 14:33:45','Sonderaktion - Neueröffnung unseres Shops',100,NULL,'2015-03-01','2015-05-31',0,5.45,0,'0','','0',1,1,1,1,1),(2,3,NULL,'2023-10-11 14:41:44','2024-05-31 17:32:44','100euro',1,1,'2023-10-11','2024-10-11',0,100,1,NULL,'hddecal-1',NULL,1,1,1,0,0),(4,3,NULL,'2024-03-26 10:24:14','2024-04-02 09:42:16','earlybird24',1,1,'2024-02-26','2024-04-26',1,10,1,NULL,'earlybird24',NULL,1,0,0,1,1),(5,3,NULL,'2024-05-31 17:14:03','2024-05-31 17:14:03','Neuer Gutschein',1,1,'2024-05-27','2024-06-26',1,100,1,NULL,'dashboard_quick_press_last_post_id',NULL,1,1,1,1,1),(6,3,NULL,'2024-05-31 18:07:08','2024-05-31 18:07:24','Göhre 15% Backup',1,1,'2024-05-31','2024-08-31',1,15,1,NULL,'goehre15-2',NULL,1,0,0,0,0);
|
||||
INSERT INTO `credit_system` VALUES (1,1,1,'2015-03-18 11:30:30','2015-03-18 14:33:45','Sonderaktion - Neueröffnung unseres Shops',100,NULL,'2015-03-01','2015-05-31',0,5.45,0,'0','','0',1,1,1,1,1,0),(2,3,NULL,'2023-10-11 14:41:44','2024-05-31 17:32:44','100euro',1,1,'2023-10-11','2024-10-11',0,100,1,NULL,'hddecal-1',NULL,1,1,1,0,0,0),(4,3,NULL,'2024-03-26 10:24:14','2024-04-02 09:42:16','earlybird24',1,1,'2024-02-26','2024-04-26',1,10,1,NULL,'earlybird24',NULL,1,0,0,1,1,0),(5,3,NULL,'2024-05-31 17:14:03','2024-05-31 17:14:03','Neuer Gutschein',1,1,'2024-05-27','2024-06-26',1,100,1,NULL,'dashboard_quick_press_last_post_id',NULL,1,1,1,1,1,0),(6,3,NULL,'2024-05-31 18:07:08','2024-05-31 18:07:24','Göhre 15% Backup',1,1,'2024-05-31','2024-08-31',1,15,1,NULL,'goehre15-2',NULL,1,0,0,0,0,0);
|
||||
/*!40000 ALTER TABLE `credit_system` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
{
|
||||
|
||||
protected $shop_id = 0;
|
||||
|
||||
protected Shop $shop;
|
||||
@ -23,7 +23,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$autoloader->pushAutoloader(
|
||||
array(
|
||||
'Doctrine',
|
||||
'autoload'), 'Doctrine'
|
||||
'autoload'),
|
||||
'Doctrine'
|
||||
);
|
||||
$autoloaderModule = new Zend_Application_Module_Autoloader(
|
||||
array(
|
||||
@ -38,8 +39,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
protected function _initDb()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/database.ini', APPLICATION_ENV);
|
||||
/**
|
||||
* @see Zend_Db
|
||||
@ -54,9 +54,19 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
)
|
||||
);*/
|
||||
$cacheDriver = new Doctrine_Cache_Array();
|
||||
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] == 'test') {
|
||||
$dsn = 'mysql:dbname=psc_test;host=mysql';
|
||||
$user = 'psc';
|
||||
$password = 'psc';
|
||||
} elseif (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] == 'dev') {
|
||||
$dsn = 'mysql:dbname=psc;host=mysql';
|
||||
$user = 'psc';
|
||||
$password = 'psc';
|
||||
} else {
|
||||
$dsn = 'mysql:dbname=psc;host=mysql';
|
||||
$user = 'root';
|
||||
$password = 'Wichtig1';
|
||||
}
|
||||
|
||||
if ((isset($_REQUEST['ARTID']) || isset($_REQUEST['artid']) || isset($_POST['ARTID'])) && (strpos($_SERVER['REQUEST_URI'], 'upload') !== false || strpos($_SERVER['REQUEST_URI'], 'template') !== false || strpos($_SERVER['REQUEST_URI'], 'basket') !== false || strpos($_SERVER['REQUEST_URI'], 'article') !== false)) {
|
||||
if (strlen($_REQUEST['ARTID']) > 100) {
|
||||
@ -80,16 +90,15 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
* Configure Doctrine
|
||||
*/
|
||||
Zend_Registry::set(
|
||||
'doctrine_config', array (
|
||||
'doctrine_config',
|
||||
array(
|
||||
'data_fixtures_path' => dirname(__FILE__) . '/doctrine/data/fixtures',
|
||||
'models_path' => dirname(__FILE__) . '/models',
|
||||
'migrations_path' => dirname(__FILE__) . '/doctrine/migrations',
|
||||
'sql_path' => dirname(__FILE__) . '/doctrine/data/sql',
|
||||
'yaml_schema_path' => dirname(__FILE__) . '/doctrine/schema')
|
||||
);
|
||||
}
|
||||
catch ( Exception $e )
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
die($e->getMessage());
|
||||
}
|
||||
}
|
||||
@ -109,17 +118,12 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
} else {
|
||||
if (isset($_POST['ARTID'])) {
|
||||
Zend_Registry::get('log')->debug($_POST['ARTID']);
|
||||
try
|
||||
{
|
||||
try {
|
||||
Zend_Session::setId($_POST['ARTID']);
|
||||
}
|
||||
catch ( Exception $e )
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
Zend_Registry::get('log')->debug($e->getMessage());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Zend_Session::setId($_REQUEST['ARTID']);
|
||||
}
|
||||
}
|
||||
@ -140,8 +144,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
}
|
||||
protected function _initLayout()
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
if ($_SERVER["SERVER_NAME"] == "" && isset($_SERVER["HTTP_HOST"]) && $_SERVER["HTTP_HOST"] != "") {
|
||||
$_SERVER["SERVER_NAME"] = $_SERVER["HTTP_HOST"];
|
||||
}
|
||||
@ -187,7 +190,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$config->layoutPath = APPLICATION_PATH . '/' . str_replace('%LAYOUT%', $shop->layout, $config->layoutPath);
|
||||
}
|
||||
} else {
|
||||
if(!file_exists(APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath))) { mkdir(APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath));
|
||||
if (!file_exists(APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath))) {
|
||||
mkdir(APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath));
|
||||
}
|
||||
if (strpos('_'.$shop->layout, "/")) {
|
||||
$config->layoutPath = APPLICATION_PATH . str_replace('%LAYOUT%', "", $config->layoutPath) . $shop->layout;
|
||||
@ -208,17 +212,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
if (isset($_GET['no_cache'])) {
|
||||
TP_Util::clearCache(TP_Util::CLEAR_ALL);
|
||||
}
|
||||
}
|
||||
catch ( Exception $e )
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getTraceAsString());
|
||||
die(var_dump($e));
|
||||
}
|
||||
}
|
||||
protected function _initLanguage()
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/printshopcreator.ini', APPLICATION_ENV, true);
|
||||
Zend_Registry::set('marketid', $config->marketid);
|
||||
if (isset($_REQUEST['ticketid']) && strpos($_SERVER['REQUEST_URI'], 'service/upload') !== false) {
|
||||
@ -239,17 +240,15 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
} else {
|
||||
$locale = new Zend_Locale('de_DE');
|
||||
}
|
||||
}
|
||||
elseif (Zend_Session::namespaceIsset('lang') ) {
|
||||
} elseif (Zend_Session::namespaceIsset('lang')) {
|
||||
$lang = new Zend_Session_Namespace('lang');
|
||||
$locale = new Zend_Locale($lang->code);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$locale = new Zend_Locale($this->shop->getDefaultLocale());
|
||||
}
|
||||
|
||||
if(!file_exists(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/')) { mkdir(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/');
|
||||
if (!file_exists(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/')) {
|
||||
mkdir(APPLICATION_PATH . '/../cache/'.$this->shop_id.'/');
|
||||
}
|
||||
|
||||
$frontendOptions = array(
|
||||
@ -274,7 +273,10 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
Zend_Translate::setCache($fcache);
|
||||
|
||||
$translate = new Zend_Translate(
|
||||
'TP_Translate_Adapter_Frontend_Db', APPLICATION_PATH . '/locale', $locale, array (
|
||||
'TP_Translate_Adapter_Frontend_Db',
|
||||
APPLICATION_PATH . '/locale',
|
||||
$locale,
|
||||
array(
|
||||
'scan' => Zend_Translate::LOCALE_DIRECTORY)
|
||||
);
|
||||
|
||||
@ -287,17 +289,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
Zend_Registry::set('cache', $cache);
|
||||
Zend_Registry::set('filecache', $fcache);
|
||||
Zend_Form::setDefaultTranslator($translate);
|
||||
}
|
||||
catch ( Exception $e )
|
||||
{
|
||||
} catch (Exception $e) {
|
||||
die($e->getMessage());
|
||||
}
|
||||
}
|
||||
protected function _initArticleQueues()
|
||||
{
|
||||
$articles = array();
|
||||
foreach ( new DirectoryIterator(APPLICATION_PATH . '/articles') as $file )
|
||||
{
|
||||
foreach (new DirectoryIterator(APPLICATION_PATH . '/articles') as $file) {
|
||||
if ($file == '.' || $file == '..' || $file == '.svn' || $file == '.DS_Store') {
|
||||
continue;
|
||||
}
|
||||
@ -307,8 +306,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
}
|
||||
Zend_Registry::set('articles', $articles);
|
||||
$queues = array();
|
||||
foreach ( new DirectoryIterator(APPLICATION_PATH . '/queues') as $file )
|
||||
{
|
||||
foreach (new DirectoryIterator(APPLICATION_PATH . '/queues') as $file) {
|
||||
if ($file == '.' || $file == '..' || $file == '.svn' || $file == '.DS_Store') {
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user