Skip to content

Commit

Permalink
Fix order in Centurion_Form/Model/Abstract.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent authored and lchenay committed Jun 21, 2012
1 parent 92ef31b commit a62af6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/Centurion/Form/Model/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -975,13 +975,16 @@ protected function _columnToElements()
continue;
}


$options = array(
'label' => $this->_getElementLabel($key)
);

//TODO: remove this Media_Model_DbTable_File reference from core
if ($manyDependentTable['refTableClass'] !== 'Media_Model_DbTable_File') {
$table = Centurion_Db::getSingletonByClassName($manyDependentTable['refTableClass']);
$intersectionTable = Centurion_Db::getSingletonByClassName($manyDependentTable['intersectionTable']);

$options['multioptions'] = $this->_buildOptions(
$table,
$key,
Expand All @@ -991,7 +994,7 @@ protected function _columnToElements()

$options['multioptions'][null] = '';

if ($table->hasColumn('order')) {
if ($intersectionTable->hasColumn('order')) {
$options['class'] = 'sortable';
}

Expand Down

0 comments on commit a62af6f

Please sign in to comment.