Small tweaks

This commit is contained in:
Stéphane Goetz 2016-04-14 12:03:46 +02:00
parent 40a59106fd
commit 76d10a9fe5
2 changed files with 11 additions and 5 deletions

View File

@ -93,10 +93,13 @@ class Publisher
$this->output->writeLn("Publishing updates...");
$published = $this->updateRecursive($this->confluence['ancestor_id'], $tree, $published);
$this->output->writeLn("Deleting obsolete pages...");
if (!$this->shouldDelete()) {
if ($this->shouldDelete()) {
$this->output->writeLn("Deleting obsolete pages...");
} else {
$this->output->writeLn("Listing obsolete pages...");
echo "> The following pages will not be deleted, but just listed for information.\n";
echo "> If you want to delete these pages, you need to set the --delete flag on the command.";
echo "> If you want to delete these pages, you need to set the --delete flag on the command.\n";
}
$this->deleteRecursive($published);
}

View File

@ -4,7 +4,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Todaymade\Daux\Config;
use Todaymade\Daux\Console\RunAction;
use Todaymade\Daux\ContentTypes\Markdown\ContentType;
use Todaymade\Daux\Format\HTML\ContentTypes\Markdown\ContentType;
use Todaymade\Daux\Daux;
use Todaymade\Daux\DauxHelper;
use Todaymade\Daux\Format\Base\LiveGenerator;
@ -61,7 +61,10 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator
$output->writeLn("Generating ...");
$params['html']['search'] = $input->getOption('search');
if (!array_key_exists('search', $params['html']) || !$params['html']['search']) {
$params['html']['search'] = $input->getOption('search');
}
$this->generateRecursive($this->daux->tree, $destination, $params, $output, $width, $params['html']['search']);
if ($params['html']['search']) {