diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-08 13:13:15 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-08 13:13:15 +0200 |
commit | 416c58a4183c6cef877b4c91a7b7469a88696314 (patch) | |
tree | 4e7d43661dc2ce9162b1f07672fede82d2b90b3a | |
parent | aade62b0a3d7a593f91dbdd04f8264dd541efa7f (diff) | |
parent | 290a1b04c47a58b2abc28507db9c4df31a42bb3b (diff) | |
download | forums-416c58a4183c6cef877b4c91a7b7469a88696314.tar forums-416c58a4183c6cef877b4c91a7b7469a88696314.tar.gz forums-416c58a4183c6cef877b4c91a7b7469a88696314.tar.bz2 forums-416c58a4183c6cef877b4c91a7b7469a88696314.tar.xz forums-416c58a4183c6cef877b4c91a7b7469a88696314.zip |
Merge pull request #2418 from Nicofuma/ticket/12402
[ticket/12402] CAPTCHA plugin migration fails to detect missing plugins
* Nicofuma/ticket/12402:
[ticket/12402] CAPTCHA plugin migration fails to detect missing plugins
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php | 33 |
1 files changed, 33 insertions, 0 deletions
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 new file mode 100644 index 0000000000..8fa6a3ff5b --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/reset_missing_captcha_plugin.php @@ -0,0 +1,33 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +/** +* Class captcha_plugin +* +* Reset the captcha setting to the default plugin if the defined 'captcha_plugin' is missing. +*/ +class reset_missing_captcha_plugin extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array('\phpbb\db\migration\data\v310\dev'); + } + + public function update_data() + { + return array( + array('if', array( + (!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')), + )), + ); + } +} |