Exemplo n.º 1
0
            $objAlbum->set('albumpolicy_group_id', $objAlbumGroup->get('id'));
            $objAlbum->remove('simple_permissions');
        }
        $objAlbum->save();
        header('Location: index.php?action=albums&' . $objAlbum->getIDPair());
    } else {
        $strSubAction = 'edit';
    }
}
if ($strSubAction == 'delete') {
    $objAlbum->getFromRequest();
    $objAlbum->load();
    if (!$objAlbum->canEdit($objUser)) {
        throw new exception('exception_accessdenied');
    }
    $objAlbum->delete();
    $objAlbum->save();
    header('Location: index.php?action=albums');
}
if ($strSubAction == 'move') {
    if (!$objAlbum->canEdit($objUser)) {
        throw new Exception('exception_accessdenied');
    }
    /* Set the breadcrumbs and title. */
    $objBreadcrumbs->add('Albums', 'index.php?action=albums');
    $objAlbum->addBreadcrumbs($objBreadcrumbs, false);
    $objBreadcrumbs->add('Move', 'index.php?action=albums&subaction=move');
    $objTemplate->setText('PAGETITLE', "Moving an Album");
    print "<form action='index.php' method='get'>";
    print "<input type='hidden' name='action' value='albums'>";
    print "<input type='hidden' name='subaction' value='move2'>";