Fix generic post options that were fully broken
authorChristian Weiske <cweiske@cweiske.de>
Wed, 21 Sep 2016 11:20:20 +0000 (13:20 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 21 Sep 2016 11:20:20 +0000 (13:20 +0200)
src/shpub/Command/AbstractProps.php

index d939aa75f1715818c69b563d787e8795749c1faa..7707ea9d22103f0d7cc32620745b2c729e2aaffd 100644 (file)
@@ -94,7 +94,7 @@ class Command_AbstractProps
         $cmd->addOption(
             'syndication',
             array(
-                'short_name'  => '-s',
+                'short_name'  => '-u',
                 'long_name'   => '--syndication',
                 'description' => 'Syndication URL(s)',
                 'help_name'   => 'URL',
@@ -121,7 +121,6 @@ class Command_AbstractProps
         $cmd->addOption(
             'html',
             array(
-                'short_name'  => '-h',
                 'long_name'   => '--html',
                 'description' => 'Text content is HTML',
                 'action'      => 'StoreTrue',
@@ -149,32 +148,32 @@ class Command_AbstractProps
         $this->handleOptJson($cmdRes, $req);
 
         if ($cmdRes->options['published'] !== null) {
-            $req->req->addPostParameter(
+            $req->addProperty(
                 'published', $cmdRes->options['published']
             );
         }
         if ($cmdRes->options['updated'] !== null) {
-            $req->req->addPostParameter(
+            $req->addProperty(
                 'updated', $cmdRes->options['updated']
             );
         }
         if (count($cmdRes->options['categories'])) {
-            $req->addPostParameter(
+            $req->addProperty(
                 'category', $cmdRes->options['categories']
             );
         }
         if ($cmdRes->options['name'] !== null) {
-            $req->req->addPostParameter(
+            $req->addProperty(
                 'name', $cmdRes->options['name']
             );
         }
         if ($cmdRes->options['slug'] !== null) {
-            $req->req->addPostParameter(
+            $req->addProperty(
                 'slug', $cmdRes->options['slug']
             );
         }
         if (count($cmdRes->options['syndication'])) {
-            $req->addPostParameter(
+            $req->addProperty(
                 'syndication', $cmdRes->options['syndication']
             );
         }
@@ -192,7 +191,7 @@ class Command_AbstractProps
                 $postParams[$propkey][] = $propval;
             }
             foreach ($postParams as $propkey => $propvals) {
-                $req->addPostParameter($propkey, $propvals);
+                $req->addProperty($propkey, $propvals);
             }
         }
     }