+ /**
+ * Collect info about the site to be sent as pingback data
+ */
+ private function getSiteStats() {
+ $config = CRM_Core_Config::singleton();
+ $siteKey = md5(defined('CIVICRM_SITE_KEY') ? CIVICRM_SITE_KEY : '');
+
+ // Calorie-free pingback for alphas
+ $this->stats = array('version' => $this->localVersion);
+
+ // Non-alpha versions get the full treatment
+ if ($this->localVersion && !strpos($this->localVersion, 'alpha')) {
+ $this->stats += array(
+ 'hash' => md5($siteKey . $config->userFrameworkBaseURL),
+ 'uf' => $config->userFramework,
+ 'lang' => $config->lcMessages,
+ 'co' => $config->defaultContactCountry,
+ 'ufv' => $config->userFrameworkVersion,
+ 'PHP' => phpversion(),
+ 'MySQL' => CRM_CORE_DAO::singleValueQuery('SELECT VERSION()'),
+ 'communityMessagesUrl' => CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'communityMessagesUrl', NULL, '*default*'),
+ );
+ $this->getPayProcStats();
+ $this->getEntityStats();
+ $this->getExtensionStats();
+ }
+ }
+