ToastFreeware
/
toast
/
cookiecaptcha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
eb45ea6
)
Fixed bug in image count
author
Tim Starling
<tstarling@users.mediawiki.org>
Thu, 29 Mar 2007 18:38:46 +0000
(18:38 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Thu, 29 Mar 2007 18:38:46 +0000
(18:38 +0000)
FancyCaptcha.php
patch
|
blob
|
history
diff --git
a/FancyCaptcha.php
b/FancyCaptcha.php
index 63273a901754557aec82fa081423aed69cdd79c9..570488c9f7f0ccb28944b856582c92b958ecc51b 100644
(file)
--- a/
FancyCaptcha.php
+++ b/
FancyCaptcha.php
@@
-153,7
+153,7
@@
class FancyCaptcha extends SimpleCaptcha {
if( !is_dir( $directory ) ) {
return false;
}
- $n = mt_rand( 0, $this->countFiles( $directory ) );
+ $n = mt_rand( 0, $this->countFiles( $directory )
- 1
);
$dir = opendir( $directory );
$count = 0;
@@
-188,7
+188,7
@@
class FancyCaptcha extends SimpleCaptcha {
$dir = opendir( $dirname );
$count = 0;
while( false !== ($entry = readdir( $dir ) ) ) {
- if( $
dir != '.' && $dir
!= '..' ) {
+ if( $
entry != '.' && $entry
!= '..' ) {
$count++;
}
}