You are here

function newsletter_statistics_open in Newsletter 7

Same name and namespace in other branches
  1. 7.2 modules/statistics/includes/newsletter_statistics.pages.inc \newsletter_statistics_open()
1 string reference to 'newsletter_statistics_open'
newsletter_menu in ./newsletter.module
Implements hook_menu().

File

includes/newsletter.pages.inc, line 204
Functions and forms for the frontend part of newsletter module.

Code

function newsletter_statistics_open($subscriber) {
  if (isset($_GET['source']) && $_GET['source'] == 'newsletter' && $subscriber) {
    $newsletter = newsletter_newsletter_load($_GET['nnid']);
    $newsletter->opens++;
    entity_get_controller('newsletter_newsletter')
      ->save($newsletter);
  }
}