| @@ 12-30 (lines=19) @@ | ||
| 9 | ||
| 10 | namespace tas2580\socialbuttons\migrations; |
|
| 11 | ||
| 12 | class release_0_4_3_data extends \phpbb\db\migration\migration |
|
| 13 | { |
|
| 14 | public function effectively_installed() |
|
| 15 | { |
|
| 16 | return isset($this->config['socialbuttons_version']) && version_compare($this->config['socialbuttons_version'], '0.4.3', '>='); |
|
| 17 | } |
|
| 18 | ||
| 19 | public function update_data() |
|
| 20 | { |
|
| 21 | return array( |
|
| 22 | array('config.add', array('socialbuttons_enable_og', '1')), |
|
| 23 | array('config.add', array('socialbuttons_og_image', '')), |
|
| 24 | array('config.add', array('socialbuttons_enable_og_title', '1')), |
|
| 25 | array('config.add', array('socialbuttons_enable_og_desc', '1')), |
|
| 26 | ||
| 27 | array('config.add', array('socialbuttons_version', '0.4.3')), |
|
| 28 | ); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||
| @@ 11-27 (lines=17) @@ | ||
| 8 | */ |
|
| 9 | namespace tas2580\socialbuttons\migrations; |
|
| 10 | ||
| 11 | class release_0_5_0_data extends \phpbb\db\migration\migration |
|
| 12 | { |
|
| 13 | public function effectively_installed() |
|
| 14 | { |
|
| 15 | return isset($this->config['socialbuttons_version']) && version_compare($this->config['socialbuttons_version'], '0.5.0', '>='); |
|
| 16 | } |
|
| 17 | public function update_data() |
|
| 18 | { |
|
| 19 | return array( |
|
| 20 | array('config.add', array('socialbuttons_enable_og_desc_forums', '')), |
|
| 21 | array('config.add', array('socialbuttons_use_seo_urls', '0')), |
|
| 22 | array('config.add', array('socialbuttons_enable_forums', '')), |
|
| 23 | array('config.add', array('socialbuttons_enable', '')), |
|
| 24 | array('config.add', array('socialbuttons_version', '0.5.0')), |
|
| 25 | ); |
|
| 26 | } |
|
| 27 | } |
|
| 28 | ||