public function addrecordingAction() { if (!$this->view->authenticated) { $this->_redirector->gotoRoute(array(), 'login'); } $request = $this->getRequest(); $form = new Form_Recording(); if ($request->isPost() && $form->isValid($request->getPost())) { $table = new Model_DbTable_Recordings(); $row = $table->createRow($form->getValues()); $row->sheet_id = $request->id; $row->user_id = $this->view->identity->id; $row->created = null; $row->save(); $file = $form->file; $file->addFilter('Rename', array('target' => $row->id . '.mp3')); $file->receive(); return $this->_redirector->gotoRoute(array('controller' => 'sheet', 'id' => $request->id), 'view'); } $this->view->headTitle('Add recording'); $this->view->form = $form; }