forked from FluidTYPO3/flux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.ext_update.php
42 lines (35 loc) · 1.17 KB
/
class.ext_update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Class ext_update
*
* Performs update tasks for extension flux
*/
// @codingStandardsIgnoreStart
class ext_update
{
/**
* @return boolean
*/
public function access() {
return true;
}
/**
* @return string
*/
public function main() {
$content = '';
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_content', 'colPos = -42', ['colPos' => 18181]);
$content .= 'Switch to positive colPos (see #477): ' .
$GLOBALS['TYPO3_DB']->sql_affected_rows() . ' rows affected' . PHP_EOL;
// Fix records with wrong references (see #1176)
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_content', 'tx_flux_parent > 0 AND tx_flux_column = \'\'', ['tx_flux_parent' => 0]);
$content .= 'Fix records with wrong references (see #1176): ' .
$GLOBALS['TYPO3_DB']->sql_affected_rows() . ' rows affected' . PHP_EOL;
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_reflection');
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_reflection_tags');
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_object');
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cf_extbase_object_tags');
$content .= 'System object caches cleared.' . PHP_EOL;
return nl2br($content);
}
}