Skip to content

Commit 3072411

Browse files
committed
Merge branch 'release/11.0.8' into master-v11
2 parents 877809d + a47c4f7 commit 3072411

File tree

9 files changed

+40
-15
lines changed

9 files changed

+40
-15
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# In2publish Core Change Log
22

3+
11.0.8
4+
- [META] Set the EM conf version number to 11.0.8
5+
- [BUGFIX] Sort query results by language
6+
- [BUGFIX] Use suitable default values in SQL dumps
7+
- [BUGFIX] Add missing word in german translation
8+
- [BUGFIX] Fix DiskSpeed performance test units
9+
- [BUGFIX] Fix DBInit performance test units
10+
11+
11.0.7:
12+
- [TASK] Raise version number in ext_emconf.php
13+
- Update de.locallang.xlf
14+
315
11.0.6:
416
- [META] Set the EM conf version number to 11.0.6
517
- [DOCS] Update changelog

Classes/Component/RecordHandling/DefaultRecordFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public function enrichRecordWithRelatedRecords(RecordInterface $record, array $e
504504
'foreign_table_where' => 'AND {#sys_category}.{#sys_language_uid} IN (-1, 0)',
505505
'MM' => 'sys_category_record_mm',
506506
'MM_match_fields' => [
507-
'fieldname' => 'categories',
507+
'fieldname' => $propertyName,
508508
'tablenames' => $recordTableName,
509509
],
510510
'MM_opposite_field' => 'items',

Classes/Features/SimplifiedOverviewAndPublishing/Domain/Repository/SingleDatabaseRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function findByProperty(string $table, string $property, array $values):
4040
$query->orderBy('uid');
4141
}
4242

43+
if (!empty($GLOBALS['TCA'][$table]['ctrl']['languageField'])) {
44+
$query->addOrderBy($GLOBALS['TCA'][$table]['ctrl']['languageField']);
45+
}
46+
4347
$result = $query->execute();
4448
return array_column($result->fetchAllAssociative(), null, 'uid');
4549
}

Classes/Testing/Tests/Performance/DiskSpeedPerformanceTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ static function () use ($targetFile) {
105105
$writeTime = $readAndWriteTime - $readTime;
106106

107107
$messages = [];
108-
$messages[] = 'Read: ' . $readTime . ' msec';
109-
$messages[] = 'Write: ' . $writeTime . ' msec';
108+
$messages[] = 'Read: ' . round($readTime * 1e6) . ' μs';
109+
$messages[] = 'Write: ' . round($writeTime * 1e6) . ' μs';
110110

111111
$severity = TestResult::WARNING;
112112
if (
@@ -128,7 +128,7 @@ static function () use ($targetFile) {
128128
'performance.fs_io.rw_time',
129129
$severity,
130130
$messages,
131-
[(string)$readAndWriteTime]
131+
[(string) round($readAndWriteTime * 1e6)]
132132
);
133133
}
134134

Classes/Testing/Tests/Performance/ForeignDbInitializationPerformanceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public function run(): TestResult
6868
$median = (array_sum($times) / count($times));
6969
$messages = [];
7070
sort($times);
71-
$messages[] = 'Fastest: ' . $times[0] . ' msec';
72-
$messages[] = 'Slowest: ' . $times[9] . ' msec';
71+
$messages[] = 'Fastest: ' . $times[0] . ' μs';
72+
$messages[] = 'Slowest: ' . $times[9] . ' μs';
7373

7474
$severity = TestResult::WARNING;
7575
if ($median < self::THRESHOLD[TestResult::OK]) {

Classes/Utility/DatabaseUtility.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,19 @@ protected static function createBackup(Connection $connection, string $tableName
221221
$resultSet = $query->select('*')->from($tableName)->execute();
222222

223223
while (($row = $resultSet->fetchAssociative())) {
224-
$data .=
225-
'INSERT INTO ' . $tableName . ' VALUES (' .
226-
implode(',', array_map([$connection, 'quote'], $row)) .
227-
');' . PHP_EOL;
224+
foreach ($row as $index => $value) {
225+
if (!empty($value) && is_string($value)) {
226+
$row[$index] = $connection->quote($value);
227+
} elseif (is_string($value)) {
228+
$row[$index] = "''";
229+
} elseif (is_int($value)) {
230+
$row[$index] = (int)$value;
231+
} elseif (is_null($value)) {
232+
$row[$index] = 'NULL';
233+
}
234+
}
235+
$values = implode(',', $row);
236+
$data .= "INSERT INTO $tableName VALUES ($values)" . ';' . "\n";
228237
}
229238

230239
$backupWritten = false;

Resources/Private/Language/de.locallang.testing.xlf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@
621621

622622
<trans-unit id="performance.db_init.init_time">
623623
<source>The foreign database initialization took %d microseconds on average</source>
624-
<target state="translated">Die Initialisierung der entfernten benötigt im Schnitt %d Mikrosekunden</target>
624+
<target state="translated">Die Initialisierung der entfernten Datenbank benötigt im Schnitt %d Mikrosekunden</target>
625625
</trans-unit>
626626
<trans-unit id="performance.db_init.slow_help">
627627
<source>
@@ -643,8 +643,8 @@
643643
<!-- \In2code\In2publishCore\Testing\Tests\Performance\DiskSpeedPerformanceTest -->
644644

645645
<trans-unit id="performance.fs_io.rw_time">
646-
<source>Reading and writing 10 MB took %f microseconds.</source>
647-
<target state="translated">Das Lesen und Schreiben von 10 MB hat %f mikrosekunden gedauert.</target>
646+
<source>Reading and writing 10 MB took %d microseconds.</source>
647+
<target state="translated">Das Lesen und Schreiben von 10 MB hat %d Mikrosekunden gedauert.</target>
648648
</trans-unit>
649649
<trans-unit id="performance.fs_io.slow_help">
650650
<source>

Resources/Private/Language/locallang.testing.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@
505505
<!-- \In2code\In2publishCore\Testing\Tests\Performance\DiskSpeedPerformanceTest -->
506506

507507
<trans-unit id="performance.fs_io.rw_time">
508-
<source>Reading and writing 10 MB took %f microseconds.</source>
508+
<source>Reading and writing 10 MB took %d microseconds.</source>
509509
</trans-unit>
510510
<trans-unit id="performance.fs_io.slow_help">
511511
<source>

ext_emconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'title' => 'in2publish Core',
1010
'description' => 'Content publishing extension to connect stage and production server',
1111
'category' => 'plugin',
12-
'version' => '11.0.7',
12+
'version' => '11.0.8',
1313
'state' => 'stable',
1414
'clearCacheOnLoad' => true,
1515
'author' => 'Alex Kellner, Oliver Eglseder, Thomas Scheibitz, Stefan Busemann',

0 commit comments

Comments
 (0)