discussion->usermodified is in backup & restore now.

This commit is contained in:
stronk7 2004-02-08 19:34:22 +00:00
parent 41fd7fe497
commit e222ce0944
2 changed files with 8 additions and 0 deletions

View File

@ -132,6 +132,7 @@
fwrite ($bf,full_tag("GROUPID",6,false,$for_dis->groupid));
fwrite ($bf,full_tag("ASSESSED",6,false,$for_dis->assessed));
fwrite ($bf,full_tag("TIMEMODIFIED",6,false,$for_dis->timemodified));
fwrite ($bf,full_tag("USERMODIFIED",6,false,$for_dis->usermodified));
//Now print posts to xml
$status = backup_forum_posts($bf,$preferences,$for_dis->id);
//End discussion

View File

@ -203,6 +203,7 @@
$discussion->groupid = backup_todb($dis_info['#']['GROUPID']['0']['#']);
$discussion->assessed = backup_todb($dis_info['#']['ASSESSED']['0']['#']);
$discussion->timemodified = backup_todb($dis_info['#']['TIMEMODIFIED']['0']['#']);
$discussion->usermodified = backup_todb($dis_info['#']['USERMODIFIED']['0']['#']);
//We have to recode the userid field
$user = backup_getid($restore->backup_unique_code,"user",$discussion->userid);
@ -216,6 +217,12 @@
$discussion->groupid = $group->new_id;
}
//We have to recode the usermodified field
$user = backup_getid($restore->backup_unique_code,"user",$discussion->usermodified);
if ($user) {
$discussion->usermodified = $user->new_id;
}
//The structure is equal to the db, so insert the forum_discussions
$newid = insert_record ("forum_discussions",$discussion);