-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag '2.1.9' into release/2.2.0
This is a bugfix release. This release has: - Disable the versioning in the legacy data definition if is enable. The versioning comes as feature in a later version. #553 - Add missing select in DefaultDataProvider#getVersion() - Fix typo in active version retrieval - Fix versions fetch in DefaultDataProvider - Fix typo: 'tl_version.formTable' -> 'fromTable' - Add exception if palettes null in the palette collection #556 - Change operations to fix DBAL error see #549 - Add fallback for id property in tree picker - Fix the amount for filter all in the default limit element
- Loading branch information
Showing
18 changed files
with
100 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2020 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -13,7 +13,7 @@ | |
* @package contao-community-alliance/dc-general | ||
* @author Christian Schiffler <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -30,6 +30,8 @@ | |
* Class AbstractReturningPropertyCallbackListener. | ||
* | ||
* Abstract base class for a callback listener. | ||
* | ||
* @SuppressWarnings(PHPMD.LongClassName) | ||
*/ | ||
abstract class AbstractReturningPropertyCallbackListener extends AbstractReturningCallbackListener | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2020 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -14,7 +14,7 @@ | |
* @author Christian Schiffler <[email protected]> | ||
* @author Tristan Lins <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -28,6 +28,8 @@ | |
* Class PropertyInputFieldGetWizardCallbackListener. | ||
* | ||
* Handle the property wizard callbacks. | ||
* | ||
* @SuppressWarnings(PHPMD.LongClassName) | ||
*/ | ||
class PropertyInputFieldGetWizardCallbackListener extends AbstractReturningPropertyCallbackListener | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2020 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -13,7 +13,7 @@ | |
* @package contao-community-alliance/dc-general | ||
* @author Christian Schiffler <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -27,6 +27,8 @@ | |
* Class PropertyInputFieldGetXLabelCallbackListener. | ||
* | ||
* Handle the property wizard callbacks. | ||
* | ||
* @SuppressWarnings(PHPMD.LongClassName) | ||
*/ | ||
class PropertyInputFieldGetXLabelCallbackListener extends AbstractReturningPropertyCallbackListener | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2020 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -16,7 +16,7 @@ | |
* @author David Molineus <[email protected]> | ||
* @author Stefan Heimes <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -546,8 +546,15 @@ protected function parseDataProvider(ContainerInterface $container) | |
) | ||
); | ||
} | ||
$providerInformation | ||
->setVersioningEnabled((bool) $this->getFromDca('config/enableVersioning')); | ||
$providerInformation->setVersioningEnabled(false); | ||
if (true === (bool) $this->getFromDca('config/enableVersioning')) { | ||
// @codingStandardsIgnoreStart | ||
@\trigger_error( | ||
'Versioning is not supported yet and will get implemented in a future release.', | ||
E_USER_WARNING | ||
); | ||
// @codingStandardsIgnoreEnd | ||
} | ||
|
||
if (!$container->getBasicDefinition()->getDataProvider()) { | ||
$container->getBasicDefinition()->setDataProvider($providerName); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2020 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -13,7 +13,7 @@ | |
* @package contao-community-alliance/dc-general | ||
* @author Christian Schiffler <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -28,6 +28,8 @@ | |
* | ||
* To utilize this class, you only have to implement the remaining method "populate" and register the populators | ||
* method "process" to the event dispatcher. | ||
* | ||
* @SuppressWarnings(PHPMD.LongClassName) | ||
*/ | ||
abstract class AbstractEventDrivenBackendEnvironmentPopulator implements EnvironmentPopulatorInterface | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2020 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -19,7 +19,7 @@ | |
* @author Ingolf Steinhardt <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @author Richard Henkenjohann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -49,6 +49,8 @@ | |
* Class ContaoWidgetManager. | ||
* | ||
* This class is responsible for creating widgets and processing data through them. | ||
* | ||
* @SuppressWarnings(PHPMD.LongClassName) | ||
*/ | ||
class ContaoWidgetManager | ||
{ | ||
|
@@ -445,8 +447,8 @@ public function processInput(PropertyValueBag $propertyValues) | |
$property, | ||
$this->encodeValue($property, $widget->value, $propertyValues) | ||
); | ||
} catch (\Exception $e) { | ||
$widget->addError($e->getMessage()); | ||
} catch (\Exception $exception) { | ||
$widget->addError($exception->getMessage()); | ||
foreach ($widget->getErrors() as $error) { | ||
$propertyValues->markPropertyValueAsInvalid($property, $error); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
* @author Sven Baumann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @author Richard Henkenjohann <[email protected]> | ||
* @author Alex Wuttke <[email protected]> | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
|
@@ -695,6 +696,7 @@ public function fieldExists($columnName) | |
public function getVersion($mixID, $mixVersion) | ||
{ | ||
$queryBuilder = $this->connection->createQueryBuilder(); | ||
$queryBuilder->select('*'); | ||
$queryBuilder->from('tl_version'); | ||
$queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.pid', ':pid')); | ||
$queryBuilder->setParameter(':pid', $mixID); | ||
|
@@ -743,8 +745,8 @@ public function getVersions($mixID, $onlyActive = false) | |
$queryBuilder = $this->connection->createQueryBuilder(); | ||
$queryBuilder->select(['tstamp', 'version', 'username', 'active']); | ||
$queryBuilder->from('tl_version'); | ||
$queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.formTable', ':formTable')); | ||
$queryBuilder->setParameter(':formTable', $this->source); | ||
$queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.fromTable', ':fromTable')); | ||
$queryBuilder->setParameter(':fromTable', $this->source); | ||
$queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.pid', ':pid')); | ||
$queryBuilder->setParameter(':pid', $mixID); | ||
|
||
|
@@ -760,7 +762,7 @@ public function getVersions($mixID, $onlyActive = false) | |
return null; | ||
} | ||
|
||
$versions = $statement->fetch(\PDO::FETCH_ASSOC); | ||
$versions = $statement->fetchAll(\PDO::FETCH_ASSOC); | ||
|
||
$collection = $this->getEmptyCollection(); | ||
|
||
|
@@ -852,7 +854,7 @@ public function setVersionActive($mixID, $mixVersion) | |
public function getActiveVersion($mixID) | ||
{ | ||
$queryBuilder = $this->connection->createQueryBuilder(); | ||
$queryBuilder->select(['select']); | ||
$queryBuilder->select('version'); | ||
$queryBuilder->from('tl_version'); | ||
$queryBuilder->andWhere($queryBuilder->expr()->eq('tl_version.pid', ':pid')); | ||
$queryBuilder->setParameter(':pid', $mixID); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2019 Contao Community Alliance. | ||
* (c) 2013-2020 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -13,7 +13,8 @@ | |
* @package contao-community-alliance/dc-general | ||
* @author Sven Baumann <[email protected]> | ||
* @author Richard Henkenjohann <[email protected]> | ||
* @copyright 2013-2019 Contao Community Alliance. | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2020 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -100,6 +101,10 @@ public static function addSorting(ConfigInterface $config, QueryBuilder $queryBu | |
} | ||
|
||
foreach ($config->getSorting() as $sort => $order) { | ||
if (empty($sort)) { | ||
continue; | ||
} | ||
|
||
// array could be a simple field list or list of field => direction combinations. | ||
if (!empty($order)) { | ||
$order = strtoupper($order); | ||
|
@@ -309,7 +314,9 @@ private static function filterAndOr($operation, QueryBuilder $queryBuilder) | |
$whereOperation = strtolower($operation['operation']) . 'Where'; | ||
|
||
foreach ($children as $child) { | ||
$queryBuilder->{$whereOperation}(static::calculateSubFilter($child, $queryBuilder)); | ||
if ('' !== $child = static::calculateSubFilter($child, $queryBuilder)) { | ||
$queryBuilder->{$whereOperation}($child); | ||
} | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.