fix: use constrained foreign key for files track_type
This commit is contained in:
parent
bcaea16c19
commit
db976881f0
26 changed files with 1233 additions and 113 deletions
|
@ -101,14 +101,14 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
|
||||
$track_type_options[''] = _('Select a Type');
|
||||
foreach ($track_types as $key => $tt) {
|
||||
$track_type_options[$tt['code']] = $tt['type_name'];
|
||||
$track_type_options[$tt['id']] = $tt['type_name'];
|
||||
}
|
||||
|
||||
$track_type = new Zend_Form_Element_Select('track_type');
|
||||
$track_type->class = 'input_text';
|
||||
$track_type->setLabel(_('Track Type:'));
|
||||
$track_type->setMultiOptions($track_type_options);
|
||||
$this->addelement($track_type);
|
||||
$track_type_id = new Zend_Form_Element_Select('track_type_id');
|
||||
$track_type_id->class = 'input_text';
|
||||
$track_type_id->setLabel(_('Track Type:'));
|
||||
$track_type_id->setMultiOptions($track_type_options);
|
||||
$this->addelement($track_type_id);
|
||||
|
||||
// Description field
|
||||
$description = new Zend_Form_Element_Textarea('description');
|
||||
|
|
|
@ -46,7 +46,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
'track_number' => 'n',
|
||||
'info_url' => 's',
|
||||
'year' => 'n',
|
||||
'track_type' => 'tt',
|
||||
'track_type_id' => 'tt',
|
||||
];
|
||||
|
||||
private function getCriteriaOptions($option = null)
|
||||
|
@ -72,7 +72,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
'mtime' => _('Last Modified'),
|
||||
'lptime' => _('Last Played'),
|
||||
'length' => _('Length'),
|
||||
'track_type' => _('Track Type'),
|
||||
'track_type_id' => _('Track Type'),
|
||||
'mime' => _('Mime'),
|
||||
'mood' => _('Mood'),
|
||||
'owner_id' => _('Owner'),
|
||||
|
@ -210,7 +210,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$tracktypes = Application_Model_Tracktype::getTracktypes();
|
||||
$names[] = _('Select Track Type');
|
||||
foreach ($tracktypes as $arr => $a) {
|
||||
$names[$a['code']] = $tracktypes[$arr]['type_name'];
|
||||
$names[$a['id']] = $tracktypes[$arr]['type_name'];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -793,7 +793,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
'track_title' => 'DbTrackTitle',
|
||||
'track_number' => 'DbTrackNumber',
|
||||
'year' => 'DbYear',
|
||||
'track_type' => 'DbTrackType',
|
||||
'track_type_id' => 'DbTrackTypeId',
|
||||
];
|
||||
|
||||
// things we need to check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue