aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-08-09 15:57:01 +0200
committerTristan Darricau <github@nicofuma.fr>2014-08-11 01:16:22 +0200
commitb91abf1a0bd751da640219596a94019f70086c0b (patch)
treec277cb04b3b31cace50420aa00a3c74af3fd0330
parentd73d606f11897f13e3779c76261be6f96139f0e0 (diff)
downloadforums-b91abf1a0bd751da640219596a94019f70086c0b.tar
forums-b91abf1a0bd751da640219596a94019f70086c0b.tar.gz
forums-b91abf1a0bd751da640219596a94019f70086c0b.tar.bz2
forums-b91abf1a0bd751da640219596a94019f70086c0b.tar.xz
forums-b91abf1a0bd751da640219596a94019f70086c0b.zip
[ticket/11854] Rename captchas.factory service to captcha.factory
PHPBB3-11854
-rw-r--r--phpBB/config/captcha.yml2
-rw-r--r--phpBB/includes/acp/acp_captcha.php4
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php2
-rw-r--r--phpBB/includes/ucp/ucp_login_link.php2
-rw-r--r--phpBB/includes/ucp/ucp_register.php2
-rw-r--r--phpBB/phpbb/session.php2
-rw-r--r--phpBB/posting.php2
-rw-r--r--phpBB/report.php2
-rw-r--r--tests/session/garbage_collection_test.php2
10 files changed, 11 insertions, 11 deletions
diff --git a/phpBB/config/captcha.yml b/phpBB/config/captcha.yml
index fa40c89045..a9618f3fad 100644
--- a/phpBB/config/captcha.yml
+++ b/phpBB/config/captcha.yml
@@ -1,5 +1,5 @@
services:
- captchas.factory:
+ captcha.factory:
class: phpbb\captcha\factory
arguments:
- @service_container
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 099acf707b..fa8d8fb6a9 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -30,7 +30,7 @@ class acp_captcha
$user->add_lang('acp/board');
- $factory = $phpbb_container->get('captchas.factory');
+ $factory = $phpbb_container->get('captcha.factory');
$captchas = $factory->get_captcha_types();
$selected = request_var('select_captcha', $config['captcha_plugin']);
@@ -138,7 +138,7 @@ class acp_captcha
{
global $db, $user, $config, $phpbb_container;
- $captcha = $phpbb_container->get('captchas.factory')->get_instance($selected);
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($selected);
$captcha->init(CONFIRM_REG);
$captcha->execute_demo();
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index d0a32030e3..6cdee825d2 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2839,7 +2839,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
{
case LOGIN_ERROR_ATTEMPTS:
- $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_LOGIN);
// $captcha->reset();
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
index 8ade142e2b..7392f8dea8 100644
--- a/phpBB/includes/ucp/ucp_confirm.php
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -38,7 +38,7 @@ class ucp_confirm
{
global $db, $user, $phpbb_root_path, $config, $phpEx, $phpbb_container;
- $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(request_var('type', 0));
$captcha->execute();
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php
index 7c768992f7..5ca5df00f7 100644
--- a/phpBB/includes/ucp/ucp_login_link.php
+++ b/phpBB/includes/ucp/ucp_login_link.php
@@ -197,7 +197,7 @@ class ucp_login_link
{
case LOGIN_ERROR_ATTEMPTS:
- $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_LOGIN);
$template->assign_vars(array(
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index dbe2233553..a303197563 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -182,7 +182,7 @@ class ucp_register
// The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
if ($config['enable_confirm'])
{
- $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_REG);
}
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index a9dde5bbaa..7d564742af 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1022,7 +1022,7 @@ class session
}
// only called from CRON; should be a safe workaround until the infrastructure gets going
- $captcha_factory = $phpbb_container->get('captchas.factory');
+ $captcha_factory = $phpbb_container->get('captcha.factory');
$captcha_factory->garbage_collect($config['captcha_plugin']);
$sql = 'DELETE FROM ' . LOGIN_ATTEMPT_TABLE . '
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 6d6297741b..4c3d012ca5 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -241,7 +241,7 @@ $user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
{
- $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_POST);
}
diff --git a/phpBB/report.php b/phpBB/report.php
index 39df109904..fd6fab6645 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -151,7 +151,7 @@ else
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
{
- $captcha = $phpbb_container->get('captchas.factory')->get_instance($config['captcha_plugin']);
+ $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
$captcha->init(CONFIRM_REPORT);
}
diff --git a/tests/session/garbage_collection_test.php b/tests/session/garbage_collection_test.php
index 027a7ca852..3fad81c68b 100644
--- a/tests/session/garbage_collection_test.php
+++ b/tests/session/garbage_collection_test.php
@@ -33,7 +33,7 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
$plugins = new \phpbb\di\service_collection($phpbb_container);
$plugins->add('core.captcha.plugins.nogd');
$phpbb_container->set(
- 'captchas.factory',
+ 'captcha.factory',
new \phpbb\captcha\factory($phpbb_container, $plugins)
);
$phpbb_container->set(