Commit d0a3ff33 authored by Mathieu Lutfy's avatar Mathieu Lutfy Committed by Aegir user

refs ops#804: civicrm_org_stats: use the current json stats for extensions.

parent cd046e1a
...@@ -7,7 +7,7 @@ require_once("civicrm_org_stats.inc"); ...@@ -7,7 +7,7 @@ require_once("civicrm_org_stats.inc");
class civicrm_org_stats_extensions extends civicrm_org_stats { class civicrm_org_stats_extensions extends civicrm_org_stats {
private $stats = array(); private $stats = array();
const URL = "http://stats.civicrm.org/bgm/extensions.php?output=json&minresults=1"; const URL = "https://stats.civicrm.org/json/extensions-detail.json";
public function fetch() { public function fetch() {
$returnedRawValues = drupal_http_request(self::URL); $returnedRawValues = drupal_http_request(self::URL);
...@@ -18,7 +18,7 @@ class civicrm_org_stats_extensions extends civicrm_org_stats { ...@@ -18,7 +18,7 @@ class civicrm_org_stats_extensions extends civicrm_org_stats {
if (!empty($decodedValues)) { if (!empty($decodedValues)) {
foreach ($decodedValues as $val) { foreach ($decodedValues as $val) {
if (!empty($val['name'])) { if (!empty($val['name'])) {
$this->stats[$val['name']] = (int) $val['total']; $this->stats[$val['name']] = (int) $val['num_sites'];
} }
} }
return TRUE; return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment