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 description for all commands
[shpub.git]
/
src
/
shpub
/
Command
/
Undelete.php
diff --git
a/src/shpub/Command/Undelete.php
b/src/shpub/Command/Undelete.php
index ad3525f90bace44582be6521ba22f4f05e910149..63d604b6c22515162ea902986c7751860fc1e52f 100644
(file)
--- a/
src/shpub/Command/Undelete.php
+++ b/
src/shpub/Command/Undelete.php
@@
-6,6
+6,8
@@
class Command_Undelete extends Command_AbstractProps
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('undelete');
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('undelete');
+ $cmd->description = 'Restore a deleted post';
+ static::addOptJson($cmd);
$cmd->addArgument(
'url',
[
$cmd->addArgument(
'url',
[
@@
-23,8
+25,9
@@
class Command_Undelete extends Command_AbstractProps
}
$req = new Request($this->cfg->host, $this->cfg);
}
$req = new Request($this->cfg->host, $this->cfg);
- $req->req->addPostParameter('action', 'undelete');
- $req->req->addPostParameter('url', $url);
+ $this->handleOptJson($cmdRes, $req);
+ $req->setAction('undelete');
+ $req->setUrl($url);
$res = $req->send();
Log::info('Post restored at server');
$res = $req->send();
Log::info('Post restored at server');