if ($strSubAction == 'seen') { clsAlbum::markSeen($objUser, $objAlbum); if ($objAlbum->isNew()) { header("Location: index.php"); } else { header("Location: index.php?action=albums&" . $objAlbum->getIDPair()); } } if ($strSubAction == 'edit') { if (!$objAlbum->canEdit($objUser)) { throw new Exception('exception_accessdenied'); } /* Get the parent album based on the album_id that the user specified. */ $objAlbum->getFromRequest(); $objParent = new clsAlbum($objAlbum->get('album_id')); if (!$objParent->canCreateSubalbum($objUser)) { throw new Exception('exception_accessdenied'); } /* Set the breadcrumbs and title. */ $objBreadcrumbs->add('Albums', 'index.php?action=albums'); $objAlbum->addBreadcrumbs($objBreadcrumbs, false); $objBreadcrumbs->add('Edit', 'index.php?action=albums&subaction=edit'); $objTemplate->setText('PAGETITLE', "Editing an Album"); /* Set up the option list. */ if ($objParent->isNew()) { $arrOptions = array(NO => "No", YES => "Yes"); } else { $arrOptions = array(INHERIT => "Inherit", NO => "No", YES => "Yes"); } /* On a new album, set the default policies. After this, the policy objects should never change. If the * policy is 0, which may mean that it was an import, also set the default policies. */