SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: <var...@us...> - 2012年01月03日 11:38:16
Revision: 8217
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8217&view=rev
Author: vargenau
Date: 2012年01月03日 11:38:06 +0000 (2012年1月03日)
Log Message:
-----------
Fix Captcha problem reported by Harold Hallikainen
Modified Paths:
--------------
 trunk/lib/Captcha.php
Modified: trunk/lib/Captcha.php
===================================================================
--- trunk/lib/Captcha.php	2012年01月03日 10:58:12 UTC (rev 8216)
+++ trunk/lib/Captcha.php	2012年01月03日 11:38:06 UTC (rev 8217)
@@ -35,8 +35,8 @@
 
 function captchaword() {
 if ( ! $this->request->getSessionVar('captchaword')) {
- $this->request->setSessionVar('captchaword', $this->get_word());
- }
+ $this->request->setSessionVar('captchaword', $this->get_word());
+ }
 return $this->request->getSessionVar('captchaword');
 }
 
@@ -64,8 +64,9 @@
 'size' => $this->length + 2,
 'maxlength' => 256));
 $url = WikiURL("", array("action"=>"captcha","id"=>time()), false);
- $el['CAPTCHA_IMAGE'] = "<img src=\"$url\" alt=\"captcha\" />";
- $el['CAPTCHA_LABEL'] = '<label for="edit-captcha_input">'._("Type word above:").' </label>';
+ $el['CAPTCHA_IMAGE'] = HTML::img(array('src' => $url, 'alt' => 'captcha'));
+ $el['CAPTCHA_LABEL'] = HTML::label(array('for' => 'edit-captcha_input'),
+ _("Type word above:"));
 }
 return $el;
 }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <var...@us...> - 2012年11月21日 14:13:36
Revision: 8517
 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8517&view=rev
Author: vargenau
Date: 2012年11月21日 14:13:25 +0000 (2012年11月21日)
Log Message:
-----------
Initialize variable
Modified Paths:
--------------
 trunk/lib/Captcha.php
Modified: trunk/lib/Captcha.php
===================================================================
--- trunk/lib/Captcha.php	2012年11月21日 14:06:13 UTC (rev 8516)
+++ trunk/lib/Captcha.php	2012年11月21日 14:13:25 UTC (rev 8517)
@@ -147,6 +147,7 @@
 $y = rand(50, $height - 20); //50-60
 
 // randomize the chars
+ $angle = 0;
 for ($i = 0; $i < strlen($word); $i++) {
 $angle += rand(-5, 5);
 if ($angle > 25) $angle = 15;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
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 (2014年11月17日)
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.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /