X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/ff8573f63f912d05426b6928364146d1c7794f99..059c6ab77b8e63210b9afc266d62c9f543d4d7ae:/src/shpub/Command/Undelete.php diff --git a/src/shpub/Command/Undelete.php b/src/shpub/Command/Undelete.php index ad3525f..55dd6b9 100644 --- a/src/shpub/Command/Undelete.php +++ b/src/shpub/Command/Undelete.php @@ -6,6 +6,7 @@ class Command_Undelete extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('undelete'); + static::addOptJson($cmd); $cmd->addArgument( 'url', [ @@ -23,8 +24,9 @@ class Command_Undelete extends Command_AbstractProps } $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');