Skip to content

Commit

Permalink
updates fixing code scrutinty issus
Browse files Browse the repository at this point in the history
  • Loading branch information
detain committed Jun 24, 2017
1 parent d034b2a commit 2e07f74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/fantastico.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
*/
function get_fantastico_licenses() {
$fantastico = new Fantastico(FANTASTICO_USERNAME, FANTASTICO_PASSWORD);
$fantastico_ips = $fantastico->getIpListDetailed(Fantastico::ALL_TYPES);
request_log('licenses', false, __FUNCTION__, 'fantastico', 'getIpListDetailed', 'Fantastico::ALL_TYPES', $fantastico_ips);
return $fantastico_ips;
$fantasticoIps = $fantastico->getIpListDetailed(Fantastico::ALL_TYPES);
request_log('licenses', false, __FUNCTION__, 'fantastico', 'getIpListDetailed', 'Fantastico::ALL_TYPES', $fantasticoIps);
return $fantasticoIps;
}

/**
* @return array
*/
function get_fantastico_list() {
$category = SERVICE_TYPES_FANTASTICO;
$fantastico_ips = get_fantastico_licenses();
$fantasticoIps = get_fantastico_licenses();
$ipdata = [];
// Has ipAddress with a string ip, addedOn with a string date mysql formatted date, isVPS which might be 'No', and status which might be 'Active'
foreach ($fantastico_ips as $idx => $data) {
foreach ($fantasticoIps as $idx => $data) {
$data['addedOn'] = explode(' ', $data['addedOn']);
$data['addedOn'] = array_shift($data['addedOn']);
$ipdata[$data['ipAddress']] = array_merge($data, array(
Expand Down
4 changes: 2 additions & 2 deletions src/reusable_fantastico.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ function reusable_fantastico() {
$type = 5013;
else
$type = 5003;
$service_cost = $serviceTypes[$type]['services_cost'];
$serviceCost = $serviceTypes[$type]['services_cost'];
$db->query(make_insert_query($settings['TABLE'], array(
$settings['PREFIX'] . '_id' => null,
$settings['PREFIX'] . '_type' => $type,
$settings['PREFIX'] . '_custid' => 8,
$settings['PREFIX'] . '_cost' => $service_cost,
$settings['PREFIX'] . '_cost' => $serviceCost,
$settings['PREFIX'] . '_frequency' => $frequency,
$settings['PREFIX'] . '_order_date' => mysql_now(),
$settings['PREFIX'] . '_ip' => $ipAddress,
Expand Down

0 comments on commit 2e07f74

Please sign in to comment.