Skip to content

Commit

Permalink
Merge pull request #346 from nhovratov/release-5.1.3
Browse files Browse the repository at this point in the history
Release 5.1.3
  • Loading branch information
Gernott authored Sep 2, 2020
2 parents 73303de + 694eef5 commit 9e62544
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4,017 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### [5.1.3] - 2020-09-02

### Fixed
- Fields in page templates are now shown, if backend layout has non numeric name. [#345](https://github.com/Gernott/mask/issues/345)
- Saving mask elements do not cause change in indexes when running db analyzer anymore.
- JQuery is minified again.

### [5.1.2] - 2020-07-21

### Added
Expand Down
26 changes: 5 additions & 21 deletions Classes/CodeGenerator/SqlCodeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use TYPO3\CMS\Core\Database\Schema\Exception\StatementException;
use TYPO3\CMS\Core\Database\Schema\Exception\UnexpectedSignalReturnValueTypeException;
use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
use TYPO3\CMS\Core\Database\Schema\SqlReader;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use MASK\Mask\Domain\Repository\StorageRepository;
use MASK\Mask\Helper\FieldHelper;
Expand All @@ -56,8 +57,11 @@ class SqlCodeGenerator extends AbstractCodeGenerator
* @throws StatementException
* @throws UnexpectedSignalReturnValueTypeException
*/
protected function performDbUpdates(array $sqlStatements): array
public function updateDatabase(): array
{
$sqlReader = GeneralUtility::makeInstance(SqlReader::class);
$sqlStatements = $sqlReader->getCreateTableStatementArray($sqlReader->getTablesDefinitionString());

/** @var ConnectionPool $connectionPool */
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$schemaMigrator = GeneralUtility::makeInstance(SchemaMigrator::class);
Expand Down Expand Up @@ -96,26 +100,6 @@ protected function performDbUpdates(array $sqlStatements): array
return ['success' => 'Database was successfully updated'];
}

/**
* Updates the database if necessary
*
* @return array
* @throws DBALException
* @throws SchemaException
* @throws StatementException
* @throws UnexpectedSignalReturnValueTypeException
*/
public function updateDatabase(): array
{
$storageRepository = GeneralUtility::makeInstance(StorageRepository::class);
$json = $storageRepository->load();
$sqlStatements = $this->getSqlByConfiguration($json);
if (count($sqlStatements) > 0) {
return $this->performDbUpdates($sqlStatements);
}
return [];
}

/**
* returns sql statements of all elements and pages and irre
* @param array $json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function addData(array $result)
$conditionMatcher = GeneralUtility::makeInstance(ConditionMatcher::class, null, $result['vanillaUid'], $result['rootline']);
foreach ($json['pages']['elements'] as $element) {
$key = $element['key'];
if ($conditionMatcher->match("[maskBeLayout('".$key."')]")) {
if ($conditionMatcher->match("[maskBeLayout('$key')]")) {
$result['processedTca']['types'][$result['recordTypeValue']]['showitem'] .= $tcaCodeGenerator->getPageTca($key);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Mask
mask

:Version:
|5.1.2|
|5.1.3|

:Language:
en
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
conf.py:
copyright: 2020
project: mask
version: 5.1.2
version: 5.1.3
release:
intersphinx_mapping:
t3tsref:
Expand Down
Loading

0 comments on commit 9e62544

Please sign in to comment.