git.cweiske.de
/
shpub.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More specific error message
[shpub.git]
/
src
/
shpub
/
Command
/
Note.php
diff --git
a/src/shpub/Command/Note.php
b/src/shpub/Command/Note.php
index 2e07e9d69765de69d984c233c21692b74208a420..2a911c905560c9496abf3ca3ccb053270900ea17 100644
(file)
--- a/
src/shpub/Command/Note.php
+++ b/
src/shpub/Command/Note.php
@@
-6,6
+6,8
@@
class Command_Note extends Command_AbstractProps
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('note');
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('note');
+ $cmd->description = 'Create a note';
+ static::addOptHtml($cmd);
static::optsGeneric($cmd);
$cmd->addArgument(
'text',
static::optsGeneric($cmd);
$cmd->addArgument(
'text',
@@
-20,8
+22,8
@@
class Command_Note 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('content', $cmdRes->args['text
']);
+ $req->
setType(
'entry');
+ $req->
addContent($cmdRes->args['text'], $cmdRes->options['html
']);
$this->handleGenericOptions($cmdRes, $req);
$res = $req->send();
$this->handleGenericOptions($cmdRes, $req);
$res = $req->send();