From 272102358d1ca7df166278b49386a8c1d692ffb7 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Tue, 5 Nov 2024 13:56:03 +0100 Subject: [PATCH] Add new column storage_folder to sys_reactions table --- Configuration/TCA/Overrides/sys_reaction.php | 50 +++-- .../Private/Language/de.locallang_db.xlf | 9 + Resources/Private/Language/locallang_db.xlf | 6 + composer.json | 3 +- ext_emconf.php | 1 + ext_tables.sql | 188 ++++++++++-------- 6 files changed, 154 insertions(+), 103 deletions(-) diff --git a/Configuration/TCA/Overrides/sys_reaction.php b/Configuration/TCA/Overrides/sys_reaction.php index 0946a462..c98abd51 100644 --- a/Configuration/TCA/Overrides/sys_reaction.php +++ b/Configuration/TCA/Overrides/sys_reaction.php @@ -21,30 +21,46 @@ 'icon' => \JWeiland\Events2\Reaction\ImportEventsReaction::getIconIdentifier(), ] ); -} -$GLOBALS['TCA']['sys_reaction']['palettes']['setStorage'] = [ - 'label' => 'LLL:EXT:reactions/Resources/Private/Language/locallang_db.xlf:palette.additional', - 'showitem' => 'storage_pid, impersonate_user', -]; + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns( + 'sys_reaction', + [ + 'storage_folder' => [ + 'label' => 'LLL:EXT:events2/Resources/Private/Language/locallang_db.xlf:sys_reactions.storage_folder', + 'description' => 'LLL:EXT:events2/Resources/Private/Language/locallang_db.xlf:sys_reactions.storage_folder.description', + 'config' => [ + 'type' => 'folder', + 'required' => true, + 'maxitems' => 1, + 'size' => 1, + ], + ], + ] + ); + + $GLOBALS['TCA']['sys_reaction']['palettes']['setStorage'] = [ + 'label' => 'LLL:EXT:reactions/Resources/Private/Language/locallang_db.xlf:palette.additional', + 'showitem' => 'storage_pid, impersonate_user, --linebreak--, storage_folder', + ]; -$GLOBALS['TCA']['sys_reaction']['types'][\JWeiland\Events2\Reaction\ImportEventsReaction::getType()] = [ - 'showitem' => ' + $GLOBALS['TCA']['sys_reaction']['types'][\JWeiland\Events2\Reaction\ImportEventsReaction::getType()] = [ + 'showitem' => ' --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, --palette--;;config, --palette--;;setStorage, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, --palette--;;access', - 'columnsOverrides' => [ - 'storage_pid' => [ - 'config' => [ - 'required' => true, + 'columnsOverrides' => [ + 'storage_pid' => [ + 'config' => [ + 'required' => true, + ], ], - ], - 'impersonate_user' => [ - 'config' => [ - 'required' => true, + 'impersonate_user' => [ + 'config' => [ + 'required' => true, + ], ], ], - ], -]; + ]; +} diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf index b2f23e9e..340e9b5a 100644 --- a/Resources/Private/Language/de.locallang_db.xlf +++ b/Resources/Private/Language/de.locallang_db.xlf @@ -554,6 +554,15 @@ Month Monat + + + Storage location for images + Speicherort für Bilder + + + Select a storage location for the images to be imported + Wähle einen Speicherort für die zu importierenden Bilder + diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index a942eb58..280c627d 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -441,6 +441,12 @@ Month + + Storage location for images + + + Select a storage location for the images to be imported + diff --git a/composer.json b/composer.json index e9be9f66..63823a92 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "ext-dom": "*", "ext-libxml": "*", "sjbr/static-info-tables": "^12.4", - "typo3/cms-core": "^12.4.8" + "typo3/cms-core": "^12.4.8", + "typo3/cms-reactions": "^12.4.8" }, "require-dev": { "ergebnis/composer-normalize": "~2.42.0", diff --git a/ext_emconf.php b/ext_emconf.php index 5635b15b..e05e3868 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -19,6 +19,7 @@ 'constraints' => [ 'depends' => [ 'typo3' => '12.4.8-12.4.99', + 'reactions' => '12.4.8-12.4.99', ], 'conflicts' => [ ], diff --git a/ext_tables.sql b/ext_tables.sql index 727e1620..4bac0bfe 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -1,139 +1,157 @@ # # Table structure for table 'tx_events2_domain_model_event' # -CREATE TABLE tx_events2_domain_model_event ( - event_type varchar(255) DEFAULT '' NOT NULL, - top_of_list tinyint(1) unsigned DEFAULT '0' NOT NULL, - title varchar(255) DEFAULT '' NOT NULL, - path_segment varchar(2048) DEFAULT '' NOT NULL, - teaser varchar(255) DEFAULT '' NOT NULL, - event_begin int(11) DEFAULT '0' NOT NULL, - event_end int(11) DEFAULT '0' NOT NULL, - event_time int(11) unsigned DEFAULT '0', - same_day tinyint(1) unsigned DEFAULT '0' NOT NULL, - multiple_times int(11) unsigned DEFAULT '0' NOT NULL, - xth int(11) DEFAULT '0' NOT NULL, - weekday int(11) DEFAULT '0' NOT NULL, - different_times int(11) unsigned DEFAULT '0' NOT NULL, - each_weeks int(11) DEFAULT '0' NOT NULL, - each_months int(11) DEFAULT '0' NOT NULL, - recurring_end int(11) DEFAULT '0' NOT NULL, - exceptions int(11) DEFAULT '0' NOT NULL, - detail_information text, - free_entry tinyint(1) unsigned DEFAULT '0' NOT NULL, - ticket_link varchar(11) DEFAULT '' NOT NULL, - days int(11) unsigned DEFAULT '0' NOT NULL, - location int(11) unsigned DEFAULT '0', - organizers int(11) unsigned DEFAULT '0', - images int(11) unsigned DEFAULT '0', - video_link varchar(11) DEFAULT '' NOT NULL, - download_links varchar(255) DEFAULT '' NOT NULL, - import_id varchar(255) DEFAULT '' NOT NULL, +CREATE TABLE tx_events2_domain_model_event +( + event_type varchar(255) DEFAULT '' NOT NULL, + top_of_list tinyint(1) unsigned DEFAULT '0' NOT NULL, + title varchar(255) DEFAULT '' NOT NULL, + path_segment varchar(2048) DEFAULT '' NOT NULL, + teaser varchar(255) DEFAULT '' NOT NULL, + event_begin int(11) DEFAULT '0' NOT NULL, + event_end int(11) DEFAULT '0' NOT NULL, + event_time int(11) unsigned DEFAULT '0', + same_day tinyint(1) unsigned DEFAULT '0' NOT NULL, + multiple_times int(11) unsigned DEFAULT '0' NOT NULL, + xth int(11) DEFAULT '0' NOT NULL, + weekday int(11) DEFAULT '0' NOT NULL, + different_times int(11) unsigned DEFAULT '0' NOT NULL, + each_weeks int(11) DEFAULT '0' NOT NULL, + each_months int(11) DEFAULT '0' NOT NULL, + recurring_end int(11) DEFAULT '0' NOT NULL, + exceptions int(11) DEFAULT '0' NOT NULL, + detail_information text, + free_entry tinyint(1) unsigned DEFAULT '0' NOT NULL, + ticket_link varchar(11) DEFAULT '' NOT NULL, + days int(11) unsigned DEFAULT '0' NOT NULL, + location int(11) unsigned DEFAULT '0', + organizers int(11) unsigned DEFAULT '0', + images int(11) unsigned DEFAULT '0', + video_link varchar(11) DEFAULT '' NOT NULL, + download_links varchar(255) DEFAULT '' NOT NULL, + import_id varchar(255) DEFAULT '' NOT NULL, - KEY path_segment (path_segment(185), uid) + KEY path_segment (path_segment(185), uid) ); # # Table structure for table 'tx_events2_domain_model_day' # -CREATE TABLE tx_events2_domain_model_day ( - day int(11) unsigned DEFAULT '0' NOT NULL, - day_time int(11) unsigned DEFAULT '0' NOT NULL, - sort_day_time int(11) unsigned DEFAULT '0' NOT NULL, - same_day_time int(11) unsigned DEFAULT '0' NOT NULL, - is_removed_date tinyint(1) unsigned DEFAULT '0' NOT NULL, - event int(11) unsigned DEFAULT '0' NOT NULL, +CREATE TABLE tx_events2_domain_model_day +( + day int(11) unsigned DEFAULT '0' NOT NULL, + day_time int(11) unsigned DEFAULT '0' NOT NULL, + sort_day_time int(11) unsigned DEFAULT '0' NOT NULL, + same_day_time int(11) unsigned DEFAULT '0' NOT NULL, + is_removed_date tinyint(1) unsigned DEFAULT '0' NOT NULL, + event int(11) unsigned DEFAULT '0' NOT NULL, - KEY keyForDay (day), - KEY booster (event,pid,hidden,day,sort_day_time,day_time,tstamp,crdate,uid) + KEY keyForDay (day), + KEY booster (event,pid,hidden,day,sort_day_time,day_time,tstamp,crdate,uid) ); # # Table structure for table 'tx_events2_domain_model_time' # -CREATE TABLE tx_events2_domain_model_time ( - type varchar(50) DEFAULT '' NOT NULL, - weekday varchar(10) DEFAULT '' NOT NULL, - time_begin varchar(5) DEFAULT '' NOT NULL, - time_entry varchar(5) DEFAULT '' NOT NULL, - duration varchar(5) DEFAULT '' NOT NULL, - time_end varchar(5) DEFAULT '' NOT NULL, - event int(11) unsigned DEFAULT '0' NOT NULL, - exception int(11) unsigned DEFAULT '0' NOT NULL, +CREATE TABLE tx_events2_domain_model_time +( + type varchar(50) DEFAULT '' NOT NULL, + weekday varchar(10) DEFAULT '' NOT NULL, + time_begin varchar(5) DEFAULT '' NOT NULL, + time_entry varchar(5) DEFAULT '' NOT NULL, + duration varchar(5) DEFAULT '' NOT NULL, + time_end varchar(5) DEFAULT '' NOT NULL, + event int(11) unsigned DEFAULT '0' NOT NULL, + exception int(11) unsigned DEFAULT '0' NOT NULL, - KEY eventType (event,type) + KEY eventType (event,type) ); # # Table structure for table 'tx_events2_domain_model_exception' # -CREATE TABLE tx_events2_domain_model_exception ( - exception_type varchar(255) DEFAULT '' NOT NULL, - exception_date int(11) DEFAULT '0' NOT NULL, - exception_time int(11) unsigned DEFAULT '0', - exception_details text, - show_anyway tinyint(1) unsigned DEFAULT '0' NOT NULL, - mark_as varchar(255) DEFAULT '' NOT NULL, - event int(11) unsigned DEFAULT '0' NOT NULL, +CREATE TABLE tx_events2_domain_model_exception +( + exception_type varchar(255) DEFAULT '' NOT NULL, + exception_date int(11) DEFAULT '0' NOT NULL, + exception_time int(11) unsigned DEFAULT '0', + exception_details text, + show_anyway tinyint(1) unsigned DEFAULT '0' NOT NULL, + mark_as varchar(255) DEFAULT '' NOT NULL, + event int(11) unsigned DEFAULT '0' NOT NULL, - KEY events (event) + KEY events (event) ); # # Table structure for table 'tx_events2_domain_model_location' # -CREATE TABLE tx_events2_domain_model_location ( - location varchar(255) DEFAULT '' NOT NULL, - street varchar(255) DEFAULT '' NOT NULL, - house_number varchar(10) DEFAULT '' NOT NULL, - zip varchar(10) DEFAULT '' NOT NULL, - city varchar(255) DEFAULT '' NOT NULL, - country int(11) unsigned DEFAULT '0', - link int(11) unsigned DEFAULT '0' +CREATE TABLE tx_events2_domain_model_location +( + location varchar(255) DEFAULT '' NOT NULL, + street varchar(255) DEFAULT '' NOT NULL, + house_number varchar(10) DEFAULT '' NOT NULL, + zip varchar(10) DEFAULT '' NOT NULL, + city varchar(255) DEFAULT '' NOT NULL, + country int(11) unsigned DEFAULT '0', + link int(11) unsigned DEFAULT '0' ); # # Table structure for table 'tx_events2_domain_model_organizer' # -CREATE TABLE tx_events2_domain_model_organizer ( - organizer varchar(255) DEFAULT '' NOT NULL, - hide_in_filter tinyint(1) DEFAULT '0' NOT NULL, - link int(11) unsigned DEFAULT '0' +CREATE TABLE tx_events2_domain_model_organizer +( + organizer varchar(255) DEFAULT '' NOT NULL, + hide_in_filter tinyint(1) DEFAULT '0' NOT NULL, + link int(11) unsigned DEFAULT '0' ); # # Table structure for table 'tx_events2_domain_model_link' # -CREATE TABLE tx_events2_domain_model_link ( - title varchar(255) DEFAULT '' NOT NULL, - link varchar(255) DEFAULT '' NOT NULL +CREATE TABLE tx_events2_domain_model_link +( + title varchar(255) DEFAULT '' NOT NULL, + link varchar(255) DEFAULT '' NOT NULL ); # # Table structure for table 'tx_events2_domain_model_holiday' # -CREATE TABLE tx_events2_domain_model_holiday ( - title varchar(255) DEFAULT '' NOT NULL, - day int(2) unsigned DEFAULT '0' NOT NULL, - month int(2) unsigned DEFAULT '0' NOT NULL +CREATE TABLE tx_events2_domain_model_holiday +( + title varchar(255) DEFAULT '' NOT NULL, + day int(2) unsigned DEFAULT '0' NOT NULL, + month int(2) unsigned DEFAULT '0' NOT NULL ); # # Table structure for table 'tx_events2_event_organizer_mm' # -CREATE TABLE tx_events2_event_organizer_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_events2_event_organizer_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 'fe_users' # -CREATE TABLE fe_users ( - tx_events2_organizer int(11) unsigned DEFAULT '0' NOT NULL +CREATE TABLE fe_users +( + tx_events2_organizer int(11) unsigned DEFAULT '0' NOT NULL +); + +# +# Table structure for table 'sys_reaction' +# +CREATE TABLE sys_reaction +( + storage_folder varchar(255) DEFAULT '' NOT NULL );