|
@@ 148-166 (lines=19) @@
|
| 145 |
|
return $this->get("XMLtransfer.cgi", $args); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
public function requestTransfer($args) { |
| 149 |
|
if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args) || !array_key_exists("packagegroup", $args)) { |
| 150 |
|
error_log("cpanelLicensing::requestTransfer requires that ip, groupid and packageid elements exist in the array passed to it"); |
| 151 |
|
return; |
| 152 |
|
} |
| 153 |
|
if (!$this->validateID($args["groupid"])) { |
| 154 |
|
error_log("The groupid passed to cpanelLicensing::requestTransfer is invalid"); |
| 155 |
|
return; |
| 156 |
|
} |
| 157 |
|
if (!$this->validateID($args["packageid"])) { |
| 158 |
|
error_log("The package id passed to cpanelLicensing::requestTransfer is invalid"); |
| 159 |
|
return; |
| 160 |
|
} |
| 161 |
|
if (!$this->validateIP($args['ip'])) { |
| 162 |
|
error_log("the ip passed to cpanelLicensing::requestTransfer was invalid"); |
| 163 |
|
return; |
| 164 |
|
} |
| 165 |
|
return $this->get("XMLtransferRequest.cgi", $args); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function activateLicense($args) { |
| 169 |
|
if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args) || !array_key_exists("packageid", $args)) { |
|
@@ 168-187 (lines=20) @@
|
| 165 |
|
return $this->get("XMLtransferRequest.cgi", $args); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function activateLicense($args) { |
| 169 |
|
if (!array_key_exists("ip", $args) || !array_key_exists("groupid", $args) || !array_key_exists("packageid", $args)) { |
| 170 |
|
error_log("cpanelLicensing::activateLicense requires that ip, groupid and packageid elements exist in the array passed to it"); |
| 171 |
|
return; |
| 172 |
|
} |
| 173 |
|
if (!$this->validateID($args['groupid'])) { |
| 174 |
|
error_log("cpanelLicensing::acivateLicense was passed an invalid groupid"); |
| 175 |
|
return; |
| 176 |
|
} |
| 177 |
|
if (!$this->validateIP($args['ip'])) { |
| 178 |
|
error_log("cpanelLicensing::activateLicense was passed an invalid IP"); |
| 179 |
|
return; |
| 180 |
|
} |
| 181 |
|
if (!$this->validateID($args['packageid'])) { |
| 182 |
|
error_log("cpanelLicensing::activateLicense was passed an invalid packageid"); |
| 183 |
|
return; |
| 184 |
|
} |
| 185 |
|
$args['legal'] = 1; |
| 186 |
|
return $this->get("XMLlicenseAdd.cgi", $args); |
| 187 |
|
} |
| 188 |
|
|
| 189 |
|
public function addPickupPass($args) { |
| 190 |
|
if (!array_key_exists("pickup", $args)) { |