From 7b33018ade25a6bb866b7746b9dcc7455a7304ab Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sun, 16 Nov 2014 16:52:59 -0800 Subject: [PATCH 1/2] [ticket/13315] Fix loss of CAPTCHA plugin config value. The plugins were moved to phpbb/captcha/plugins/ after this migration was created, thus the check is no longer valid and ends up resetting the value prematurely. PHPBB3-13315 --- .../db/migration/data/v310/reset_missing_captcha_plugin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php b/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php index d5f9076196..68d630b063 100644 --- a/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php +++ b/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php @@ -29,7 +29,8 @@ class reset_missing_captcha_plugin extends \phpbb\db\migration\migration { return array( array('if', array( - (!is_file($this->phpbb_root_path . "includes/captcha/plugins/{$this->config['captcha_plugin']}_plugin." . $this->php_ext)), + (!is_dir($this->phpbb_root_path . 'phpbb/captcha/plugins/') && + !is_file($this->phpbb_root_path . "includes/captcha/plugins/{$this->config['captcha_plugin']}_plugin." . $this->php_ext)), array('config.update', array('captcha_plugin', 'phpbb_captcha_nogd')), )), ); From 7c6896415391dc94c83486921118edc41189d760 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 18 Nov 2014 00:37:07 -0800 Subject: [PATCH 2/2] [ticket/13315] Check for the includes/captcha/plugins/ directory instead. PHPBB3-13315 --- .../db/migration/data/v310/reset_missing_captcha_plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php b/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php index 68d630b063..8211457dc6 100644 --- a/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php +++ b/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php @@ -29,7 +29,7 @@ class reset_missing_captcha_plugin extends \phpbb\db\migration\migration { return array( array('if', array( - (!is_dir($this->phpbb_root_path . 'phpbb/captcha/plugins/') && + (is_dir($this->phpbb_root_path . 'includes/captcha/plugins/') && !is_file($this->phpbb_root_path . "includes/captcha/plugins/{$this->config['captcha_plugin']}_plugin." . $this->php_ext)), array('config.update', array('captcha_plugin', 'phpbb_captcha_nogd')), )),