33 protected $title =
'Migrate existing filemounts to be file abstraction layer compatible.';
67 $storages = $this->storageRepository->findAll();
68 $this->storage = $storages[0];
78 $description =
'Migrate all filemounts to be based on file abstraction layer storages.';
79 $filemountCount = $this->db->exec_SELECTcountRows(
98 if (is_array($this->sqlQueries) && is_array($dbQueries)) {
99 $dbQueries = array_merge($dbQueries, $this->sqlQueries);
103 foreach ($this->storageRepository->findAll() as
$storage) {
118 $description =
'This is the local %s directory. This storage mount has been created by the TYPO3 upgrade wizards.';
119 $fileadminDir = PATH_site .
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileadminDir'];
120 $absoluteFilemounts = $this->db->exec_SELECTgetRows(
125 foreach ($absoluteFilemounts as $filemount) {
126 if (stristr($filemount[
'path'], $fileadminDir)) {
127 $storageId = $this->storage->getUid();
128 $storagePath = rtrim(str_replace($fileadminDir,
'', $filemount[
'path']),
'/') .
'/';
130 $storageId = $this->storageRepository->createLocalStorage(
131 $filemount[
'title'] .
' (auto-created)',
134 sprintf($description, $filemount[
'path'])
137 $this->sqlQueries[] =
$GLOBALS[
'TYPO3_DB']->debug_lastBuiltQuery;
139 $this->db->exec_UPDATEquery(
141 'uid=' . (
int)$filemount[
'uid'],
142 array(
'base' => $storageId,
'path' => $storagePath)
144 $this->sqlQueries[] =
$GLOBALS[
'TYPO3_DB']->debug_lastBuiltQuery;
155 $relativeFilemounts = $this->db->exec_SELECTgetRows(
160 foreach ($relativeFilemounts as $filemount) {
161 $storagePath = trim($filemount[
'path'],
'/') .
'/';
162 if ($storagePath !==
'/') {
163 $storagePath =
'/' . $storagePath;
165 $this->db->exec_UPDATEquery(
167 'uid=' . (
int)$filemount[
'uid'],
168 array(
'base' => $this->storage->getUid(),
'path' => $storagePath)
170 $this->sqlQueries[] =
$GLOBALS[
'TYPO3_DB']->debug_lastBuiltQuery;
migrateAbsoluteFilemounts()
checkForUpdate(&$description)
static makeInstance($className)
migrateRelativeFilemounts()
markWizardAsDone($confValue=1)
performUpdate(array &$dbQueries, &$customMessages)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static deleteClause($table, $tableAlias='')