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
/
Repost.php
diff --git
a/src/shpub/Command/Repost.php
b/src/shpub/Command/Repost.php
index 2f4b46f7c568f70145a522c18b0564533f83f10a..6d786096b7ae419f75808d4d5e9f1e24e0fc790f 100644
(file)
--- a/
src/shpub/Command/Repost.php
+++ b/
src/shpub/Command/Repost.php
@@
-3,16
+3,6
@@
namespace shpub;
class Command_Repost extends Command_AbstractProps
{
class Command_Repost extends Command_AbstractProps
{
- /**
- * @var Config
- */
- protected $cfg;
-
- public function __construct($cfg)
- {
- $this->cfg = $cfg;
- }
-
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('repost');
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('repost');
@@
-34,8
+24,8
@@
class Command_Repost extends Command_AbstractProps
}
$req = new Request($this->cfg->host, $this->cfg);
}
$req = new Request($this->cfg->host, $this->cfg);
- $req->
req->addPostParameter('h',
'entry');
- $req->
req->addPostParameter
('repost-of', $url);
+ $req->
setType(
'entry');
+ $req->
addProperty
('repost-of', $url);
$this->handleGenericOptions($cmdRes, $req);
$res = $req->send();
$this->handleGenericOptions($cmdRes, $req);
$res = $req->send();