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
moodle
moodle
Commits
1002024c
Commit
1002024c
authored
Jan 14, 2016
by
Andrew Nicols
Browse files
Merge branch 'wip-MDL-50851-backupfix' of
git://github.com/marinaglancy/moodle
parents
59a968dc
83acb499
Changes
1
Hide whitespace changes
Inline
Side-by-side
tag/classes/tag.php
View file @
1002024c
...
...
@@ -796,10 +796,11 @@ class core_tag_tag {
'contextid'
=>
$record
->
taginstancecontextid
,
'tiuserid'
=>
$tiuserid
);
$tag
=
new
static
(
$record
);
$tag
->
delete_instance_as_record
(
$taginstance
,
false
);
$sql
=
"UPDATE
{
tag_instance
}
ti SET ordering = ordering - 1
WHERE ti.itemtype = :itemtype
AND ti.itemid = :itemid
$componentsql
$usersql
AND ti.ordering > :ordering"
;
$componentsql
=
$component
?
" AND component = :component "
:
""
;
$sql
=
"UPDATE
{
tag_instance
}
SET ordering = ordering - 1
WHERE itemtype = :itemtype
AND itemid = :itemid
$componentsql
$usersql
AND ordering > :ordering"
;
$params
[
'ordering'
]
=
$record
->
ordering
;
$DB
->
execute
(
$sql
,
$params
);
}
...
...
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