Skip to content

Commit

Permalink
fixed wrong table in tl_user.subscriptions foreignKey
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Jun 15, 2022
1 parent 6316084 commit 41ac0ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [2.1.1] - 2022-06-15
- Fixed: user rights exception

## [2.1.0] - 2022-03-07
- Changed: allow php 8
- Fixed: removed unnecessary composer.json content
Expand Down
35 changes: 20 additions & 15 deletions src/Resources/contao/dca/tl_user.php
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
<?php

/*
* Copyright (c) 2022 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/

$arrDca = &$GLOBALS['TL_DCA']['tl_user'];

/**
/*
* Extend default palette
*/
$arrDca['palettes']['extend'] = str_replace('iso_configs', 'subscriptions,subscriptionp,iso_configs', $arrDca['palettes']['extend']);
$arrDca['palettes']['custom'] = str_replace('iso_configs', 'subscriptions,subscriptionp,iso_configs', $arrDca['palettes']['custom']);


/**
/*
* Add fields to tl_user_group
*/
$arrDca['fields']['subscriptions'] = [
'label' => &$GLOBALS['TL_LANG']['tl_user']['subscriptions'],
'exclude' => true,
'inputType' => 'checkbox',
'foreignKey' => 'tl_subscription_archive.title',
'eval' => ['multiple' => true, 'tl_class' => 'w50 w50h'],
'sql' => "blob NULL",
'label' => &$GLOBALS['TL_LANG']['tl_user']['subscriptions'],
'exclude' => true,
'inputType' => 'checkbox',
'foreignKey' => 'tl_iso_subscription_archive.title',
'eval' => ['multiple' => true, 'tl_class' => 'w50 w50h'],
'sql' => 'blob NULL',
];

$arrDca['fields']['subscriptionp'] = [
'label' => &$GLOBALS['TL_LANG']['tl_user']['subscriptionp'],
'exclude' => true,
'label' => &$GLOBALS['TL_LANG']['tl_user']['subscriptionp'],
'exclude' => true,
'inputType' => 'checkbox',
'options' => ['create', 'delete'],
'options' => ['create', 'delete'],
'reference' => &$GLOBALS['TL_LANG']['MSC'],
'eval' => ['multiple' => true, 'tl_class' => 'w50 w50h'],
'sql' => "blob NULL",
];
'eval' => ['multiple' => true, 'tl_class' => 'w50 w50h'],
'sql' => 'blob NULL',
];

0 comments on commit 41ac0ef

Please sign in to comment.