@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Interface for Drivers |
|
4 | - * |
|
5 | - * PHP version 5 |
|
6 | - * |
|
7 | - * @category Text |
|
8 | - * @package Text_CAPTCHA |
|
9 | - * @author Michael Cramer <[email protected]> |
|
10 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
11 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
12 | - */ |
|
3 | + * Interface for Drivers |
|
4 | + * |
|
5 | + * PHP version 5 |
|
6 | + * |
|
7 | + * @category Text |
|
8 | + * @package Text_CAPTCHA |
|
9 | + * @author Michael Cramer <[email protected]> |
|
10 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
11 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
12 | + */ |
|
13 | 13 | /** |
14 | - * Interface for Text_CAPTCHA drivers |
|
15 | - * |
|
16 | - * @category Text |
|
17 | - * @package Text_CAPTCHA |
|
18 | - * @author Michael Cramer <[email protected]> |
|
19 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
20 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
21 | - */ |
|
14 | + * Interface for Text_CAPTCHA drivers |
|
15 | + * |
|
16 | + * @category Text |
|
17 | + * @package Text_CAPTCHA |
|
18 | + * @author Michael Cramer <[email protected]> |
|
19 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
20 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
21 | + */ |
|
22 | 22 | interface Text_CAPTCHA_Driver |
23 | 23 | { |
24 | 24 | /** |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Text_CAPTCHA_Driver_Word - Text_CAPTCHA driver word CAPTCHAs |
|
4 | - * Class to create a textual Turing test |
|
5 | - * |
|
6 | - * PHP version 5 |
|
7 | - * |
|
8 | - * @category Text |
|
9 | - * @package Text_CAPTCHA |
|
10 | - * @author Tobias Schlitt <[email protected]> |
|
11 | - * @author Christian Wenz <[email protected]> |
|
12 | - * @author Michael Cramer <[email protected]> |
|
13 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
14 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
15 | - */ |
|
3 | + * Text_CAPTCHA_Driver_Word - Text_CAPTCHA driver word CAPTCHAs |
|
4 | + * Class to create a textual Turing test |
|
5 | + * |
|
6 | + * PHP version 5 |
|
7 | + * |
|
8 | + * @category Text |
|
9 | + * @package Text_CAPTCHA |
|
10 | + * @author Tobias Schlitt <[email protected]> |
|
11 | + * @author Christian Wenz <[email protected]> |
|
12 | + * @author Michael Cramer <[email protected]> |
|
13 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
14 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
15 | + */ |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Require Numbers_Words class for generating the text. |
@@ -1,28 +1,28 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Require Figlet class for rendering the text. |
|
4 | - * |
|
5 | - * PHP version 5 |
|
6 | - * |
|
7 | - * @category Text |
|
8 | - * @package Text_CAPTCHA |
|
9 | - * @author Aaron Wormus <[email protected]> |
|
10 | - * @author Christian Wenz <[email protected]> |
|
11 | - * @author Michael Cramer <[email protected]> |
|
12 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
13 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
14 | - */ |
|
3 | + * Require Figlet class for rendering the text. |
|
4 | + * |
|
5 | + * PHP version 5 |
|
6 | + * |
|
7 | + * @category Text |
|
8 | + * @package Text_CAPTCHA |
|
9 | + * @author Aaron Wormus <[email protected]> |
|
10 | + * @author Christian Wenz <[email protected]> |
|
11 | + * @author Michael Cramer <[email protected]> |
|
12 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
13 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
14 | + */ |
|
15 | 15 | /** |
16 | - * Text_CAPTCHA_Driver_Figlet - Text_CAPTCHA driver Figlet based CAPTCHAs |
|
17 | - * |
|
18 | - * @category Text |
|
19 | - * @package Text_CAPTCHA |
|
20 | - * @author Aaron Wormus <[email protected]> |
|
21 | - * @author Christian Wenz <[email protected]> |
|
22 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
23 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
24 | - * @todo define an obfuscation algorithm |
|
25 | - */ |
|
16 | + * Text_CAPTCHA_Driver_Figlet - Text_CAPTCHA driver Figlet based CAPTCHAs |
|
17 | + * |
|
18 | + * @category Text |
|
19 | + * @package Text_CAPTCHA |
|
20 | + * @author Aaron Wormus <[email protected]> |
|
21 | + * @author Christian Wenz <[email protected]> |
|
22 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
23 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
24 | + * @todo define an obfuscation algorithm |
|
25 | + */ |
|
26 | 26 | class Text_CAPTCHA_Driver_Figlet extends Text_CAPTCHA_Driver_Base |
27 | 27 | { |
28 | 28 | /** |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Equation driver for Text_CAPTCHA. |
|
4 | - * Returns simple equations as string, e.g. "9 - 2" |
|
5 | - * |
|
6 | - * PHP version 5 |
|
7 | - * |
|
8 | - * @category Text |
|
9 | - * @package Text_CAPTCHA |
|
10 | - * @author Christian Weiske <[email protected]> |
|
11 | - * @author Christian Wenz <[email protected]> |
|
12 | - * @author Michael Cramer <[email protected]> |
|
13 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
14 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
15 | - */ |
|
3 | + * Equation driver for Text_CAPTCHA. |
|
4 | + * Returns simple equations as string, e.g. "9 - 2" |
|
5 | + * |
|
6 | + * PHP version 5 |
|
7 | + * |
|
8 | + * @category Text |
|
9 | + * @package Text_CAPTCHA |
|
10 | + * @author Christian Weiske <[email protected]> |
|
11 | + * @author Christian Wenz <[email protected]> |
|
12 | + * @author Michael Cramer <[email protected]> |
|
13 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
14 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
15 | + */ |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Equation driver for Text_CAPTCHA. |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Class used for numeral captchas |
|
4 | - * |
|
5 | - * PHP version 5 |
|
6 | - * |
|
7 | - * @category Text |
|
8 | - * @package Text_CAPTCHA |
|
9 | - * @author David Coallier <[email protected]> |
|
10 | - * @author Christian Wenz <[email protected]> |
|
11 | - * @author Michael Cramer <[email protected]> |
|
12 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
13 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
14 | - */ |
|
3 | + * Class used for numeral captchas |
|
4 | + * |
|
5 | + * PHP version 5 |
|
6 | + * |
|
7 | + * @category Text |
|
8 | + * @package Text_CAPTCHA |
|
9 | + * @author David Coallier <[email protected]> |
|
10 | + * @author Christian Wenz <[email protected]> |
|
11 | + * @author Michael Cramer <[email protected]> |
|
12 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
13 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
14 | + */ |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * Class used for numeral captchas |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Require Image_Text class for generating the text. |
|
4 | - * |
|
5 | - * PHP version 5 |
|
6 | - * |
|
7 | - * @category Text |
|
8 | - * @package Text_CAPTCHA |
|
9 | - * @author Christian Wenz <[email protected]> |
|
10 | - * @author Michael Cramer <[email protected]> |
|
11 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
12 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
13 | - */ |
|
3 | + * Require Image_Text class for generating the text. |
|
4 | + * |
|
5 | + * PHP version 5 |
|
6 | + * |
|
7 | + * @category Text |
|
8 | + * @package Text_CAPTCHA |
|
9 | + * @author Christian Wenz <[email protected]> |
|
10 | + * @author Michael Cramer <[email protected]> |
|
11 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
12 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Text_CAPTCHA_Driver_Image - Text_CAPTCHA driver graphical CAPTCHAs |
@@ -1,26 +1,26 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Exception for Text_CAPTCHA |
|
4 | - * |
|
5 | - * PHP version 5 |
|
6 | - * |
|
7 | - * @category Text |
|
8 | - * @package Text_CAPTCHA |
|
9 | - * @author Christian Weiske <[email protected]> |
|
10 | - * @author Christian Wenz <[email protected]> |
|
11 | - * @author Michael Cramer <[email protected]> |
|
12 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
13 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
14 | - */ |
|
3 | + * Exception for Text_CAPTCHA |
|
4 | + * |
|
5 | + * PHP version 5 |
|
6 | + * |
|
7 | + * @category Text |
|
8 | + * @package Text_CAPTCHA |
|
9 | + * @author Christian Weiske <[email protected]> |
|
10 | + * @author Christian Wenz <[email protected]> |
|
11 | + * @author Michael Cramer <[email protected]> |
|
12 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
13 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
14 | + */ |
|
15 | 15 | /** |
16 | - * Exception for Text_CAPTCHA |
|
17 | - * |
|
18 | - * @category Text |
|
19 | - * @package Text_CAPTCHA |
|
20 | - * @author Michael Cramer <[email protected]> |
|
21 | - * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
22 | - * @link http://pear.php.net/package/Text_CAPTCHA |
|
23 | - */ |
|
16 | + * Exception for Text_CAPTCHA |
|
17 | + * |
|
18 | + * @category Text |
|
19 | + * @package Text_CAPTCHA |
|
20 | + * @author Michael Cramer <[email protected]> |
|
21 | + * @license http://www.opensource.org/licenses/bsd-license.php BSD License |
|
22 | + * @link http://pear.php.net/package/Text_CAPTCHA |
|
23 | + */ |
|
24 | 24 | class Text_CAPTCHA_Exception extends PEAR_Exception |
25 | 25 | { |
26 | 26 |
@@ -441,17 +441,17 @@ discard block |
||
441 | 441 | * List of vowels and vowel sounds |
442 | 442 | */ |
443 | 443 | $v = array('a', 'e', 'i', 'o', 'u', 'ae', 'ou', 'io', |
444 | - 'ea', 'ou', 'ia', 'ai' |
|
445 | - ); |
|
444 | + 'ea', 'ou', 'ia', 'ai' |
|
445 | + ); |
|
446 | 446 | |
447 | 447 | /** |
448 | 448 | * List of consonants and consonant sounds |
449 | 449 | */ |
450 | 450 | $c = array('b', 'c', 'd', 'g', 'h', 'j', 'k', 'l', 'm', |
451 | - 'n', 'p', 'r', 's', 't', 'u', 'v', 'w', |
|
452 | - 'tr', 'cr', 'fr', 'dr', 'wr', 'pr', 'th', |
|
453 | - 'ch', 'ph', 'st', 'sl', 'cl' |
|
454 | - ); |
|
451 | + 'n', 'p', 'r', 's', 't', 'u', 'v', 'w', |
|
452 | + 'tr', 'cr', 'fr', 'dr', 'wr', 'pr', 'th', |
|
453 | + 'ch', 'ph', 'st', 'sl', 'cl' |
|
454 | + ); |
|
455 | 455 | |
456 | 456 | $v_count = 12; |
457 | 457 | $c_count = 29; |
@@ -484,50 +484,50 @@ discard block |
||
484 | 484 | /** |
485 | 485 | * List of character which could be use in the password |
486 | 486 | */ |
487 | - switch($chars) { |
|
487 | + switch($chars) { |
|
488 | 488 | |
489 | - case 'alphanumeric': |
|
489 | + case 'alphanumeric': |
|
490 | 490 | $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
491 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 62; |
|
492 | - break; |
|
491 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 62; |
|
492 | + break; |
|
493 | 493 | |
494 | - case 'alphabetical': |
|
494 | + case 'alphabetical': |
|
495 | 495 | $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
496 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 52; |
|
497 | - break; |
|
496 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 52; |
|
497 | + break; |
|
498 | 498 | |
499 | - case 'numeric': |
|
499 | + case 'numeric': |
|
500 | 500 | $chars = '0123456789'; |
501 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 10; |
|
502 | - break; |
|
501 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 10; |
|
502 | + break; |
|
503 | 503 | |
504 | - case '': |
|
504 | + case '': |
|
505 | 505 | $chars = '_#@%&ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
506 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 67; |
|
507 | - break; |
|
506 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 67; |
|
507 | + break; |
|
508 | 508 | |
509 | - default: |
|
509 | + default: |
|
510 | 510 | /** |
511 | 511 | * Some characters shouldn't be used |
512 | 512 | */ |
513 | 513 | $chars = trim($chars); |
514 | - $chars = str_replace(array('+', '|', '$', '^', '/', '\\', ','), '', $chars); |
|
515 | - |
|
516 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = strlen($chars); |
|
517 | - } |
|
518 | - |
|
519 | - /** |
|
520 | - * Generate password |
|
521 | - */ |
|
522 | - for ($i = 0; $i < $length; $i++) { |
|
523 | - $num = mt_rand(0, $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] - 1); |
|
524 | - $password .= $chars{$num}; |
|
525 | - } |
|
526 | - |
|
527 | - /** |
|
528 | - * Return password |
|
529 | - */ |
|
530 | - return $password; |
|
514 | + $chars = str_replace(array('+', '|', '$', '^', '/', '\\', ','), '', $chars); |
|
515 | + |
|
516 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = strlen($chars); |
|
517 | + } |
|
518 | + |
|
519 | + /** |
|
520 | + * Generate password |
|
521 | + */ |
|
522 | + for ($i = 0; $i < $length; $i++) { |
|
523 | + $num = mt_rand(0, $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] - 1); |
|
524 | + $password .= $chars{$num}; |
|
525 | + } |
|
526 | + |
|
527 | + /** |
|
528 | + * Return password |
|
529 | + */ |
|
530 | + return $password; |
|
531 | 531 | } |
532 | 532 | } |
533 | 533 | ?> |
@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * General API for generating and formatting diffs - the differences between |
|
4 | - * two sequences of strings. |
|
5 | - * |
|
6 | - * The original PHP version of this code was written by Geoffrey T. Dairiki |
|
7 | - * <[email protected]>, and is used/adapted with his permission. |
|
8 | - * |
|
9 | - * $Horde: framework/Text_Diff/Diff.php,v 1.11.2.12 2009/01/06 15:23:41 jan Exp $ |
|
10 | - * |
|
11 | - * Copyright 2004 Geoffrey T. Dairiki <[email protected]> |
|
12 | - * Copyright 2004-2009 The Horde Project (http://www.horde.org/) |
|
13 | - * |
|
14 | - * See the enclosed file COPYING for license information (LGPL). If you did |
|
15 | - * not receive this file, see http://opensource.org/licenses/lgpl-license.php. |
|
16 | - * |
|
17 | - * @package Text_Diff |
|
18 | - * @author Geoffrey T. Dairiki <[email protected]> |
|
19 | - */ |
|
3 | + * General API for generating and formatting diffs - the differences between |
|
4 | + * two sequences of strings. |
|
5 | + * |
|
6 | + * The original PHP version of this code was written by Geoffrey T. Dairiki |
|
7 | + * <[email protected]>, and is used/adapted with his permission. |
|
8 | + * |
|
9 | + * $Horde: framework/Text_Diff/Diff.php,v 1.11.2.12 2009/01/06 15:23:41 jan Exp $ |
|
10 | + * |
|
11 | + * Copyright 2004 Geoffrey T. Dairiki <[email protected]> |
|
12 | + * Copyright 2004-2009 The Horde Project (http://www.horde.org/) |
|
13 | + * |
|
14 | + * See the enclosed file COPYING for license information (LGPL). If you did |
|
15 | + * not receive this file, see http://opensource.org/licenses/lgpl-license.php. |
|
16 | + * |
|
17 | + * @package Text_Diff |
|
18 | + * @author Geoffrey T. Dairiki <[email protected]> |
|
19 | + */ |
|
20 | 20 | class Text_Diff |
21 | 21 | { |
22 | 22 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | function _getTempDir() |
228 | 228 | { |
229 | 229 | $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp', |
230 | - 'c:\windows\temp', 'c:\winnt\temp'); |
|
230 | + 'c:\windows\temp', 'c:\winnt\temp'); |
|
231 | 231 | |
232 | 232 | /* Try PHP's upload_tmp_dir directive. */ |
233 | 233 | $tmp = ini_get('upload_tmp_dir'); |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * of elements as $to_lines. |
310 | 310 | */ |
311 | 311 | function Text_MappedDiff($from_lines, $to_lines, |
312 | - $mapped_from_lines, $mapped_to_lines) |
|
312 | + $mapped_from_lines, $mapped_to_lines) |
|
313 | 313 | { |
314 | 314 | assert(count($from_lines) == count($mapped_from_lines)); |
315 | 315 | assert(count($to_lines) == count($mapped_to_lines)); |