Actions
Bug #54843
closedSuggestElement: support for PAGE_TSCONFIG_*-values in addWhere
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-01-08
Due date:
% Done:
100%
Estimated time:
0.25 h
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
Using PAGE_TSCONFIG_*-values in the foreign_table_where-clause will limit the entries. In combination with using a suggest wizard this doesn't work. So at the moment you have the choice to
- not limiting the entries in the selectbox but to limit it in the suggest wizard
- limiting the entries in the selectbox but no results in the suggest wizard (due to an replaced marker)
In there any reason why only THIS_UID and CURRENT_PID are replaced?
if (isset($config['addWhere'])) { $config['addWhere'] = strtr( ' ' . $config['addWhere'], array( '###THIS_UID###' => intval($uid), '###CURRENT_PID###' => intval($pageId), ) ); }
This would fix it:
if (isset($config['addWhere'])) { $config['addWhere'] = strtr(' ' . $config['addWhere'], array( '###THIS_UID###' => intval($uid), '###CURRENT_PID###' => intval($pageId), '###PAGE_TSCONFIG_ID###' => intval($TSconfig['TCEFORM.'][$table . '.'][$field . '.']['PAGE_TSCONFIG_ID']), '###PAGE_TSCONFIG_IDLIST###' => $GLOBALS['TYPO3_DB']->cleanIntList($TSconfig['TCEFORM.'][$table . '.'][$field . '.']['PAGE_TSCONFIG_IDLIST']), '###PAGE_TSCONFIG_STR###' => $GLOBALS['TYPO3_DB']->quoteStr($TSconfig['TCEFORM.'][$table . '.'][$field . '.']['PAGE_TSCONFIG_STR'], $fieldConfig['foreign_table']), ) ); }
Actions