diff --git a/public/typo3conf/ext/ep_events/Classes/Controller/SearchController.php b/public/typo3conf/ext/ep_events/Classes/Controller/SearchController.php index 90535fb2..5ec5969e 100644 --- a/public/typo3conf/ext/ep_events/Classes/Controller/SearchController.php +++ b/public/typo3conf/ext/ep_events/Classes/Controller/SearchController.php @@ -97,7 +97,7 @@ class SearchController extends ActionController if (in_array($remoteIp, $ignoreIps)) { return; } - /** @var $logger \TYPO3\CMS\Core\Log\Logger */ + $logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); $logger->info('Searchresult processed', [ 'search' => $search->getQuery(), diff --git a/public/typo3conf/ext/ep_events/ext_localconf.php b/public/typo3conf/ext/ep_events/ext_localconf.php index 58b2ae53..f8b06954 100644 --- a/public/typo3conf/ext/ep_events/ext_localconf.php +++ b/public/typo3conf/ext/ep_events/ext_localconf.php @@ -166,7 +166,7 @@ call_user_func(function() { $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpEvents']['Controller']['writerConfiguration'] = [ \TYPO3\CMS\Core\Log\LogLevel::INFO => [ - \TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [ + \EP\EpProducts\Log\Writer::class => [ 'logTable' => 'tx_epevents_log' ], ], diff --git a/public/typo3conf/ext/ep_events/ext_tables.sql b/public/typo3conf/ext/ep_events/ext_tables.sql index 8c799af9..12f7969a 100644 --- a/public/typo3conf/ext/ep_events/ext_tables.sql +++ b/public/typo3conf/ext/ep_events/ext_tables.sql @@ -1,384 +1,396 @@ # # Table structure for table 'tx_epevents_domain_model_traveltype' # -CREATE TABLE tx_epevents_domain_model_traveltype ( +CREATE TABLE tx_epevents_domain_model_traveltype +( - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, - title varchar(255) DEFAULT '' NOT NULL, - subtitle varchar(255) DEFAULT '' NOT NULL, - headertext text NOT NULL, - subheadline varchar(255) DEFAULT '' NOT NULL, - description text NOT NULL, - bannertext text NOT NULL, - buttonlabel varchar(255) DEFAULT '' NOT NULL, - image_header int(11) unsigned NOT NULL default '0', - image_banner int(11) unsigned NOT NULL default '0', - configurator_type int(11) DEFAULT '0' NOT NULL, + title varchar(255) DEFAULT '' NOT NULL, + subtitle varchar(255) DEFAULT '' NOT NULL, + headertext text NOT NULL, + subheadline varchar(255) DEFAULT '' NOT NULL, + description text NOT NULL, + bannertext text NOT NULL, + buttonlabel varchar(255) DEFAULT '' NOT NULL, + image_header int(11) unsigned NOT NULL default '0', + image_banner int(11) unsigned NOT NULL default '0', + configurator_type int(11) DEFAULT '0' NOT NULL, - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, - hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state tinyint(4) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) ); # # Table structure for table 'tx_epevents_domain_model_offer' # -CREATE TABLE tx_epevents_domain_model_offer ( +CREATE TABLE tx_epevents_domain_model_offer +( - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, - type tinyint(4) unsigned DEFAULT '0' NOT NULL, - name varchar(255) DEFAULT '' NOT NULL, - url varchar(255) DEFAULT '' NOT NULL, - name_internal varchar(255) DEFAULT '' NOT NULL, - groupname varchar(255) DEFAULT '' NOT NULL, - price int(11) unsigned DEFAULT '0' NOT NULL, - headline varchar(255) DEFAULT '' NOT NULL, - header text NOT NULL, - arrival text NOT NULL, - schedule text NOT NULL, - services text NOT NULL, - guidelines text NOT NULL, - detail_page varchar(255) DEFAULT '' NOT NULL, - image_header int(11) unsigned NOT NULL default '0', - image_teaser int(11) unsigned NOT NULL default '0', - image_teaser_mobile int(11) unsigned NOT NULL default '0', - booking_form int(11) unsigned NOT NULL default '0', - configurator_type int(11) DEFAULT '0' NOT NULL, - configurator_budget int(11) DEFAULT '0' NOT NULL, - configurator_pax int(11) DEFAULT '0' NOT NULL, - configurator_period int(11) DEFAULT '0' NOT NULL, - contact int(11) unsigned DEFAULT '0', - hotel int(11) unsigned DEFAULT '0', - location int(11) unsigned DEFAULT '0', - activities int(11) unsigned DEFAULT '0' NOT NULL, + type tinyint(4) unsigned DEFAULT '0' NOT NULL, + name varchar(255) DEFAULT '' NOT NULL, + url varchar(255) DEFAULT '' NOT NULL, + name_internal varchar(255) DEFAULT '' NOT NULL, + groupname varchar(255) DEFAULT '' NOT NULL, + price int(11) unsigned DEFAULT '0' NOT NULL, + headline varchar(255) DEFAULT '' NOT NULL, + header text NOT NULL, + arrival text NOT NULL, + schedule text NOT NULL, + services text NOT NULL, + guidelines text NOT NULL, + detail_page varchar(255) DEFAULT '' NOT NULL, + image_header int(11) unsigned NOT NULL default '0', + image_teaser int(11) unsigned NOT NULL default '0', + image_teaser_mobile int(11) unsigned NOT NULL default '0', + booking_form int(11) unsigned NOT NULL default '0', + configurator_type int(11) DEFAULT '0' NOT NULL, + configurator_budget int(11) DEFAULT '0' NOT NULL, + configurator_pax int(11) DEFAULT '0' NOT NULL, + configurator_period int(11) DEFAULT '0' NOT NULL, + contact int(11) unsigned DEFAULT '0', + hotel int(11) unsigned DEFAULT '0', + location int(11) unsigned DEFAULT '0', + activities int(11) unsigned DEFAULT '0' NOT NULL, - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, - hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state tinyint(4) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) ); # # Table structure for table 'tx_epevents_domain_model_location' # -CREATE TABLE tx_epevents_domain_model_location ( +CREATE TABLE tx_epevents_domain_model_location +( - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, - name varchar(255) DEFAULT '' NOT NULL, - description_short text NOT NULL, - description_long text NOT NULL, - season text NOT NULL, - image_header int(11) unsigned NOT NULL default '0', - image_teaser int(11) unsigned NOT NULL default '0', - image_offer int(11) unsigned NOT NULL default '0', - configurator_distance tinyint(4) unsigned DEFAULT '0' NOT NULL, - configurator_type tinyint(4) DEFAULT '0' NOT NULL, - footer_text1 text NOT NULL, - footer_text2 text NOT NULL, - footer_text3 text NOT NULL, + name varchar(255) DEFAULT '' NOT NULL, + description_short text NOT NULL, + description_long text NOT NULL, + season text NOT NULL, + image_header int(11) unsigned NOT NULL default '0', + image_teaser int(11) unsigned NOT NULL default '0', + image_offer int(11) unsigned NOT NULL default '0', + configurator_distance tinyint(4) unsigned DEFAULT '0' NOT NULL, + configurator_type tinyint(4) DEFAULT '0' NOT NULL, + footer_text1 text NOT NULL, + footer_text2 text NOT NULL, + footer_text3 text NOT NULL, - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, - hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state tinyint(4) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) ); # # Table structure for table 'tx_epevents_domain_model_hotel' # -CREATE TABLE tx_epevents_domain_model_hotel ( +CREATE TABLE tx_epevents_domain_model_hotel +( - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, - name varchar(255) DEFAULT '' NOT NULL, - name_internal varchar(255) DEFAULT '' NOT NULL, - description text NOT NULL, - image_teaser int(11) unsigned NOT NULL default '0', - image_offer int(11) unsigned NOT NULL default '0', - configurator_type int(11) DEFAULT '0' NOT NULL, + name varchar(255) DEFAULT '' NOT NULL, + name_internal varchar(255) DEFAULT '' NOT NULL, + description text NOT NULL, + image_teaser int(11) unsigned NOT NULL default '0', + image_offer int(11) unsigned NOT NULL default '0', + configurator_type int(11) DEFAULT '0' NOT NULL, - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, - hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state tinyint(4) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) ); # # Table structure for table 'tx_epevents_domain_model_activity' # -CREATE TABLE tx_epevents_domain_model_activity ( +CREATE TABLE tx_epevents_domain_model_activity +( - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, - name varchar(255) DEFAULT '' NOT NULL, - name_internal varchar(255) DEFAULT '' NOT NULL, - path_segment varchar(255) DEFAULT '' NOT NULL, - keywords text NOT NULL, - description text NOT NULL, - footertext text NOT NULL, - bannertext text NOT NULL, - image_teaser int(11) unsigned NOT NULL default '0', - image_header int(11) unsigned NOT NULL default '0', - image_offer int(11) unsigned NOT NULL default '0', - configurator_type int(11) DEFAULT '0' NOT NULL, + name varchar(255) DEFAULT '' NOT NULL, + name_internal varchar(255) DEFAULT '' NOT NULL, + path_segment varchar(255) DEFAULT '' NOT NULL, + keywords text NOT NULL, + description text NOT NULL, + footertext text NOT NULL, + bannertext text NOT NULL, + image_teaser int(11) unsigned NOT NULL default '0', + image_header int(11) unsigned NOT NULL default '0', + image_offer int(11) unsigned NOT NULL default '0', + configurator_type int(11) DEFAULT '0' NOT NULL, - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, - hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state tinyint(4) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) ); # # Table structure for table 'tx_epevents_domain_model_contact' # -CREATE TABLE tx_epevents_domain_model_contact ( +CREATE TABLE tx_epevents_domain_model_contact +( - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, - name varchar(255) DEFAULT '' NOT NULL, - position varchar(255) DEFAULT '' NOT NULL, - email varchar(255) DEFAULT '' NOT NULL, - phone varchar(255) DEFAULT '' NOT NULL, - image int(11) unsigned NOT NULL default '0', + name varchar(255) DEFAULT '' NOT NULL, + position varchar(255) DEFAULT '' NOT NULL, + email varchar(255) DEFAULT '' NOT NULL, + phone varchar(255) DEFAULT '' NOT NULL, + image int(11) unsigned NOT NULL default '0', - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, - hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, - sorting int(11) DEFAULT '0' NOT NULL, + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, + sorting int(11) DEFAULT '0' NOT NULL, - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state tinyint(4) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) ); # # Table structure for table 'tx_epevents_domain_model_testimonial' # -CREATE TABLE tx_epevents_domain_model_testimonial ( +CREATE TABLE tx_epevents_domain_model_testimonial +( - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, - client_name varchar(255) DEFAULT '' NOT NULL, - client_image int(11) unsigned NOT NULL default '0', - quote text NOT NULL, + client_name varchar(255) DEFAULT '' NOT NULL, + client_image int(11) unsigned NOT NULL default '0', + quote text NOT NULL, - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, - hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state tinyint(4) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) ); # # Table structure for table 'tx_epevents_offer_activity_mm' # -CREATE TABLE tx_epevents_offer_activity_mm ( - uid_local int(11) unsigned DEFAULT '0' NOT NULL, - uid_foreign int(11) unsigned DEFAULT '0' NOT NULL, - sorting int(11) unsigned DEFAULT '0' NOT NULL, - sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL, +CREATE TABLE tx_epevents_offer_activity_mm +( + uid_local int(11) unsigned DEFAULT '0' NOT NULL, + uid_foreign int(11) unsigned DEFAULT '0' NOT NULL, + sorting int(11) unsigned DEFAULT '0' NOT NULL, + sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL, - KEY uid_local (uid_local), - KEY uid_foreign (uid_foreign) + KEY uid_local (uid_local), + KEY uid_foreign (uid_foreign) ); # # Table structure for table 'pages' # -CREATE TABLE pages ( - tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0', - tx_epevents_configurator_hotel_type tinyint(4) DEFAULT '0', - tx_epevents_configurator_destination_type tinyint(4) DEFAULT '0', - tx_epevents_configurator_activity_type tinyint(4) DEFAULT '0', - tx_epevents_traveltype int(11) DEFAULT '0', - tx_epevents_offer int(11) DEFAULT '0' +CREATE TABLE pages +( + tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0', + tx_epevents_configurator_hotel_type tinyint(4) DEFAULT '0', + tx_epevents_configurator_destination_type tinyint(4) DEFAULT '0', + tx_epevents_configurator_activity_type tinyint(4) DEFAULT '0', + tx_epevents_traveltype int(11) DEFAULT '0', + tx_epevents_offer int(11) DEFAULT '0' ); # # Table structure for table 'tt_content' # -CREATE TABLE tt_content ( - tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0', +CREATE TABLE tt_content +( + tx_epevents_configurator_travel_type tinyint(4) DEFAULT '0', ); # # Table structure for table 'tx_epevents_log' # -CREATE TABLE tx_epevents_log ( - request_id varchar(13) DEFAULT '' NOT NULL, - time_micro double(16,4) NOT NULL default '0.0000', - component varchar(255) DEFAULT '' NOT NULL, - level tinyint(1) unsigned DEFAULT '0' NOT NULL, - message text, - data text, +CREATE TABLE tx_epevents_log +( + request_id varchar(13) DEFAULT '' NOT NULL, + time_micro double(16, 4) NOT NULL default '0.0000', + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + component varchar(255) DEFAULT '' NOT NULL, + level tinyint(1) unsigned DEFAULT '0' NOT NULL, + message text, + data text, - KEY request (request_id) + KEY request (request_id) ); diff --git a/public/typo3conf/ext/ep_products/Classes/Log/Writer.php b/public/typo3conf/ext/ep_products/Classes/Log/Writer.php new file mode 100644 index 00000000..f57728b0 --- /dev/null +++ b/public/typo3conf/ext/ep_products/Classes/Log/Writer.php @@ -0,0 +1,40 @@ +getData(); + if (!empty($recordData)) { + if (isset($recordData['exception']) && $recordData['exception'] instanceof \Exception) { + $recordData['exception'] = (string)$recordData['exception']; + } + $data = '- ' . json_encode($recordData); + } + + $fieldValues = [ + 'request_id' => $record->getRequestId(), + 'time_micro' => $record->getCreated(), + 'tstamp' => (int) $record->getCreated(), + 'component' => $record->getComponent(), + 'level' => LogLevel::normalizeLevel($record->getLevel()), + 'message' => $record->getMessage(), + 'data' => $data + ]; + + GeneralUtility::makeInstance(ConnectionPool::class) + ->getConnectionForTable($this->logTable) + ->insert($this->logTable, $fieldValues); + + return $this; + } +} diff --git a/public/typo3conf/ext/ep_products/ext_localconf.php b/public/typo3conf/ext/ep_products/ext_localconf.php index 23cf1265..1a76c1e5 100644 --- a/public/typo3conf/ext/ep_products/ext_localconf.php +++ b/public/typo3conf/ext/ep_products/ext_localconf.php @@ -300,7 +300,7 @@ $boot = function () { $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConfiguration'] = [ \TYPO3\CMS\Core\Log\LogLevel::INFO => [ - TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class => [ + \EP\EpProducts\Log\Writer::class => [ 'logTable' => 'tx_epproducts_log' ], ], diff --git a/public/typo3conf/ext/ep_products/ext_tables.sql b/public/typo3conf/ext/ep_products/ext_tables.sql index b85e7cc2..121c16f4 100644 --- a/public/typo3conf/ext/ep_products/ext_tables.sql +++ b/public/typo3conf/ext/ep_products/ext_tables.sql @@ -1502,6 +1502,7 @@ CREATE TABLE tx_epproducts_log ( request_id varchar(13) DEFAULT '' NOT NULL, time_micro double(16, 4) NOT NULL default '0.0000', + tstamp int(11) unsigned DEFAULT '0' NOT NULL, component varchar(255) DEFAULT '' NOT NULL, level tinyint(1) unsigned DEFAULT '0' NOT NULL, message text,