diff options
Diffstat (limited to 'site/app/controllers/compatibility_controller.php')
-rw-r--r-- | site/app/controllers/compatibility_controller.php | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/site/app/controllers/compatibility_controller.php b/site/app/controllers/compatibility_controller.php index fbf3cf3..9a9754f 100644 --- a/site/app/controllers/compatibility_controller.php +++ b/site/app/controllers/compatibility_controller.php @@ -68,7 +68,7 @@ class CompatibilityController extends AppController $this->jsAdd = array('compatibility.js'); $this->publish('jsAdd', $this->jsAdd); - $this->layout = 'amo2009'; + $this->layout = 'mozilla'; $this->pageTitle = ___('compatibility_dashboard_center_header', 'Add-on Compatibility Center').' :: '.sprintf(_('addons_home_pagetitle'), APP_PRETTYNAME); $this->publish('expand_categories', true); @@ -91,7 +91,6 @@ class CompatibilityController extends AppController $data = unserialize(file_get_contents(NETAPP_STORAGE.'/compatibility-fx-'.$version.'.serialized')); $this->publish('totals', $data['totals']); - $this->publish('percentages', $this->_percentages($data['totals'])); $this->publish('version', $version); $session = $this->Session->read('User'); @@ -118,7 +117,7 @@ class CompatibilityController extends AppController if ($format == 'ajax') $this->render('report', 'ajax'); else - $this->render('report', 'amo2009'); + $this->render('report', 'mozilla'); } function developers($version = COMPAT_DEFAULT_VERSION, $format = 'html') { @@ -175,7 +174,7 @@ class CompatibilityController extends AppController if ($format == 'ajax') $this->render('developers', 'ajax'); else - $this->render('developers', 'amo2009'); + $this->render('developers', 'mozilla'); } function users($version = COMPAT_DEFAULT_VERSION) { @@ -183,20 +182,6 @@ class CompatibilityController extends AppController $this->render('users'); } - /* Calculate compatibility percentages, making sure they add up to 100. */ - function _percentages($totals) { - $k = array(COMPAT_OTHER, COMPAT_ALPHA, COMPAT_BETA, COMPAT_LATEST); - $percentages = array(); - - foreach ($k as $compat) { - $p = $totals[$compat]['adu'] / $totals['adu95']; - // Round to 1 decimal place. - $percentages[$compat] = round($p * 100, 1); - } - // Put any over/under flow into COMPAT_LATEST, somewhat arbitrary. - $percentages[COMPAT_LATEST] += 100 - array_sum($percentages); - return $percentages; - } } ?> |