84 $this->limit = trim(
$limit);
91 foreach (
$GLOBALS[
'TCA'] as $tableKey => $tableValue) {
93 if ($this->limit !=
'') {
96 if ($parts[0] == 0 && $parts[1] == 0) {
100 $this->table[] = $tableKey;
101 $this->
setData($id, $tableKey, $depth, $tableValue[
'ctrl'], $filter);
117 $deletedRecords = $this->
loadData($id,
$table, $depth,
'', $filter)->getDeletedRows();
119 foreach ($this->table as $tableName) {
120 $countTotal += count($deletedRecords[$tableName]);
137 if (array_key_exists(
'delete', $tcaCtrl)) {
141 if (trim($filter) !=
'') {
145 if ($this->limit !=
'') {
147 $deletedCount =
$GLOBALS[
'TYPO3_DB']->exec_SELECTcountRows(
'uid',
$table, $deletedField .
'<>0 AND pid = ' . $id . $filterWhere);
151 $rowCount = $parts[1];
153 $result = $offset - $deletedCount;
158 $this->limit = implode(
',', array($offset, $rowCount));
167 $tempOffset = $offset;
176 if ($absResult > $rowCount) {
178 $limit = implode(
',', array($tempOffset, $rowCount));
180 $this->limit = implode(
',', array($newOffset, 0));
186 $limit = implode(
',', array($tempOffset, $absResult));
188 $newCount = $rowCount - $absResult;
190 $this->limit = implode(
',', array($newOffset, $newCount));
212 if ($recordsToCheck) {
217 if ($allowDepth && $depth >= 1) {
219 $resPages =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'uid',
'pages',
'pid=' . $id,
'',
'sorting');
221 while ($rowPages =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($resPages)) {
222 $this->
setData($rowPages[
'uid'],
$table, $depth - 1, $tcaCtrl, $filter);
224 if (
'' != $this->limit) {
227 if ($parts[0] == 0 && $parts[1] == 0) {
232 $GLOBALS[
'TYPO3_DB']->sql_free_result($resPages);
235 $this->label[
$table] = $tcaCtrl[
'label'];
236 $this->title[
$table] = $tcaCtrl[
'title'];
248 foreach ($rows as $key => $row) {
249 if (\
TYPO3\CMS\Recycler\Utility\RecyclerUtility::checkAccess(
$table, $row)) {
264 return $GLOBALS[
'TYPO3_DB']->escapeStrForLike(
$GLOBALS[
'TYPO3_DB']->quoteStr($value, $tableName), $tableName);
277 $recordsArray = json_decode($recordsArray);
278 if (is_array($recordsArray)) {
281 $tce->disableDeleteClause();
282 foreach ($recordsArray as $key => $record) {
283 $tce->deleteEl($record[0], $record[1], TRUE, TRUE);
304 $recordsArray = json_decode($recordsArray);
305 if (is_array($recordsArray)) {
306 $this->deletedRows = array();
308 foreach ($recordsArray as $key => $row) {
309 $cmd[$row[0]][$row[1]][
'undelete'] = 1;
310 if ($row[0] ==
'pages' && $recursive == TRUE) {
311 $this->
loadData($row[1],
'', $depth,
'');
313 if (count($childRecords) > 0) {
314 foreach ($childRecords as
$table => $childRows) {
315 foreach ($childRows as $childKey => $childRow) {
316 $cmd[
$table][$childRow[
'uid']][
'undelete'] = 1;
324 $tce->start(array(), $cmd);
325 $tce->process_cmdmap();
343 $this->deletedRows[
$table][] = $row;
static getRecordsByField($theTable, $theField, $theValue, $whereClause='', $groupBy='', $orderBy='', $limit='', $useDeleteClause=TRUE)
static canBeInterpretedAsInteger($var)
undeleteData($recordsArray, $recursive=FALSE)
setDeletedRows($table, array $row)
static makeInstance($className)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
getTotalCount($id, $table, $depth, $filter)
escapeValueForLike($value, $tableName)
setData($id=0, $table, $depth, $tcaCtrl, $filter)
loadData($id, $table, $depth, $limit='', $filter='')
checkRecordAccess($table, array $rows)
static getDeletedField($tableName)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
deleteData($recordsArray)