From 7cffec58d0db3cbed6f6e55785d3accd89efe8aa Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Wed, 23 May 2007 15:05:46 +0000 Subject: This probably broke things :| #10697 #11421 #11555 #11421 git-svn-id: file:///svn/phpbb/trunk@7666 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/convertors/functions_phpbb20.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'phpBB/install/convertors/functions_phpbb20.php') diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 246316513d..badac08999 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -83,6 +83,14 @@ function phpbb_insert_forums() $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' ON'); break; } + + // pruning disabled globally? + $sql = "SELECT config_value + FROM {$convert->src_table_prefix}config + WHERE config_name = 'prune_enable'"; + $result = $src_db->sql_query($sql); + $prune_enabled = (int) $src_db->sql_fetchfield('config_value'); + $src_db->sql_freeresult($result); $cats_added = array(); while ($row = $src_db->sql_fetchrow($result)) @@ -206,7 +214,7 @@ function phpbb_insert_forums() 'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'), 'forum_type' => FORUM_POST, 'forum_status' => is_item_locked($row['forum_status']), - 'enable_prune' => $row['prune_enable'], + 'enable_prune' => ($prune_enabled) ? $row['prune_enable'] : 0, 'prune_next' => null_to_zero($row['prune_next']), 'prune_days' => null_to_zero($row['prune_days']), 'prune_viewed' => 0, -- cgit v1.2.1