Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed to support "negative" values in scale field.

  • Loading branch information...
commit cd6232200cf3ecf70dc2653143b3c8b71340581d 1 parent 555ab21
stronk7 authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 mod/forum/restorelib.php
View
10 mod/forum/restorelib.php
@@ -60,10 +60,12 @@ function forum_restore_mods($mod,$restore) {
$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;
+ //We have to recode the scale field if it's <0 (default now always)
+ if ($forum->scale < 0) {
+ $scale = backup_getid($restore->backup_unique_code,"scale",abs($forum->scale));
+ if ($scale) {
+ $forum->scale = -($scale->new_id);
+ }
}
//The structure is equal to the db, so insert the forum
Please sign in to comment.
Something went wrong with that request. Please try again.