function uc_store_send_report in Ubercart 5
1 call to uc_store_send_report()
- uc_store_cron in uc_store/
uc_store.module - Implementation of hook_cron().
File
- uc_store/
uc_store.module, line 2925 - Contains global Ubercart functions and store administration functionality.
Code
function uc_store_send_report() {
// Load the version data array.
$data = uc_store_report_data();
// Set the time of our report.
variable_set('uc_store_last_report', time());
// Send the data off to Ubercart.org.
$response = drupal_http_request('http://www.ubercart.org/statistics/report', array(
'Content-Type' => 'application/x-www-form-urlencoded',
), 'POST', drupal_query_string_encode($data));
// If we got a response, store it as the site ID.
if ($response->data) {
variable_set('uc_store_site_id', $response->data);
}
watchdog('uc_store', t('Reported the following version info to Ubercart.org:') . '<pre>' . print_r($data, TRUE) . '</pre>');
}