- $req->req->addPostParameter('h', 'entry');
- $req->req->addPostParameter('name', $cmdRes->args['title']);
- if ($cmdRes->options['html']) {
- $req->req->addPostParameter(
- 'content[html]', $cmdRes->args['text']
- );
- } else {
- $req->req->addPostParameter('content', $cmdRes->args['text']);
- }
+ $req->setType('entry');
+ $req->addProperty('name', $cmdRes->args['title']);
+ $req->addContent($cmdRes->args['text'], $cmdRes->options['html']);