validate(); $this->setupTemplate(); $journal =& $request->getJournal(); $user =& $request->getUser(); $articleId = (int) array_shift($args); $save = array_shift($args) == 'save'; $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO'); $article =& $sectionEditorSubmissionDao->getSectionEditorSubmission($articleId); if ( !$article || !$user || !$journal || $article->getUserId() != $user->getId() || $article->getJournalId() != $journal->getId() ) { $request->redirect(null, 'index'); } $swordPlugin =& $this->_getSwordPlugin(); $swordPlugin->import('AuthorDepositForm'); $authorDepositForm = new AuthorDepositForm($swordPlugin, $article); if ($save) { $authorDepositForm->readInputData(); if ($authorDepositForm->validate()) { $authorDepositForm->execute($request); $request->redirect(null, 'author'); } else { $authorDepositForm->display(); } } else { $authorDepositForm->initData(); $authorDepositForm->display(); } } /** * Get the SWORD plugin object * @return object */ function &_getSwordPlugin() { $plugin =& PluginRegistry::getPlugin('generic', SWORD_PLUGIN_NAME); return $plugin; } } ?>