CC-2746: Edit metadata loses data if required data is missing

- fixed
This commit is contained in:
James 2011-08-30 16:50:46 -04:00
parent a5b29e1276
commit b5645d238a
1 changed files with 2 additions and 2 deletions

View File

@ -179,9 +179,10 @@ class LibraryController extends Zend_Controller_Action
{
$request = $this->getRequest();
$form = new Application_Form_EditAudioMD();
$file_id = $this->_getParam('id', null);
$file = StoredFile::Recall($file_id);
$form->populate($file->getDbColMetadata());
if ($request->isPost()) {
if ($form->isValid($request->getPost())) {
@ -197,7 +198,6 @@ class LibraryController extends Zend_Controller_Action
}
}
$form->populate($file->getDbColMetadata());
$this->view->form = $form;
}