diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php index 80354ef717..5afbb6a2f1 100644 --- a/main/forum/forumfunction.inc.php +++ b/main/forum/forumfunction.inc.php @@ -298,7 +298,7 @@ function show_add_forum_form($inputvalues=array()) $defaults['approval_direct_group']['approval_direct']=0; $defaults['allow_attachments_group']['allow_attachments']=1; $defaults['allow_new_threads_group']['allow_new_threads']=1; - $defaults['default_view_type_group']['default_view_type']='flat'; + $defaults['default_view_type_group']['default_view_type']=api_get_setting('default_forum_view'); $defaults['public_private_group_forum_group']['public_private_group_forum']='public'; if (isset($_GET['forumcategory'])) { diff --git a/main/install/migrate-db-1.8.3-1.8.4-pre.sql b/main/install/migrate-db-1.8.3-1.8.4-pre.sql index 0f39b5ecff..33a4d47c5d 100644 --- a/main/install/migrate-db-1.8.3-1.8.4-pre.sql +++ b/main/install/migrate-db-1.8.3-1.8.4-pre.sql @@ -18,8 +18,11 @@ INSERT INTO settings_current(variable,subkey,type,category,selected_value,title, INSERT INTO settings_current(variable,subkey,type,category,selected_value,title,comment,scope,subkeytext) VALUES ('show_tabs', 'platform_administration', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsPlatformAdministration'); INSERT INTO settings_current(variable,subkey,type,category,selected_value,title,comment,scope,subkeytext) VALUES ('show_tabs', 'my_agenda', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsMyAgenda'); INSERT INTO settings_current(variable,subkey,type,category,selected_value,title,comment,scope,subkeytext) VALUES ('show_tabs', 'my_profile', 'checkbox', 'Platform', 'true', 'ShowTabsTitle','ShowTabsComment',NULL,'TabsMyProfile'); +INSERT INTO settings_current(variable,subkey,type,category,selected_value,title,comment,scope,subkeytext) VALUES ('default_forum_view', NULL, 'radio', 'Course', 'flat', 'DefaultForumViewTitle','DefaultForumViewComment',NULL,NULL); - +INSERT INTO settings_options(variable,value,display_text) VALUES ('default_forum_view', 'flat', 'Flat'); +INSERT INTO settings_options(variable,value,display_text) VALUES ('default_forum_view', 'threaded', 'Threaded'); +INSERT INTO settings_options(variable,value,display_text) VALUES ('default_forum_view', 'nested', 'Nested'); -- xxSTATSxx -- xxUSERxx