function initialize($request, $args)
{
// Get the issue galley
$galleyId = isset($args[1]) ? $args[1] : 0;
if ($galleyId) {
$issue = $this->getAuthorizedContextObject(ASSOC_TYPE_ISSUE);
$galleyDao = DAORegistry::getDAO('IssueGalleyDAO');
$journal = $request->getJournal();
$galley = $galleyDao->getByBestId($galleyId, $issue->getId());
// Invalid galley id, redirect to issue page
if (!$galley) {
$request->redirect(null, null, 'view', $issue->getId());
}
$this->setGalley($galley);
}
}