git.cweiske.de
/
stapibas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1d71253
)
automatically filter tasks when ID/URL is given
author
Christian Weiske
<cweiske@cweiske.de>
Wed, 19 Jun 2013 20:57:29 +0000
(22:57 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Wed, 19 Jun 2013 20:57:29 +0000
(22:57 +0200)
src/stapibas/Cli.php
patch
|
blob
|
history
diff --git
a/src/stapibas/Cli.php
b/src/stapibas/Cli.php
index 52c7143761bf1031081513b6d4c9fdb8af7d9ad8..40d9d17b9612e4d87fe9f0187eedd07a562edba2 100644
(file)
--- a/
src/stapibas/Cli.php
+++ b/
src/stapibas/Cli.php
@@
-75,6
+75,15
@@
class Cli
) {
$tasks = array_flip(explode(',', $result->command->options['tasks']));
) {
$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);
}
if (isset($tasks['feeds'])) {
$this->runFeedUpdateFeeds($deps);
}