|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* |
|
4
|
|
|
* Ajax Shoutbox extension for the phpBB Forum Software package. |
|
5
|
|
|
* |
|
6
|
|
|
* @copyright (c) 2014 Paul Sohier <http://www.ajax-shoutbox.com> |
|
7
|
|
|
* @license GNU General Public License, version 2 (GPL-2.0) |
|
8
|
|
|
* |
|
9
|
|
|
*/ |
|
10
|
|
|
namespace paul999\ajaxshoutbox\migrations; |
|
11
|
|
|
|
|
12
|
|
|
class remove_push_config extends \phpbb\db\migration\migration |
|
13
|
|
|
{ |
|
14
|
|
|
static public function depends_on() |
|
|
|
|
|
|
15
|
|
|
{ |
|
16
|
|
|
return array( |
|
17
|
|
|
'\paul999\ajaxshoutbox\migrations\add_push_config', |
|
18
|
|
|
'\paul999\ajaxshoutbox\migrations\add_push_config2', |
|
19
|
|
|
'\paul999\ajaxshoutbox\migrations\update_push_config' |
|
20
|
|
|
); |
|
21
|
|
|
} |
|
22
|
|
|
|
|
23
|
|
|
public function revert_data() |
|
24
|
|
|
{ |
|
25
|
|
|
return array( |
|
26
|
|
|
array('config.add', array('ajaxshoutbox_validation_id', uniqid())), |
|
27
|
|
|
array('config.add', array('ajaxshoutbox_push_enabled', false)), |
|
28
|
|
|
array('config.add', array('ajaxshoutbox_api_key', '')), |
|
29
|
|
|
array('config.add', array('ajaxshoutbox_connection_key', '')), |
|
30
|
|
|
|
|
31
|
|
|
array('config.add', array('ajaxshoutbox_api_server', 'https://www.shoutbox-app.com/post')), // We can't use the API. |
|
32
|
|
|
array('config.add', array('ajaxshoutbox_ssl_key', '')), |
|
33
|
|
|
); |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
public function update_data() |
|
37
|
|
|
{ |
|
38
|
|
|
return array( |
|
39
|
|
|
array('config.remove', array('ajaxshoutbox_validation_id')), |
|
40
|
|
|
array('config.remove', array('ajaxshoutbox_push_enabled')), |
|
41
|
|
|
array('config.remove', array('ajaxshoutbox_api_key')), |
|
42
|
|
|
array('config.remove', array('ajaxshoutbox_connection_key')), |
|
43
|
|
|
|
|
44
|
|
|
array('config.remove', array('ajaxshoutbox_api_server')), |
|
45
|
|
|
array('config.remove', array('ajaxshoutbox_ssl_key')), |
|
46
|
|
|
); |
|
47
|
|
|
} |
|
48
|
|
|
} |
|
49
|
|
|
|