diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 185afb3b2d..702d652efd 100755 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -14,6 +14,7 @@ - Added select box option for multiable domains in login.php - Fixed proxy server support for headlines and check for new version on main screen. - Fixed headlines preferences and converted headline preferences to a template + - Fixed pgsql upgrade from beta path. [0.9.7] - Fixed SQL error in tts - Fixed table locking in admin -> edit account diff --git a/setup/sql/pgsql_upgrade_beta.inc.php b/setup/sql/pgsql_upgrade_beta.inc.php index e6ab45b0bf..fc4b7c801d 100644 --- a/setup/sql/pgsql_upgrade_beta.inc.php +++ b/setup/sql/pgsql_upgrade_beta.inc.php @@ -704,23 +704,22 @@ cal_description text)"; $db->query($sql,__LINE__,__FILE__); $db->query("SELECT cal_id,cal_owner,cal_group,cal_datetime,cal_mdatetime,cal_duration,cal_priority,cal_type,cal_access,cal_name,cal_description FROM TEMP ORDER BY cal_id",__LINE__,__FILE__); - while($db->next_record()) { - $db2->query("SELECT preference_value FROM preferences WHERE preference_name='tz_offset' AND preference_appname='common' AND preference_owner=".$db->f("cal_owner"),__LINE__,__FILE__); - $db2->next_record(); - $tz = $db2->f("preference_value"); - $cal_id = $db->f("cal_id"); - $cal_owner = $db->f("cal_owner"); - $cal_group = $db->f("cal_group"); - $cal_datetime = $db->f("cal_datetime") - ((60 * 60) * $tz); - $cal_mdatetime = $db->f("cal_mdatetime") - ((60 * 60) * $tz); - $cal_edatetime = $cal_datetime + (60 * $db->f("cal_duration")); - $cal_priority = $db->f("cal_priority"); - $cal_type = $db->f("cal_type"); - $cal_access = $db->f("cal_access"); - $cal_name = $db->f("cal_name"); - $cal_description = $db->f("cal_description"); - $db2->query("INSERT INTO calendar_entry(cal_id,cal_owner,cal_group,cal_datetime,cal_mdatetime,cal_edatetime,cal_priority,cal_type,cal_access,cal_name,cal_description) VALUES(".$cal_id.",".$cal_owner.",'".$cal_group."',".cal_datetime.",".$cal_mdatetime.",".$cal_edatetime.",".$cal_priority.",'".$cal_type."','".$cal_access."','".$cal_name."','".$cal_description."')",__LINE__,__FILE__); - } + while($db->next_record()) { + $db2->query("SELECT preference_value FROM preferences WHERE preference_name='tz_offset' AND preference_appname='common' AND preference_owner=".$db->f("cal_owner"),__LINE__,__FILE__); + $db2->next_record(); + $tz = $db2->f("preference_value"); + $cal_id = $db->f("cal_id"); + $cal_owner = $db->f("cal_owner"); + $cal_group = $db->f("cal_group"); + $cal_datetime = $db->f("cal_datetime") - ((60 * 60) * $tz); + $cal_mdatetime = $db->f("cal_mdatetime") - ((60 * 60) * $tz); + $cal_edatetime = $cal_datetime + (60 * $db->f("cal_duration")); + $cal_priority = $db->f("cal_priority"); + $cal_type = $db->f("cal_type"); + $cal_access = $db->f("cal_access"); + $cal_name = $db->f("cal_name"); + $cal_description = $db->f("cal_description"); + $db2->query("INSERT INTO calendar_entry(cal_id,cal_owner,cal_group,cal_datetime,cal_mdatetime,cal_edatetime,cal_priority,cal_type,cal_access,cal_name,cal_description) VALUES(".$cal_id.",".$cal_owner.",'".$cal_group."',".cal_datetime.",".$cal_mdatetime.",".$cal_edatetime.",".$cal_priority.",'".$cal_type."','".$cal_access."','".$cal_name."','".$cal_description."')",__LINE__,__FILE__); } $sql = "DROP TABLE TEMP"; $db->query($sql,__LINE__,__FILE__);