TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard Class Reference
Inheritance diagram for TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard:
TYPO3\CMS\Install\Updates\AbstractUpdate Tx_Install_Updates_File_TtContentUploadsUpdateWizard

Public Member Functions

 checkForUpdate (&$description)
 
 performUpdate (array &$dbQueries, &$customMessages)
 
- Public Member Functions inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 getTitle ()
 
 setTitle ($title)
 
 getIdentifier ()
 
 setIdentifier ($identifier)
 
 shouldRenderWizard ()
 
 shouldRenderNextButton ()
 
 checkIfTableExists ($table)
 
 checkForUpdate (&$description)
 
 performUpdate (array &$dbQueries, &$customMessages)
 

Public Attributes

const FOLDER_ContentUploads = '_migrated/content_uploads'
 
- Public Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $pObj
 
 $userInput
 
 $versionNumber
 

Protected Member Functions

 checkPrerequisites ()
 
 migrateRecord (array $record)
 
 cleanRecord (array $record, $fileCount, array $collectionUids)
 
 getRecordsFromTable ()
 
 getDbalCompliantUpdateWhereClause ()
 
 getTableColumnMapping ()
 
 quoteIdentifiers (array &$mapping)
 
- Protected Member Functions inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 markWizardAsDone ($confValue=1)
 
 isWizardDone ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $title = 'Migrate file relations of tt_content "uploads"'
 
 $targetDirectory
 
 $fileFactory
 
 $fileIndexRepository
 
 $storage
 
- Protected Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $title
 
 $identifier
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Upgrade wizard which goes through all files referenced in the tt_content.media filed and creates sys_file records as well as sys_file_reference records for the individual usages.

Author
Steffen Ritter steff.nosp@m.en.r.nosp@m.itter.nosp@m.@typ.nosp@m.o3.or.nosp@m.g

Definition at line 23 of file TtContentUploadsUpdateWizard.php.

Member Function Documentation

◆ checkForUpdate()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::checkForUpdate ( $description)

Checks if an update is needed

Parameters
string&$descriptionThe description for the update
Returns
boolean TRUE if an update is needed, FALSE otherwise

Definition at line 86 of file TtContentUploadsUpdateWizard.php.

References $GLOBALS, $sql, TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\getDbalCompliantUpdateWhereClause(), and TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\getTableColumnMapping().

◆ checkPrerequisites()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::checkPrerequisites ( )
protected

Ensures a new folder "fileadmin/content_upload/" is available.

Returns
void

Definition at line 135 of file TtContentUploadsUpdateWizard.php.

Referenced by TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\performUpdate().

◆ cleanRecord()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::cleanRecord ( array  $record,
  $fileCount,
array  $collectionUids 
)
protected

Removes the old fields from the database-record

Parameters
array$record
integer$fileCount
array$collectionUids
Returns
void

Definition at line 201 of file TtContentUploadsUpdateWizard.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\migrateRecord().

◆ getDbalCompliantUpdateWhereClause()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::getDbalCompliantUpdateWhereClause ( )
protected

Returns a DBAL-compliant where clause to be used for the update where clause. We have DBAL-related code here because the SQL parser is not able to properly parse this complex condition but we know that it is compatible with the DBMS we support in TYPO3 Core.

Returns
string

Definition at line 258 of file TtContentUploadsUpdateWizard.php.

References TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\getTableColumnMapping(), and TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\quoteIdentifiers().

Referenced by TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\checkForUpdate(), and TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\getRecordsFromTable().

◆ getRecordsFromTable()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::getRecordsFromTable ( )
protected

◆ getTableColumnMapping()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::getTableColumnMapping ( )
protected

◆ migrateRecord()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::migrateRecord ( array  $record)
protected

◆ performUpdate()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::performUpdate ( array &  $dbQueries,
$customMessages 
)

Performs the database update.

Parameters
array&$dbQueriesQueries done in this update
mixed&$customMessagesCustom messages
Returns
boolean TRUE on success, FALSE on error

Definition at line 120 of file TtContentUploadsUpdateWizard.php.

References TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\checkPrerequisites(), TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\getRecordsFromTable(), and TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\migrateRecord().

◆ quoteIdentifiers()

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::quoteIdentifiers ( array &  $mapping)
protected

Quotes identifiers for DBAL-compliant query.

Parameters
array&$mapping
Returns
void

Definition at line 308 of file TtContentUploadsUpdateWizard.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard\getDbalCompliantUpdateWhereClause().

Member Data Documentation

◆ $fileFactory

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::$fileFactory
protected

Definition at line 40 of file TtContentUploadsUpdateWizard.php.

◆ $fileIndexRepository

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::$fileIndexRepository
protected

Definition at line 45 of file TtContentUploadsUpdateWizard.php.

◆ $storage

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::$storage
protected

Definition at line 50 of file TtContentUploadsUpdateWizard.php.

◆ $targetDirectory

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::$targetDirectory
protected

Definition at line 35 of file TtContentUploadsUpdateWizard.php.

◆ $title

TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::$title = 'Migrate file relations of tt_content "uploads"'
protected

Definition at line 30 of file TtContentUploadsUpdateWizard.php.

◆ FOLDER_ContentUploads

const TYPO3\CMS\Install\Updates\TtContentUploadsUpdateWizard::FOLDER_ContentUploads = '_migrated/content_uploads'

Definition at line 25 of file TtContentUploadsUpdateWizard.php.