Bug #45703

method exec_foreign_table_where_query don't respect rootLevel

Added by Stefan Froemken about 8 years ago. Updated over 3 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

#1

Updated by Gerrit Code Review about 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18417

#2

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18417

#3

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18976

#4

Updated by Stefan Froemken about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#5

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF