| @@ 16-34 (lines=19) @@ | ||
| 13 | /** |
|
| 14 | * Migration 2: Add a config var for the signature setting |
|
| 15 | */ |
|
| 16 | class m2_signature_config extends \phpbb\db\migration\migration |
|
| 17 | { |
|
| 18 | public function effectively_installed() |
|
| 19 | { |
|
| 20 | return $this->config->offsetExists('media_embed_allow_sig'); |
|
| 21 | } |
|
| 22 | ||
| 23 | public static function depends_on() |
|
| 24 | { |
|
| 25 | return ['\phpbb\mediaembed\migrations\m1_install_data']; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function update_data() |
|
| 29 | { |
|
| 30 | return [ |
|
| 31 | ['config.add', ['media_embed_allow_sig', 0]], |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 16-34 (lines=19) @@ | ||
| 13 | /** |
|
| 14 | * Migration 3: Add a config var for parsing plain urls |
|
| 15 | */ |
|
| 16 | class m3_plain_urls_config extends \phpbb\db\migration\migration |
|
| 17 | { |
|
| 18 | public function effectively_installed() |
|
| 19 | { |
|
| 20 | return $this->config->offsetExists('media_embed_parse_urls'); |
|
| 21 | } |
|
| 22 | ||
| 23 | public static function depends_on() |
|
| 24 | { |
|
| 25 | return ['\phpbb\mediaembed\migrations\m1_install_data']; |
|
| 26 | } |
|
| 27 | ||
| 28 | public function update_data() |
|
| 29 | { |
|
| 30 | return [ |
|
| 31 | ['config.add', ['media_embed_parse_urls', 1]], |
|
| 32 | ]; |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||