Skip to content

Commit

Permalink
Revert "Fix I18n behaviour to take care about table cache"
Browse files Browse the repository at this point in the history
This reverts commit c8d8cff.
  • Loading branch information
alquerci committed Sep 10, 2018
1 parent d244e0d commit a6cfb23
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/Doctrine/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,11 @@ public function setTableDefinition()
$options = array('className' => $this->_options['className']);

$cols = $this->_options['table']->getColumns();
$table = $this->_options['table'];

$columnNames = (array) $table->getOption('generator_i18n_columnNames');
$columns = (array) $table->getOption('generator_i18n_columns');
$fieldNames = (array) $table->getOption('generator_i18n_fieldNames');

$columns = array();
foreach ($cols as $column => $definition) {
$fieldName = $this->_options['table']->getFieldName($column);
if (in_array($fieldName, $this->_options['fields'])) {
$columnNames[$fieldName] = $column;
$fieldNames[$column] = $cols;
$columns[$column] = $definition;

if ($column != $fieldName) {
$column .= ' as ' . $fieldName;
}
Expand All @@ -101,10 +93,6 @@ public function setTableDefinition()
}
}

$table->setOption('generator_i18n_columnNames', $columnNames);
$table->setOption('generator_i18n_columns', $columns);
$table->setOption('generator_i18n_fieldNames', $fieldNames);

$this->hasColumns($columns);

$defaultOptions = array(
Expand Down

0 comments on commit a6cfb23

Please sign in to comment.