예제 #1
0
                $pdfExport->remove();
                $pdfExport = false;
            }
        }
    }
    if (!$pdfExport) {
        $pdfExport = eZPDFExport::fetch($Params['PDFExportID']);
        if (!$pdfExport) {
            return $Module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
        }
        $pdfExport->setAttribute('version', eZPDFExport::VERSION_DRAFT);
        $pdfExport->store();
    }
} else {
    $user = eZUser::currentUser();
    $pdfExport = eZPDFExport::create($user->attribute('contentobject_id'));
    $pdfExport->store();
}
if ($http->hasPostVariable('SelectedNodeIDArray') && !$http->hasPostVariable('BrowseCancelButton')) {
    $selectedNodeIDArray = $http->postVariable('SelectedNodeIDArray');
    $pdfExport->setAttribute('source_node_id', $selectedNodeIDArray[0]);
    $pdfExport->store();
}
$validation = array();
$inputValidated = true;
if ($Module->isCurrentAction('BrowseSource') || $Module->isCurrentAction('Export')) {
    $pdfExport->setAttribute('title', $Module->actionParameter('Title'));
    $pdfExport->setAttribute('show_frontpage', $Module->hasActionParameter('DisplayFrontpage') ? 1 : 0);
    $pdfExport->setAttribute('intro_text', $Module->actionParameter('IntroText'));
    $pdfExport->setAttribute('sub_text', $Module->actionParameter('SubText'));
    $pdfExport->setAttribute('export_structure', $Module->actionParameter('ExportType'));