Esempio n. 1
0
 public function getFeaturesList()
 {
     $retval = array();
     foreach (Scalr_Limits::getFeatures() as $f => $n) {
         $retval[$f] = $this->isFeatureEnabled($f);
     }
     return $retval;
 }
Esempio n. 2
0
 public function detailsAction()
 {
     $f = Scalr_Limits::getFeatures();
     foreach ($f as $featureKey => $featureName) {
         $features[$featureName] = $this->user->getAccount()->isFeatureEnabled($featureKey);
     }
     $info = $this->billing->getInfo();
     $info['emergPending'] = $this->user->getAccount()->getSetting(Scalr_Account::SETTING_BILLING_EMERG_SUPPORT_PENDING);
     $dt = $this->user->getAccount()->getSetting(Scalr_Account::SETTING_BILLING_EMERG_SUPPORT_DATE);
     if ($dt + 86400 * 2 < time()) {
         $this->user->getAccount()->setSetting(Scalr_Account::SETTING_BILLING_EMERG_SUPPORT_PENDING, 0);
         $this->user->getAccount()->setSetting(Scalr_Account::SETTING_BILLING_EMERG_SUPPORT_DATE, null);
         $info['emergPending'] = 0;
     }
     if ($info['emergPending'] == 1) {
         $info['emergPhone'] = 'Registration pending, make take up to 2 business days';
     }
     $this->response->page('ui/billing/details.js', array('billing' => $info, 'limits' => $this->user->getAccount()->getLimits(), 'features' => $features));
 }