Project

General

Profile

Feature #22231 » wizzards_suggest_for_flexforms.patch

Administrator Admin, 2010-03-03 18:26

View differences:

t3lib/tceforms/class.t3lib_tceforms_suggest.php
$containerCssClass = $this->cssClass . ' ' . $this->cssClass . '-position-right';
$suggestId = 'suggest-' . $table . '-' . $field . '-' . $row['uid'];
if ($field == 'pi_flexform'){
$stdPattern = 'data['.$table.']['.$row['uid'].'][pi_flexform][data][';
$ffField = str_replace($stdPattern, 'pi_flexform||', $fieldname);
$ffField = substr($ffField,0,-1);
$ffField = str_replace('][','|',$ffField);
$ffField .= '||'.$config['fieldConf']['config']['allowed'];
$field = $ffField;
}
$selector = '
<div class="' . $containerCssClass . '" id="' . $suggestId . '">
......
$field = t3lib_div::_GP('field');
$uid = t3lib_div::_GP('uid');
$pageId = t3lib_div::_GP('pid');
if (substr($field, 0, 13) == 'pi_flexform||'){
$divideGet = explode('||', $field);
$field = 'pi_flexform][data]['.str_replace('|','][',$divideGet[1]);
$ffAllowed = $divideGet[2];
}
t3lib_div::loadTCA($table);
......
$TSconfig = t3lib_BEfunc::getPagesTSconfig($pageId);
$wizardConfig = $GLOBALS['TCA'][$table]['columns'][$field]['config']['wizards']['suggest'];
$queryTables = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$field]['config']['allowed']);
$queryTables = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$field]['config']['allowed'] . ',' . $ffAllowed);
$resultRows = array();
// fetch the records for each query table. A query table is a table from which records are allowed to
(1-1/5)