aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/captcha_factory.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-10-04 18:13:59 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-10-04 18:13:59 +0000
commitbf8ac19eaa8d74f9dfd6d597190f5664e7339382 (patch)
treec3ad876736748e36cb9176a0248cc43badfc1d9a /phpBB/includes/captcha/captcha_factory.php
parent3215bbf88864139dc8c7e9ac5773b1ea8a7e96c1 (diff)
downloadforums-bf8ac19eaa8d74f9dfd6d597190f5664e7339382.tar
forums-bf8ac19eaa8d74f9dfd6d597190f5664e7339382.tar.gz
forums-bf8ac19eaa8d74f9dfd6d597190f5664e7339382.tar.bz2
forums-bf8ac19eaa8d74f9dfd6d597190f5664e7339382.tar.xz
forums-bf8ac19eaa8d74f9dfd6d597190f5664e7339382.zip
Move trunk/phpBB to old_trunk/phpBB
git-svn-id: file:///svn/phpbb/trunk@10210 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/captcha/captcha_factory.php')
-rw-r--r--phpBB/includes/captcha/captcha_factory.php95
1 files changed, 0 insertions, 95 deletions
diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php
deleted file mode 100644
index 0f16e137ec..0000000000
--- a/phpBB/includes/captcha/captcha_factory.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-/**
-*
-* @package VC
-* @version $Id: $
-* @copyright (c) 2008 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-if (!interface_exists('phpbb_captcha_plugin'))
-{
- include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_plugin.' . PHP_EXT);
-}
-
-/**
-* A small class until we get the autoloader done
-*/
-class phpbb_captcha_factory
-{
- /**
- * return an instance of class $name in file $name_plugin.php
- */
- public static function get_instance($name)
- {
- $name = basename($name);
- if (!class_exists($name))
- {
- include(PHPBB_ROOT_PATH . "includes/captcha/plugins/{$name}_plugin." . PHP_EXT);
- }
- return call_user_func(array($name, 'get_instance'));
- }
-
- /**
- * Call the garbage collector
- */
- public static function garbage_collect($name)
- {
- $name = basename($name);
- if (!class_exists($name))
- {
- include(PHPBB_ROOT_PATH . "includes/captcha/plugins/{$name}_plugin." . PHP_EXT);
- }
- call_user_func(array($name, 'garbage_collect'), 0);
- }
-
- /**
- * return a list of all discovered CAPTCHA plugins
- */
- public static function get_captcha_types()
- {
- $captchas = array(
- 'available' => array(),
- 'unavailable' => array(),
- );
-
- $dp = @opendir(PHPBB_ROOT_PATH . 'includes/captcha/plugins');
-
- if ($dp)
- {
- while (($file = readdir($dp)) !== false)
- {
- if ((preg_match('#_plugin\.' . PHP_EXT . '$#', $file)))
- {
- $name = preg_replace('#^(.*?)_plugin\.' . PHP_EXT . '$#', '\1', $file);
- if (!class_exists($name))
- {
- 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'));
- }
- else
- {
- $captchas['unavailable'][$name] = call_user_func(array($name, 'get_name'));
- }
- }
- }
- closedir($dp);
- }
-
- return $captchas;
- }
-}
-
-?> \ No newline at end of file