new config file structuring
This commit is contained in:
parent
86e0ad60de
commit
79f9243e1e
|
@ -174,8 +174,10 @@ function recursiveCopy($src, $dst, $profiles, $fileFilter = null, $overwrite = t
|
||||||
recursiveCopy($src . '/' . $file, $dst . '/' . $file, $profiles, $fileFilter, $overwrite);
|
recursiveCopy($src . '/' . $file, $dst . '/' . $file, $profiles, $fileFilter, $overwrite);
|
||||||
}
|
}
|
||||||
elseif ((isset($fileFilter) && (strpos($file, $fileFilter) === 0 || $file == '.htaccess'))
|
elseif ((isset($fileFilter) && (strpos($file, $fileFilter) === 0 || $file == '.htaccess'))
|
||||||
|| (!isset($fileFilter)))
|
|| (!isset($fileFilter))) {
|
||||||
{
|
if (!is_file($src . '/' . $file)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($overwrite || !file_exists($dst . '/' . $file)) {
|
if ($overwrite || !file_exists($dst . '/' . $file)) {
|
||||||
$tmpState = @copy($src . '/' . $file, $dst . '/' . $file);
|
$tmpState = @copy($src . '/' . $file, $dst . '/' . $file);
|
||||||
if ($tmpState === false) {
|
if ($tmpState === false) {
|
||||||
|
|
|
@ -197,19 +197,17 @@ include '../main_header.php';
|
||||||
$deleteLink->setOnClick("profileShowDeleteDialog('" . _('Delete') . "', '" . _('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', '" . 'template_' . $templateClasses[$i]['scope'] . "');");
|
$deleteLink->setOnClick("profileShowDeleteDialog('" . _('Delete') . "', '" . _('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', '" . 'template_' . $templateClasses[$i]['scope'] . "');");
|
||||||
$existingContainer->addElement($deleteLink);
|
$existingContainer->addElement($deleteLink);
|
||||||
|
|
||||||
if (count($configProfiles) > 1) {
|
$importLink = new htmlLink(null, '#', '../../graphics/import.png');
|
||||||
$importLink = new htmlLink(null, '#', '../../graphics/import.png');
|
$importLink->setTitle(_('Import PDF structures'));
|
||||||
$importLink->setTitle(_('Import PDF structures'));
|
$importLink->setOnClick("showDistributionDialog('" . _("Import PDF structures") . "', '" .
|
||||||
$importLink->setOnClick("showDistributionDialog('" . _("Import PDF structures") . "', '" .
|
_('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', 'import');");
|
||||||
_('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', 'import');");
|
$existingContainer->addElement($importLink);
|
||||||
$existingContainer->addElement($importLink);
|
|
||||||
|
|
||||||
$exportLink = new htmlLink(null, '#', '../../graphics/export.png');
|
$exportLink = new htmlLink(null, '#', '../../graphics/export.png');
|
||||||
$exportLink->setTitle(_('Export PDF structure'));
|
$exportLink->setTitle(_('Export PDF structure'));
|
||||||
$exportLink->setOnClick("showDistributionDialog('" . _("Export PDF structure") . "', '" .
|
$exportLink->setOnClick("showDistributionDialog('" . _("Export PDF structure") . "', '" .
|
||||||
_('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', 'export', '" . 'template_' . $templateClasses[$i]['scope'] . "', '" . $_SESSION['config']->getName() . "');");
|
_('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', 'export', '" . 'template_' . $templateClasses[$i]['scope'] . "', '" . $_SESSION['config']->getName() . "');");
|
||||||
$existingContainer->addElement($exportLink);
|
$existingContainer->addElement($exportLink);
|
||||||
}
|
|
||||||
$existingContainer->addNewLine();
|
$existingContainer->addNewLine();
|
||||||
}
|
}
|
||||||
$container->addElement($existingContainer, true);
|
$container->addElement($existingContainer, true);
|
||||||
|
|
|
@ -195,19 +195,17 @@ for ($i = 0; $i < sizeof($profileClasses); $i++) {
|
||||||
$deleteLink->setTitle(_('Delete'));
|
$deleteLink->setTitle(_('Delete'));
|
||||||
$deleteLink->setOnClick("profileShowDeleteDialog('" . _('Delete') . "', '" . _('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', '" . 'profile_' . $profileClasses[$i]['scope'] . "');");
|
$deleteLink->setOnClick("profileShowDeleteDialog('" . _('Delete') . "', '" . _('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', '" . 'profile_' . $profileClasses[$i]['scope'] . "');");
|
||||||
$existingContainer->addElement($deleteLink);
|
$existingContainer->addElement($deleteLink);
|
||||||
if (count($configProfiles) > 1) {
|
$importLink = new htmlLink(null, '#', '../../graphics/import.png');
|
||||||
$importLink = new htmlLink(null, '#', '../../graphics/import.png');
|
$importLink->setTitle(_('Import profiles'));
|
||||||
$importLink->setTitle(_('Import profiles'));
|
$importLink->setOnClick("showDistributionDialog('" . _("Import profiles") . "', '" .
|
||||||
$importLink->setOnClick("showDistributionDialog('" . _("Import profiles") . "', '" .
|
_('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', 'import');");
|
||||||
_('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', 'import');");
|
$existingContainer->addElement($importLink);
|
||||||
$existingContainer->addElement($importLink);
|
|
||||||
|
|
||||||
$exportLink = new htmlLink(null, '#', '../../graphics/export.png');
|
$exportLink = new htmlLink(null, '#', '../../graphics/export.png');
|
||||||
$exportLink->setTitle(_('Export profile'));
|
$exportLink->setTitle(_('Export profile'));
|
||||||
$exportLink->setOnClick("showDistributionDialog('" . _("Export profile") . "', '" .
|
$exportLink->setOnClick("showDistributionDialog('" . _("Export profile") . "', '" .
|
||||||
_('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', 'export', '" . 'profile_' . $profileClasses[$i]['scope'] . "', '" . $_SESSION['config']->getName() . "');");
|
_('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', 'export', '" . 'profile_' . $profileClasses[$i]['scope'] . "', '" . $_SESSION['config']->getName() . "');");
|
||||||
$existingContainer->addElement($exportLink);
|
$existingContainer->addElement($exportLink);
|
||||||
}
|
|
||||||
$existingContainer->addNewLine();
|
$existingContainer->addNewLine();
|
||||||
}
|
}
|
||||||
$container->addElement($existingContainer);
|
$container->addElement($existingContainer);
|
||||||
|
|
Loading…
Reference in New Issue