diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2009-06-07 11:34:01 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-06-07 11:34:01 +0000 |
| commit | a539fca62b10f53a5f5dadf07f9ab07340fdabf9 (patch) | |
| tree | 28f4ab59d1564aefd30709748ce245f993be5f7c /phpBB/includes/captcha/captcha_factory.php | |
| parent | 711f482cb62070ab2340aa27c736a85cc6e8c518 (diff) | |
| download | forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar.gz forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar.bz2 forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.tar.xz forums-a539fca62b10f53a5f5dadf07f9ab07340fdabf9.zip | |
some corrections, only very minor things.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9554 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/captcha/captcha_factory.php')
| -rw-r--r-- | phpBB/includes/captcha/captcha_factory.php | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php index fbe615a043..b5fa69990d 100644 --- a/phpBB/includes/captcha/captcha_factory.php +++ b/phpBB/includes/captcha/captcha_factory.php @@ -16,8 +16,11 @@ if (!defined('IN_PHPBB')) exit; } - -/** A small class until we get the autoloader done */ +/** +* A small class for 3.0.x (no autoloader in 3.0.x) +* +* @package VC +*/ class phpbb_captcha_factory { /** @@ -26,7 +29,7 @@ class phpbb_captcha_factory function get_instance($name) { global $phpbb_root_path, $phpEx; - + $name = basename($name); if (!class_exists($name)) { @@ -34,7 +37,7 @@ class phpbb_captcha_factory } return call_user_func(array($name, 'get_instance')); } - + /** * Call the garbage collector */ @@ -49,18 +52,19 @@ class phpbb_captcha_factory } call_user_func(array($name, 'garbage_collect'), 0); } - + /** * return a list of all discovered CAPTCHA plugins */ function get_captcha_types() { global $phpbb_root_path, $phpEx; - - $captchas = array(); - $captchas['available'] = array(); - $captchas['unavailable'] = array(); - + + $captchas = array( + 'available' => array(), + 'unavailable' => array(), + ); + $dp = @opendir($phpbb_root_path . 'includes/captcha/plugins'); if ($dp) @@ -74,6 +78,7 @@ class phpbb_captcha_factory { include($phpbb_root_path . "includes/captcha/plugins/$file"); } + if (call_user_func(array($name, 'is_available'))) { $captchas['available'][$name] = call_user_func(array($name, 'get_name')); |
