|
@@ 70-76 (lines=7) @@
|
| 67 |
|
'nonposix' => false, |
| 68 |
|
'raw' => false, |
| 69 |
|
); |
| 70 |
|
if (is_array($data)) { |
| 71 |
|
$final_options = array_merge($default_options, $data); |
| 72 |
|
} else if (is_string($data)) { |
| 73 |
|
$final_options = array_merge($default_options, array('description' => $data)); |
| 74 |
|
} else { |
| 75 |
|
return false; |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
// The buildRequest() method already checks the field 'error', which is the only relevant to this API method |
| 79 |
|
$response = $this->getConnection()->buildRequest('group_add', $args, $final_options); //returns json and http code of response |
|
@@ 116-122 (lines=7) @@
|
| 113 |
|
'no_members' => false, |
| 114 |
|
'raw' => false, |
| 115 |
|
); |
| 116 |
|
if (is_array($data)) { |
| 117 |
|
$final_options = array_merge($default_options, $data); |
| 118 |
|
} else if (is_string($data)) { |
| 119 |
|
$final_options = array_merge($default_options, array('user' => array($data))); |
| 120 |
|
} else { |
| 121 |
|
return false; |
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
$response = $this->getConnection()->buildRequest('group_add_member', $args, $final_options); //returns json and http code of response |
| 125 |
|
if (!$response) { |