From 85c5bd7db2f39699299e11e246288d11382dae47 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sat, 30 Jan 2016 20:13:41 +0100 Subject: Add support for automatic searchFields population --- add_extbase_property.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/add_extbase_property.sh b/add_extbase_property.sh index 07c614d..b431fef 100755 --- a/add_extbase_property.sh +++ b/add_extbase_property.sh @@ -73,8 +73,14 @@ default_value="${default_values["$typ"]}" ####################################################################################################################### -# $tca -sed -i "s/\('showRecordFieldList.*\)',\$/\1, $field',/" $tca_file +# TCA + +# The first sed command is a fix for extension_builder's trailing comma in searchFields +sed -i \ + -e "s/\('searchFields' => .*\),',/\1',/" \ + -e "s/\('searchFields.*\)',\$/\1,$field',/" \ + -e "s/\('showRecordFieldList.*\)',\$/\1, $field',/" \ + $tca_file # Place before the access tab, if that is available if grep --quiet -- '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access' $tca_file; then @@ -107,8 +113,6 @@ sed -i "s/.*<\/body>/\t\t\t\n\t\t\t\t