CC setting is now an admin option. Original patch provided by Rouslan Placella. (feature request #0001259)
3 // Add Topic Assignment Table
5 CREATE TABLE {$_TABLES['topic_assignments']} (
6 tid varchar(20) NOT NULL,
7 type varchar(30) NOT NULL,
8 id varchar(40) NOT NULL,
9 inherit smallint NOT NULL default '1',
10 tdefault smallint NOT NULL default '0',
11 PRIMARY KEY (tid,type,id)
15 // Add new Topic Columns used for Child Topics
16 $_SQL[] = "ALTER TABLE {$_TABLES['topics']} ADD COLUMN parent_id varchar(20) NOT NULL default 'root' AFTER archive_flag";
17 $_SQL[] = "ALTER TABLE {$_TABLES['topics']} ADD COLUMN inherit smallint NOT NULL default '1' AFTER parent_id";
18 $_SQL[] = "ALTER TABLE {$_TABLES['topics']} ADD COLUMN hidden smallint NOT NULL default '0' AFTER inherit";
20 // Update Session Table
21 $_SQL[] = "ALTER TABLE {$_TABLES['sessions']} ADD COLUMN whos_online smallint NOT NULL default '1' AFTER md5_sess_id";
22 $_SQL[] = "ALTER TABLE {$_TABLES['sessions']} ADD COLUMN topic varchar(20) NOT NULL default '' AFTER whos_online";
25 * Create Story and Submission Topic assignments
28 function update_StoryTopicAssignmentsFor190()
32 $story_tables[] = $_TABLES['stories'];
33 $story_tables[] = $_TABLES['storysubmission'];
35 foreach ($story_tables as $story_table) {
36 $sql = "SELECT * FROM $story_table";
37 $result = DB_query($sql);
38 $nrows = DB_numRows($result);
40 for ($i = 0; $i < $nrows; $i++) {
41 $A = DB_fetchArray($result);
43 $sql = "INSERT INTO {$_TABLES['topic_assignments']} (tid, type, id, inherit, tdefault) VALUES ('{$A['tid']}', 'article', '{$A['sid']}', 1, 1)";
47 // Remove tid from table
48 $sql = "ALTER TABLE $story_table DROP tid";
55 * Create Block Topic assignments
58 function update_BlockTopicAssignmentsFor190()
63 $sql = "SELECT * FROM {$_TABLES['blocks']}";
64 $result = DB_query($sql);
65 $nrows = DB_numRows($result);
67 for ($i = 0; $i < $nrows; $i++) {
68 $A = DB_fetchArray($result);
70 $sql = "INSERT INTO {$_TABLES['topic_assignments']} (tid, type, id, inherit, tdefault) VALUES ('{$A['tid']}', 'block', '{$A['bid']}', 1, 0)";
74 // Remove Topic Id from blocks table
75 $sql = "ALTER TABLE {$_TABLES['blocks']} DROP tid";
81 * Add new config options
84 function update_ConfValuesFor190()
86 global $_CONF, $_TABLES;
88 require_once $_CONF['path_system'] . 'classes/config.class.php';
90 $c = config::get_instance();
95 $c->add('tab_topics', NULL, 'tab', 7, 45, NULL, 0, TRUE, $me, 45);
96 $c->add('fs_breadcrumbs', NULL, 'fieldset', 7, 45, NULL, 0, TRUE, $me, 45);
97 $c->add('disable_breadcrumbs_topics', 0, 'select', 7, 45, 0, 2000, TRUE, $me, 45);
98 $c->add('disable_breadcrumbs_articles', 0, 'select', 7, 45, 0, 2010, TRUE, $me, 45);
99 $c->add('disable_breadcrumbs_plugins', 0, 'select', 7, 45, 0, 2020, TRUE, $me, 45);
102 $c->add('linktext_maxlen',50,'text',7,31,NULL,1754,TRUE, $me,31);
105 $c->add('mail_cc_enabled', 1, 'select', 0, 1, 0, 180, TRUE, $me, 1);
106 $c->add('mail_cc_default', 0, 'select', 0, 1, 0, 190, TRUE, $me, 1);