Scales are now supported in forums backup and restore

This commit is contained in:
stronk7
2003-08-18 00:03:40 +00:00
parent af847821a2
commit 93d7d97fc8
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -51,6 +51,7 @@
fwrite ($bf,full_tag("INTRO",4,false,$forum->intro));
fwrite ($bf,full_tag("OPEN",4,false,$forum->open));
fwrite ($bf,full_tag("ASSESSED",4,false,$forum->assessed));
fwrite ($bf,full_tag("SCALE",4,false,$forum->scale));
fwrite ($bf,full_tag("FORCESUBSCRIBE",4,false,$forum->forcesubscribe));
fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$forum->timemodified));
+7
View File
@@ -54,9 +54,16 @@
$forum->intro = backup_todb($info['MOD']['#']['INTRO']['0']['#']);
$forum->open = backup_todb($info['MOD']['#']['OPEN']['0']['#']);
$forum->assessed = backup_todb($info['MOD']['#']['ASSESSED']['0']['#']);
$forum->scale = backup_todb($info['MOD']['#']['SCALE']['0']['#']);
$forum->forcesubscribe = backup_todb($info['MOD']['#']['FORCESUBSCRIBE']['0']['#']);
$forum->timemodified = backup_todb($info['MOD']['#']['TIMEMODIFIED']['0']['#']);
//We have to recode the scale field
$scale = backup_getid($restore->backup_unique_code,"scale",$forum->scale);
if ($scale) {
$forum->scale = $scale->new_id;
}
//The structure is equal to the db, so insert the forum
$newid = insert_record ("forum",$forum);