From: Christian Weiske Date: Wed, 19 Jun 2013 20:57:29 +0000 (+0200) Subject: automatically filter tasks when ID/URL is given X-Git-Url: https://git.cweiske.de/stapibas.git/commitdiff_plain/9b28db5de5584d1b5af90037b44fbfb33ebfbbb7 automatically filter tasks when ID/URL is given --- diff --git a/src/stapibas/Cli.php b/src/stapibas/Cli.php index 52c7143..40d9d17 100644 --- a/src/stapibas/Cli.php +++ b/src/stapibas/Cli.php @@ -75,6 +75,15 @@ class Cli ) { $tasks = array_flip(explode(',', $result->command->options['tasks'])); + //if an ID/url is given, only execute the matching task + if (isset($result->command->options['feed'])) { + $tasks = array('feeds' => 1); + } else if (isset($result->command->options['entry'])) { + $tasks = array('entries' => 1); + } else if (isset($result->command->options['entryurl'])) { + $tasks = array('urls' => 1); + } + if (isset($tasks['feeds'])) { $this->runFeedUpdateFeeds($deps); }