mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 22:45:02 +02:00
[ticket/12402] CAPTCHA plugin migration fails to detect missing plugins
PHPBB3-12402
This commit is contained in:
parent
571d6ae852
commit
290a1b04c4
@ -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')),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user