Scales are now supported in forums backup and restore
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user