Hack: avoid calling WHMCS to get the station instance id

This commit is contained in:
Albert Santoni 2015-03-04 15:53:43 -05:00
parent 1f6f880dad
commit 278aa31d2f
1 changed files with 8 additions and 3 deletions

View File

@ -14,8 +14,13 @@ class Billing
/** Get the Airtime instance ID of the instance the customer is currently viewing. */
public static function getClientInstanceId()
{
$currentProduct = Billing::getClientCurrentAirtimeProduct();
return $currentProduct["id"];
#$currentProduct = Billing::getClientCurrentAirtimeProduct();
#return $currentProduct["id"];
//XXX: Major hack attack. Since this function gets called often, rather than querying WHMCS
// we're just going to extract it from airtime.conf since it's the same as the rabbitmq username.
$CC_CONFIG = Config::getConfig();
$instanceId = $CC_CONFIG['rabbitmq']['username'];
return $instanceId;
}
public static function getProducts()
@ -318,4 +323,4 @@ class Billing
$result = Billing::makeRequest($credentials["url"], $query_string);
}
}
}