From: <var...@us...> - 2014-11-17 14:48:35
|
Revision: 9315 http://sourceforge.net/p/phpwiki/code/9315 Author: vargenau Date: 2014-11-17 14:48:27 +0000 (Mon, 17 Nov 2014) Log Message: ----------- Add class variables; add this Modified Paths: -------------- trunk/lib/Captcha.php Modified: trunk/lib/Captcha.php =================================================================== --- trunk/lib/Captcha.php 2014-11-17 14:36:57 UTC (rev 9314) +++ trunk/lib/Captcha.php 2014-11-17 14:48:27 UTC (rev 9315) @@ -24,6 +24,15 @@ class Captcha { + public $meta; + public $width; + public $height; + public $length; + public $failed_msg; + /** + * @var WikiRequest + */ + public $request; function Captcha($meta = array(), $width = 250, $height = 80) { @@ -80,7 +89,7 @@ function get_word() { if (USE_CAPTCHA_RANDOM_WORD) - return get_dictionary_word(); + return $this->get_dictionary_word(); else return rand_ascii_readable($this->length); // lib/stdlib.php } @@ -89,6 +98,7 @@ { // Load In the Word List $fp = fopen(findfile("lib/captcha/dictionary"), "r"); + $text = array(); while (!feof($fp)) $text[] = trim(fgets($fp, 1024)); fclose($fp); @@ -99,6 +109,7 @@ $x = mt_rand(0, count($text)); return $text[$x]; } + return ''; } // Draw the Spiral This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |