You are here

function captcha_get_captcha_points in CAPTCHA 6.2

Same name and namespace in other branches
  1. 7 captcha.inc \captcha_get_captcha_points()

Helper function to load all captcha points.

Return value

array of all captcha_points

2 calls to captcha_get_captcha_points()
captcha_admin_settings in ./captcha.admin.inc
Form builder function for the general CAPTCHA configuration
captcha_admin_settings_submit in ./captcha.admin.inc
Submission function for captcha_admin_settings form.

File

./captcha.inc, line 99
General CAPTCHA functionality and helper functions.

Code

function captcha_get_captcha_points() {
  if (module_exists('ctools')) {
    ctools_include('export');
    $captcha_points = ctools_export_load_object('captcha_points', 'all');
    ksort($captcha_points);
  }
  else {
    $captcha_points = array();
    $result = db_query("SELECT * FROM {captcha_points} ORDER BY form_id");
    while ($captcha_point = db_fetch_object($result)) {
      $captcha_points[] = $captcha_point;
    }
  }
  return $captcha_points;
}