function editContext($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'); $this->setupTemplate(true, $archiveId, $version, $context); $contextForm = new ContextForm($contextId, $versionId, $archiveId); $contextForm->initData(); $contextForm->display(); } else { Request::redirect(null, 'contexts', array($archiveId, $versionId)); } }
function editContext($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'); $this->setupTemplate(true, $version, $context); $contextForm = new ContextForm($contextId, $versionId); $contextForm->initData(); $contextForm->display(); } else { Request::redirect(null, null, 'contexts', $versionId); } }
function editContext($args, &$request) { $this->validate(); $rtDao = DAORegistry::getDAO('RTDAO'); $conference = $request->getConference(); $versionId = isset($args[0]) ? $args[0] : 0; $version =& $rtDao->getVersion($versionId, $conference->getId()); $contextId = isset($args[1]) ? $args[1] : 0; $context =& $rtDao->getContext($contextId); if (isset($version) && isset($context) && $context->getVersionId() == $version->getVersionId()) { import('classes.rt.ocs.form.ContextForm'); $this->setupTemplate($request, true, $version, $context); $contextForm = new ContextForm($contextId, $versionId); $contextForm->initData(); $contextForm->display(); } else { $request->redirect(null, null, null, 'contexts', $versionId); } }