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 "json" option
[shpub.git]
/
src
/
shpub
/
Command
/
Article.php
diff --git
a/src/shpub/Command/Article.php
b/src/shpub/Command/Article.php
index 9f40daf82f97943479f3905a0c314ccc2535f915..8445af49e7471eab0d803ad81c7fc03e41a37f07 100644
(file)
--- a/
src/shpub/Command/Article.php
+++ b/
src/shpub/Command/Article.php
@@
-38,14
+38,14
@@
class Command_Article extends Command_AbstractProps
public function run(\Console_CommandLine_Result $cmdRes)
{
$req = new Request($this->cfg->host, $this->cfg);
public function run(\Console_CommandLine_Result $cmdRes)
{
$req = new Request($this->cfg->host, $this->cfg);
- $req->
req->addPostParameter('h',
'entry');
- $req->
req->addPostParameter
('name', $cmdRes->args['title']);
+ $req->
setType(
'entry');
+ $req->
addProperty
('name', $cmdRes->args['title']);
if ($cmdRes->options['html']) {
if ($cmdRes->options['html']) {
- $req->
req->addPostParameter
(
- 'content
[html]', $cmdRes->args['text'
]
+ $req->
addProperty
(
+ 'content
', ['html' => $cmdRes->args['text']
]
);
} else {
);
} else {
- $req->
req->addPostParameter
('content', $cmdRes->args['text']);
+ $req->
addProperty
('content', $cmdRes->args['text']);
}
$this->handleGenericOptions($cmdRes, $req);
}
$this->handleGenericOptions($cmdRes, $req);