Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
2c3d8a06
Commit
2c3d8a06
authored
Nov 28, 2017
by
Damyon Wiese
Browse files
Merge branch 'MDL-60669-master' of
git://github.com/tobiasreischmann/moodle
parents
bdb15765
9bd68076
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/forum/backup/moodle2/restore_forum_stepslib.php
View file @
2c3d8a06
...
...
@@ -168,8 +168,14 @@ class restore_forum_activity_structure_step extends restore_activity_structure_s
$data
->
forum
=
$this
->
get_new_parentid
(
'forum'
);
$data
->
userid
=
$this
->
get_mappingid
(
'user'
,
$data
->
userid
);
$newitemid
=
$DB
->
insert_record
(
'forum_subscriptions'
,
$data
);
$this
->
set_mapping
(
'forum_subscription'
,
$oldid
,
$newitemid
,
true
);
// Create only a new subscription if it does not already exist (see MDL-59854).
if
(
$subscription
=
$DB
->
get_record
(
'forum_subscriptions'
,
array
(
'forum'
=>
$data
->
forum
,
'userid'
=>
$data
->
userid
)))
{
$this
->
set_mapping
(
'forum_subscription'
,
$oldid
,
$subscription
->
id
,
true
);
}
else
{
$newitemid
=
$DB
->
insert_record
(
'forum_subscriptions'
,
$data
);
$this
->
set_mapping
(
'forum_subscription'
,
$oldid
,
$newitemid
,
true
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment