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

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)
 

Protected Member Functions

 getRequiredUpdates ()
 
 getFileReferencesPointingToMissingTables ()
 
 getFileReferencesOnRootlevel ()
 
 getImproperConnectedFileReferences (array $skipTables=array())
 
- Protected Member Functions inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 markWizardAsDone ($confValue=1)
 
 isWizardDone ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $title = 'Ensures the database integrity for File Abstraction records'
 
- Protected Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $title
 
 $identifier
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Install\Updates\AbstractUpdate
 $pObj
 
 $userInput
 
 $versionNumber
 

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! Performs certain DB updates in order to ensure that the DB fields are set properly. 1) Ensure that there are no sys_file_reference records with PID=0 where the connected parent records (e.g. a tt_content record) are not on PID=0. 2) Make sure that all sys_file_references point to tables that still exist.

Author
Benni Mack benni.nosp@m.@typ.nosp@m.o3.or.nosp@m.g

Definition at line 28 of file ReferenceIntegrityUpdateWizard.php.

Member Function Documentation

◆ checkForUpdate()

TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard::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 41 of file ReferenceIntegrityUpdateWizard.php.

References TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard\getRequiredUpdates().

◆ getFileReferencesOnRootlevel()

TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard::getFileReferencesOnRootlevel ( )
protected

Fetches a list of all sys_file_references that have PID=0

Returns
array

Definition at line 124 of file ReferenceIntegrityUpdateWizard.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard\getImproperConnectedFileReferences().

◆ getFileReferencesPointingToMissingTables()

TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard::getFileReferencesPointingToMissingTables ( )
protected

A list of tables that are referenced by sys_file_reference that are no longer existing

Returns
array

Definition at line 106 of file ReferenceIntegrityUpdateWizard.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard\getRequiredUpdates().

◆ getImproperConnectedFileReferences()

TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard::getImproperConnectedFileReferences ( array  $skipTables = array())
protected

Fetches all sys_file_reference records that are on PID=0 BUT their counter parts (the target record) is NOT on pid=0

Parameters
array$skipTablesTable names to skip checking
Returns
array

Definition at line 145 of file ReferenceIntegrityUpdateWizard.php.

References $GLOBALS, and TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard\getFileReferencesOnRootlevel().

Referenced by TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard\getRequiredUpdates().

◆ getRequiredUpdates()

◆ performUpdate()

TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard::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 55 of file ReferenceIntegrityUpdateWizard.php.

References $GLOBALS, and TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard\getRequiredUpdates().

Member Data Documentation

◆ $title

TYPO3\CMS\Install\Updates\ReferenceIntegrityUpdateWizard::$title = 'Ensures the database integrity for File Abstraction records'
protected

Definition at line 33 of file ReferenceIntegrityUpdateWizard.php.