Jon W
Well-known member
In XenForo_DataWriter, the following line:
should be:
I'm trying to extend a datawriter and add a table where two columns both have the default value that is the primary key of the main table, but it will only do it if I name the column the same as the main primary key. Not sure if this is as designed.
PHP:
if ($fieldType['default'][0] == $tableName && !$this->get($field, $table))
{
$this->_newData[$table][$field] = $insertId;
}
PHP:
if ($fieldType['default'][0] == $tableName && $fieldType['default'][1] == $field && !$this->get($fieldName, $table))
{
$this->_newData[$table][$fieldName] = $insertId;
}
I'm trying to extend a datawriter and add a table where two columns both have the default value that is the primary key of the main table, but it will only do it if I name the column the same as the main primary key. Not sure if this is as designed.
Last edited: