Skip to content

Commit

Permalink
reduced database size
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Feb 9, 2023
1 parent aaaa697 commit 2634e43
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.8.1] - 2023-01-09
- Changed: reduced database size

## [2.8.0] - 2022-11-01
- Changed: allow php 8
- Changed: raised php and contao dependencies
Expand Down
24 changes: 18 additions & 6 deletions src/EventListener/LoadDataContainerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
namespace HeimrichHannot\SearchBundle\EventListener;


use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;

class LoadDataContainerListener
{
/**
Expand Down Expand Up @@ -66,7 +69,7 @@ public function onLoadDataContainer(string $table)
'default' => 'exclude',
'reference' => &$GLOBALS['TL_LANG']['tl_module']['pageMode'],
'eval' => ['tl_class' => 'w50'],
'sql' => "varchar(32) NOT NULL default 'exclude'",
'sql' => "varchar(8) NOT NULL default 'exclude'",
],
'filterPages' => array_merge_recursive([
'label' => &$GLOBALS['TL_LANG']['tl_module']['filterPages'],
Expand All @@ -92,11 +95,20 @@ public function onLoadDataContainer(string $table)

$fields = [
'maxKeywordCount' => [
'label' => &$GLOBALS['TL_LANG']['tl_module']['maxKeywordCount'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('rgxp'=>'digit', 'tl_class'=>'clr w50'),
'sql' => "int(10) unsigned NOT NULL default '0'"
'label' => &$GLOBALS['TL_LANG']['tl_module']['maxKeywordCount'],
'exclude' => true,
'inputType' => 'text',
'eval' => [
'rgxp' => 'digit',
'tl_class' => 'clr w50',
'maxval' => 128,
],
'sql' => [
'type' => Types::SMALLINT,
'notnull' => true,
'unsigned' => true,
'default' => 0
]
]
];
$dca['fields'] = array_merge($fields, is_array($dca['fields']) ? $dca['fields'] : []);
Expand Down

0 comments on commit 2634e43

Please sign in to comment.