function saveContext($args) { $this->validate(); $rtDao =& DAORegistry::getDAO('RTDAO'); $journal = Request::getJournal(); $versionId = isset($args[0]) ? $args[0] : 0; $version =& $rtDao->getVersion($versionId, $journal->getId()); $contextId = isset($args[1]) ? $args[1] : 0; $context =& $rtDao->getContext($contextId); if (isset($version) && isset($context) && $context->getVersionId() == $version->getVersionId()) { import('classes.rt.ojs.form.ContextForm'); $contextForm = new ContextForm($contextId, $versionId); $contextForm->readInputData(); $contextForm->execute(); } Request::redirect(null, null, 'contexts', $versionId); }
function saveContext($args) { $this->validate(); $rtDao =& DAORegistry::getDAO('RTDAO'); $archiveId = array_shift($args); $versionId = array_shift($args); $contextId = array_shift($args); $version =& $rtDao->getVersion($versionId, $archiveId); $context =& $rtDao->getContext($contextId); if (isset($version) && isset($context) && $context->getVersionId() == $version->getVersionId()) { import('rt.harvester2.form.ContextForm'); $contextForm = new ContextForm($contextId, $versionId, $archiveId); $contextForm->readInputData(); $contextForm->execute(); } Request::redirect(null, 'contexts', array($archiveId, $versionId)); }