Fix bug in my last commit

This commit is contained in:
Albert Santoni 2015-12-11 12:29:59 -05:00
parent 2594105a5e
commit db596d54b5
1 changed files with 6 additions and 6 deletions

View File

@ -1593,18 +1593,18 @@ class Application_Model_Preference
*/ */
public static function getBandwidthLimit() { public static function getBandwidthLimit() {
$val = self::getValue("bandwidth_limit"); $bandwidthLimit = self::getValue("bandwidth_limit");
if (empty($val)) { if (empty($bandwidthLimit)) {
// Set and return the plan defaults // Set and return the plan defaults
// TODO: remove this once all existing customers have this pref set // TODO: remove this once all existing customers have this pref set
$planType = self::GetPlanLevel(); $planType = self::GetPlanLevel();
$val = "starter"; $bandwidthLimit = Billing::$PLAN_TYPE_DEFAULTS["starter"]["bandwidth_limit"];
if (isset(Billing::$PLAN_TYPE_DEFAULTS[$planType])) { if (isset(Billing::$PLAN_TYPE_DEFAULTS[$planType])) {
$val = Billing::$PLAN_TYPE_DEFAULTS[$planType]["bandwidth_limit"]; $bandwidthLimit = Billing::$PLAN_TYPE_DEFAULTS[$planType]["bandwidth_limit"];
} }
self::setBandwidthLimit($val); self::setBandwidthLimit($bandwidthLimit);
} }
return $val; return $bandwidthLimit;
} }
public static function setBandwidthLimit($value) { public static function setBandwidthLimit($value) {