TYPO3
7.6
|
Public Member Functions | |
genTree ($theID, $depthData= '', $versions=false) | |
genTree_records ($theID, $_= '', $table= '', $versions=false) | |
lostRecords ($pid_list) | |
fixLostRecord ($table, $uid) | |
countRecords ($pid_list) | |
getGroupFields ($mode) | |
getFileFields ($uploadfolder) | |
getDBFields ($theSearchTable) | |
testFileRefs () | |
testDBRefs ($theArray) | |
whereIsFileReferenced ($uploadfolder, $filename) | |
Public Attributes | |
$genTree_includeDeleted = true | |
$genTree_includeVersions = true | |
$genTree_includeRecords = false | |
$perms_clause = '' | |
$page_idArray = array() | |
$rec_idArray = array() | |
$checkFileRefs = array() | |
$checkSelectDBRefs = array() | |
$checkGroupDBRefs = array() | |
$recStats | |
$lRecords = array() | |
$lostPagesList = '' | |
This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)
Depends on: Depends on
Definition at line 27 of file DatabaseIntegrityCheck.php.
countRecords | ( | $pid_list | ) |
Counts records from $GLOBALS['TCA']-tables that ARE attached to an existing page.
string | $pid_list | list of pid's (page-record uid's). This list is probably made by genTree() |
Definition at line 258 of file DatabaseIntegrityCheck.php.
References $GLOBALS, $list, and BackendUtility\deleteClause().
fixLostRecord | ( | $table, | |
$uid | |||
) |
Fixes lost record from $table with uid $uid by setting the PID to zero. If there is a disabled column for the record that will be set as well.
string | $table | Database tablename |
int | $uid | The uid of the record which will have the PID value set to 0 (zero) |
Definition at line 236 of file DatabaseIntegrityCheck.php.
References $GLOBALS.
array Will hold id rec pairs from genTree | ( | $theID, | |
$depthData = '' , |
|||
$versions = false |
|||
) |
Generates a list of Page-uid's that corresponds to the tables in the tree. This list should ideally include all records in the pages-table.
int | $theID | a pid (page-record id) from which to start making the tree |
string | $depthData | HTML-code (image-tags) used when this function calls itself recursively. |
bool | $versions | Internal variable, don't set from outside! |
Definition at line 102 of file DatabaseIntegrityCheck.php.
References $GLOBALS, and DatabaseIntegrityCheck\genTree_records().
genTree_records | ( | $theID, | |
$_ = '' , |
|||
$table = '' , |
|||
$versions = false |
|||
) |
int | $theID | a pid (page-record id) from which to start making the tree |
string | $_ | Unused parameter |
string | $table | Table to get the records from |
bool | $versions | Internal variable, don't set from outside! |
Definition at line 155 of file DatabaseIntegrityCheck.php.
References $GLOBALS, BackendUtility\deleteClause(), and BackendUtility\getCommonSelectFields().
Referenced by DatabaseIntegrityCheck\genTree().
getDBFields | ( | $theSearchTable | ) |
Returns an array with arrays of table/field pairs which are allowed to hold references to the input table name - according to $GLOBALS['TCA']
string | $theSearchTable | Table name |
Definition at line 336 of file DatabaseIntegrityCheck.php.
getFileFields | ( | $uploadfolder | ) |
Finds all fields that hold filenames from uploadfolder
string | $uploadfolder | Path to uploadfolder |
Definition at line 316 of file DatabaseIntegrityCheck.php.
References $GLOBALS.
Referenced by DatabaseIntegrityCheck\whereIsFileReferenced().
getGroupFields | ( | $mode | ) |
Finding relations in database based on type 'group' (files or database-uid's in a list)
string | $mode | $mode = file, $mode = db, $mode = '' (all...) |
Definition at line 288 of file DatabaseIntegrityCheck.php.
References $GLOBALS.
lostRecords | ( | $pid_list | ) |
Fills $this->lRecords with the records from all tc-tables that are not attached to a PID in the pid-list.
string | $pid_list | list of pid's (page-record uid's). This list is probably made by genTree() |
Definition at line 200 of file DatabaseIntegrityCheck.php.
References $GLOBALS, and BackendUtility\getRecordTitle().
testDBRefs | ( | $theArray | ) |
Depends on selectNonEmpty.... to be executed first!!
array | $theArray | Table with key/value pairs being table names and arrays with uid numbers |
Definition at line 517 of file DatabaseIntegrityCheck.php.
References $GLOBALS, and BackendUtility\deleteClause().
testFileRefs | ( | ) |
Depends on selectNonEmpty.... to be executed first!!
Definition at line 439 of file DatabaseIntegrityCheck.php.
References $GLOBALS, and DatabaseIntegrityCheck\whereIsFileReferenced().
whereIsFileReferenced | ( | $uploadfolder, | |
$filename | |||
) |
Finding all references to file based on uploadfolder / filename
string | $uploadfolder | Upload folder where file is found |
string | $filename | Filename to search for |
Definition at line 586 of file DatabaseIntegrityCheck.php.
References $filename, $GLOBALS, and DatabaseIntegrityCheck\getFileFields().
Referenced by DatabaseIntegrityCheck\testFileRefs().
$checkFileRefs = array() |
Definition at line 62 of file DatabaseIntegrityCheck.php.
$checkGroupDBRefs = array() |
Definition at line 72 of file DatabaseIntegrityCheck.php.
$checkSelectDBRefs = array() |
Definition at line 67 of file DatabaseIntegrityCheck.php.
$genTree_includeDeleted = true |
Definition at line 32 of file DatabaseIntegrityCheck.php.
$genTree_includeRecords = false |
Definition at line 42 of file DatabaseIntegrityCheck.php.
$genTree_includeVersions = true |
Definition at line 37 of file DatabaseIntegrityCheck.php.
$lostPagesList = '' |
Definition at line 91 of file DatabaseIntegrityCheck.php.
$lRecords = array() |
Definition at line 86 of file DatabaseIntegrityCheck.php.
$page_idArray = array() |
Definition at line 52 of file DatabaseIntegrityCheck.php.
$perms_clause = '' |
Definition at line 47 of file DatabaseIntegrityCheck.php.
$rec_idArray = array() |
Definition at line 57 of file DatabaseIntegrityCheck.php.
$recStats |
Definition at line 77 of file DatabaseIntegrityCheck.php.