Project

General

Profile

Actions

Bug #45703

closed

method exec_foreign_table_where_query don't respect rootLevel

Added by Stefan Froemken about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2013-02-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Hello Core-Team,

I'm using the TCA tree feature for my own table. This table is defined as rootLevel = -1. That means you can set records of this table on rootPage and all other pages. But there is a problem in method exec_foreign_table_where_query. You wrote:

if ($rootLevel) {
    $queryParts = array(
        'SELECT' => self::getCommonSelectFields($foreign_table, $foreign_table . '.'),
        'FROM' => $foreign_table,
        'WHERE' => $foreign_table . '.*pid=0* ' . self::deleteClause($foreign_table) . ' ' . $wgolParts['WHERE'],
        'GROUPBY' => $wgolParts['GROUPBY'],
        'ORDERBY' => $wgolParts['ORDERBY'],
        'LIMIT' => $wgolParts['LIMIT']
    );
}

If rootLevel equals 1 this code works correct with pid=0. But it will also be executed with rootLevel=-1. But in that case pid=0 must be pid<>-1 or should be deleted completely.

Stefan

Actions

Also available in: Atom PDF