git.cweiske.de
/
shpub.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add bookmark command
[shpub.git]
/
src
/
shpub
/
Command
/
AbstractProps.php
diff --git
a/src/shpub/Command/AbstractProps.php
b/src/shpub/Command/AbstractProps.php
index 6d7ef3b8c27c346ca87f0cff8feedafbe56a70ea..822fc77bba72636aa7fa52fd18fceff8ed815c0b 100644
(file)
--- a/
src/shpub/Command/AbstractProps.php
+++ b/
src/shpub/Command/AbstractProps.php
@@
-33,13
+33,24
@@
class Command_AbstractProps
'files',
array(
'short_name' => '-f',
'files',
array(
'short_name' => '-f',
- 'long_name' => '--file
s
',
+ 'long_name' => '--file',
'description' => 'Files or URLs to upload',
'help_name' => 'PATH',
'action' => 'StoreArray',
'default' => [],
)
);
'description' => 'Files or URLs to upload',
'help_name' => 'PATH',
'action' => 'StoreArray',
'default' => [],
)
);
+ $cmd->addOption(
+ 'name',
+ array(
+ 'short_name' => '-n',
+ 'long_name' => '--name',
+ 'description' => 'Post title',
+ 'help_name' => 'TITLE',
+ 'action' => 'StoreString',
+ 'default' => null,
+ )
+ );
$cmd->addOption(
'published',
array(
$cmd->addOption(
'published',
array(
@@
-50,6
+61,16
@@
class Command_AbstractProps
'default' => null,
)
);
'default' => null,
)
);
+ $cmd->addOption(
+ 'updated',
+ array(
+ 'long_name' => '--updated',
+ 'description' => 'Update date',
+ 'help_name' => 'DATE',
+ 'action' => 'StoreString',
+ 'default' => null,
+ )
+ );
$cmd->addOption(
'slug',
array(
$cmd->addOption(
'slug',
array(
@@
-93,11
+114,21
@@
class Command_AbstractProps
'published', $cmdRes->options['published']
);
}
'published', $cmdRes->options['published']
);
}
+ if ($cmdRes->options['updated'] !== null) {
+ $req->req->addPostParameter(
+ 'updated', $cmdRes->options['updated']
+ );
+ }
if (count($cmdRes->options['categories'])) {
$req->addPostParameter(
'category', $cmdRes->options['categories']
);
}
if (count($cmdRes->options['categories'])) {
$req->addPostParameter(
'category', $cmdRes->options['categories']
);
}
+ if ($cmdRes->options['name'] !== null) {
+ $req->req->addPostParameter(
+ 'name', $cmdRes->options['name']
+ );
+ }
if ($cmdRes->options['slug'] !== null) {
$req->req->addPostParameter(
'slug', $cmdRes->options['slug']
if ($cmdRes->options['slug'] !== null) {
$req->req->addPostParameter(
'slug', $cmdRes->options['slug']