You are here

function captcha_point_admin in CAPTCHA 7

Same name and namespace in other branches
  1. 6.2 captcha.admin.inc \captcha_point_admin()
  2. 6 captcha.admin.inc \captcha_point_admin()

Central handler for CAPTCHA point administration (adding, disabling, deleting).

1 string reference to 'captcha_point_admin'
captcha_menu in ./captcha.module
Implements of hook_menu().

File

./captcha.admin.inc, line 427
Functionality and helper functions for CAPTCHA administration.

Code

function captcha_point_admin($captcha_point_form_id = NULL, $op = NULL) {
  module_load_include('inc', 'captcha');

  // If $captcha_point_form_id and action $op given: do the action.
  if ($captcha_point_form_id) {
    switch ($op) {
      case 'disable':
        return drupal_get_form('captcha_point_disable_confirm', $captcha_point_form_id, FALSE);
      case 'delete':
        return drupal_get_form('captcha_point_disable_confirm', $captcha_point_form_id, TRUE);
    }

    // Return edit form for CAPTCHA point.
    return drupal_get_form('captcha_point_admin_form', $captcha_point_form_id);
  }

  // Return add form for CAPTCHA point.
  return drupal_get_form('captcha_point_admin_form');
}