30 parent::__construct();
32 $this->cli_options[] = array(
'--echotree level',
'When "level" is set to 1 or higher you will see the page of the page tree outputted as it is traversed. A value of 2 for "level" will show even more information.');
33 $this->cli_options[] = array(
'--pid id',
'Setting start page in page tree. Default is the page tree root, 0 (zero)');
34 $this->cli_options[] = array(
'--depth int',
'Setting traversal depth. 0 (zero) will only analyse start page (see --pid), 1 will traverse one level of subpages etc.');
35 $this->
cli_help[
'name'] =
'deleted -- To find and flush deleted records in the page tree';
36 $this->
cli_help[
'description'] = trim(
' 37 Traversing page tree and finding deleted records 40 Although deleted records are not errors to be repaired, this tool allows you to flush the deleted records completely from the system as an automatic action. Limiting this lookup by --pid and --depth can help you to narrow in the operation to a part of the page tree. 56 'message' => $this->
cli_help[
'name'] . LF . LF . $this->
cli_help[
'description'],
58 'deleted' => array(
'Index of deleted records',
'These are records from the page tree having the deleted-flag set. The --AUTOFIX option will flush them completely!', 1)
65 $resultArray[
'deleted'] = $this->recStats[
'deleted'];
79 if (isset($resultArray[
'deleted'][
'tx_templavoila_datastructure'])) {
80 $_tx_templavoila_datastructure = $resultArray[
'deleted'][
'tx_templavoila_datastructure'];
81 unset($resultArray[
'deleted'][
'tx_templavoila_datastructure']);
82 $resultArray[
'deleted'][
'tx_templavoila_datastructure'] = $_tx_templavoila_datastructure;
85 if (isset($resultArray[
'deleted'][
'pages'])) {
86 $_pages = $resultArray[
'deleted'][
'pages'];
87 unset($resultArray[
'deleted'][
'pages']);
89 $resultArray[
'deleted'][
'pages'] = array_reverse($_pages);
92 foreach ($resultArray[
'deleted'] as $table => $list) {
93 echo
'Flushing deleted records from table "' . $table .
'":' . LF;
94 foreach ($list as
$uid) {
95 echo
' Flushing record "' . $table .
':' . $uid .
'": ';
101 $tce->stripslashes_values = FALSE;
102 $tce->start(array(), array());
106 $tce->deleteRecord($table, $uid, TRUE, TRUE);
108 if (count($tce->errorLog)) {
109 echo
' ERROR from "TCEmain":' . LF .
'TCEmain:' . implode((LF .
'TCEmain:'), $tce->errorLog);
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
main_autoFix($resultArray)
static makeInstance($className)
cli_argValue($option, $idx=0)
cli_noExecutionCheck($matchString)
genTree($rootID, $depth=1000, $echoLevel=0, $callBack='')