git.cweiske.de
/
shpub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
067ca8f
)
add "published" option to notes
author
Christian Weiske
<cweiske@cweiske.de>
Thu, 8 Sep 2016 21:00:49 +0000
(23:00 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Thu, 8 Sep 2016 21:00:49 +0000
(23:00 +0200)
src/shpub/Command/Note.php
patch
|
blob
|
history
diff --git
a/src/shpub/Command/Note.php
b/src/shpub/Command/Note.php
index 4a09b5afce5cd70a084267f9681384666da664bd..d5231a9d62160fa5723d47ec61391273a20cdf2b 100644
(file)
--- a/
src/shpub/Command/Note.php
+++ b/
src/shpub/Command/Note.php
@@
-27,6
+27,16
@@
class Command_Note
'default' => [],
)
);
'default' => [],
)
);
+ $cmd->addOption(
+ 'published',
+ array(
+ 'long_name' => '--published',
+ 'description' => 'Publish date',
+ 'help_name' => 'DATE',
+ 'action' => 'StoreString',
+ 'default' => null,
+ )
+ );
$cmd->addArgument(
'text',
[
$cmd->addArgument(
'text',
[
@@
-42,6
+52,11
@@
class Command_Note
$req = new Request($this->cfg->host, $this->cfg);
$req->req->addPostParameter('h', 'entry');
$req->req->addPostParameter('content', $command->args['text']);
$req = new Request($this->cfg->host, $this->cfg);
$req->req->addPostParameter('h', 'entry');
$req->req->addPostParameter('content', $command->args['text']);
+ if ($command->options['published'] !== null) {
+ $req->req->addPostParameter(
+ 'published', $command->options['published']
+ );
+ }
$files = $command->options['files'];
$fileList = [
$files = $command->options['files'];
$fileList = [