Project

General

Profile

Feature #22231 » 13735-suggestflexforms-trunk.patch

Administrator Admin, 2011-01-11 16:47

View differences:

t3lib/tceforms/class.t3lib_tceforms_suggest.php (working copy)
$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 . '">
<input type="text" id="' . $fieldname . 'Suggest" value="' .
......
$foreign_table_where = $GLOBALS['TCA'][$table]['columns'][$field]['config']['foreign_table_where'];
// strip ORDER BY clause
$foreign_table_where = trim(preg_replace('/ORDER[[:space:]]+BY.*/i', '', $foreign_table_where));
} else if (substr($field, 0, 13) == 'pi_flexform||'){
$divideGet = explode('||', $field);
$field = 'pi_flexform][data]['.str_replace('|','][',$divideGet[1]);
$queryTables= array($divideGet[2]);
}
$resultRows = array();
(3-3/5)