aboutsummaryrefslogtreecommitdiff
path: root/mod/captcha/start.php
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 12:49:51 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 12:49:51 +0000
commit514afb57ceb65ef6109f7bc60181a0aa45b8f950 (patch)
treea53626b764b691fb66e0ec1b2c5f5f1dc8ce962e /mod/captcha/start.php
parente463f5079c9eef80350184cdb8af968dc416e90e (diff)
downloadelgg-514afb57ceb65ef6109f7bc60181a0aa45b8f950.tar.gz
elgg-514afb57ceb65ef6109f7bc60181a0aa45b8f950.tar.bz2
Updated Captcha UI.
git-svn-id: http://code.elgg.org/elgg/trunk@5400 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/captcha/start.php')
-rw-r--r--mod/captcha/start.php23
1 files changed, 8 insertions, 15 deletions
diff --git a/mod/captcha/start.php b/mod/captcha/start.php
index 9c76ce738..898d041b6 100644
--- a/mod/captcha/start.php
+++ b/mod/captcha/start.php
@@ -2,15 +2,14 @@
/**
* Elgg captcha plugin
*
- * @package ElggCaptcha
+ * @package captcha
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider Ltd
* @copyright Curverider Ltd 2008-2010
* @link http://elgg.com/
*/
- function captcha_init()
- {
+ function captcha_init() {
global $CONFIG;
// Register page handler for captcha functionality
@@ -39,8 +38,7 @@
}
}
- function captcha_page_handler($page)
- {
+ function captcha_page_handler($page) {
global $CONFIG;
if (isset($page[0])) {
@@ -53,8 +51,7 @@
/**
* Generate a token to act as a seed value for the captcha algorithm.
*/
- function captcha_generate_token()
- {
+ function captcha_generate_token() {
return md5(generate_action_token(time()).rand()); // Use action token plus some random for uniqueness
}
@@ -64,8 +61,7 @@
* @param string $seed_token
* @return string
*/
- function captcha_generate_captcha($seed_token)
- {
+ function captcha_generate_captcha($seed_token) {
global $CONFIG;
/*
@@ -88,8 +84,7 @@
* @param string $seed_token
* @return bool
*/
- function captcha_verify_captcha($input_value, $seed_token)
- {
+ function captcha_verify_captcha($input_value, $seed_token) {
if (strcasecmp($input_value, captcha_generate_captcha($seed_token)) == 0)
return true;
@@ -104,8 +99,7 @@
* @param unknown_type $returnvalue
* @param unknown_type $params
*/
- function captcha_verify_action_hook($hook, $entity_type, $returnvalue, $params)
- {
+ function captcha_verify_action_hook($hook, $entity_type, $returnvalue, $params) {
$token = get_input('captcha_token');
$input = get_input('captcha_input');
@@ -126,8 +120,7 @@
* @param unknown_type $returnvalue
* @param unknown_type $params
*/
- function captcha_actionlist_hook($hook, $entity_type, $returnvalue, $params)
- {
+ function captcha_actionlist_hook($hook, $entity_type, $returnvalue, $params) {
if (!is_array($returnvalue))
$returnvalue = array();