- if (count($urls) == 1) {
- $req->req->addPostParameter($type, reset($urls));
- } else if (count($urls) > 1) {
- $n = 0;
- foreach ($urls as $url) {
- $req->req->addPostParameter(
- $type . '[' . $n++ . ']', $url
- );
- }
+ if (count($urls) > 0) {
+ $req->addProperty($type, $urls);