aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration/v307rc1.php
blob: f1c8b3384aabd836e75552f003bbdff2995b1f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
*
* @package migration
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/

class phpbb_db_migration_v307rc1 extends phpbb_db_migration
{
	function depends_on()
	{
		return array('phpbb_db_migration_v306');
	}

	function update_schema()
	{
		return array(
			'drop_keys' => array(
				$this->table_prefix . 'log' => array('log_time'),
			),
			'add_index' => array(
				$this->table_prefix . 'topics_track' => array(
					'topic_id' => array('topic_id'),
				),
			),
		);
	}

	function update_data()
	{
		// ATOM Feeds
		set_config('feed_overall', '1');
		set_config('feed_http_auth', '0');
		set_config('feed_limit_post', (string) (isset($config['feed_limit']) ? (int) $config['feed_limit'] : 15));
		set_config('feed_limit_topic', (string) (isset($config['feed_overall_topics_limit']) ? (int) $config['feed_overall_topics_limit'] : 10));
		set_config('feed_topics_new', (!empty($config['feed_overall_topics']) ? '1' : '0'));
		set_config('feed_topics_active', (!empty($config['feed_overall_topics']) ? '1' : '0'));

		// Delete all text-templates from the template_data
		$sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
			WHERE template_filename ' . $db->sql_like_expression($db->any_char . '.txt');
		_sql($sql, $errored, $error_ary);
	}
}