From 9b28db5de5584d1b5af90037b44fbfb33ebfbbb7 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 19 Jun 2013 22:57:29 +0200 Subject: [PATCH 1/1] automatically filter tasks when ID/URL is given --- src/stapibas/Cli.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- 2.30.2