You are here

function comment_notify_page in Comment Notify 5.2

Same name and namespace in other branches
  1. 5 comment_notify.module \comment_notify_page()

Page callback to allow users to unsubscribe simply by visiting the page.

1 string reference to 'comment_notify_page'
comment_notify_menu in ./comment_notify.module
Implementation of hook_menu().

File

./comment_notify.module, line 208
This module provides comment follow-up e-mail notification for anonymous and registered users.

Code

function comment_notify_page() {
  global $user;
  $op = $_POST['op'];
  $edit = $_POST['edit'];
  $page_content = ' ';
  if (empty($op)) {
    $op = arg(1);
  }
  $arg = arg(2);
  switch ($op) {
    case 'disable':
      $key = $arg;
      db_query("UPDATE {comment_notify} SET notify = 0 WHERE notify_hash = '%s'", $arg);
      drupal_set_message(t('Your comment follow-up notification for this post was disabled. Thanks.'));
      $title = t('Disabled comment follow-up notification feature for this post.');
      break;
    default:
      $title = t('Comment notify');
      break;
  }
  drupal_set_title($title);
  print theme('page', $page_content);
}