mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-12530 - fixed changing of tag type in tag management
merged from MOODLE_19_STABLE
This commit is contained in:
parent
a1df2e982d
commit
990027e130
1 changed files with 2 additions and 1 deletions
|
@ -77,13 +77,14 @@ switch($action) {
|
||||||
$changed = array();
|
$changed = array();
|
||||||
|
|
||||||
foreach ($tagschecked as $tag_id) {
|
foreach ($tagschecked as $tag_id) {
|
||||||
if (!in_array($tagtypes[$tag_id], $existing_tagtypes)) {
|
if (!array_key_exists($tagtypes[$tag_id], $existing_tagtypes)) {
|
||||||
//can not add new types here!!
|
//can not add new types here!!
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// update tag type;
|
// update tag type;
|
||||||
$tag = tag_by_id($tag_id);
|
$tag = tag_by_id($tag_id);
|
||||||
|
$tag->timemodified = time();
|
||||||
$tag->tagtype = $tagtypes[$tag_id];
|
$tag->tagtype = $tagtypes[$tag_id];
|
||||||
|
|
||||||
if (update_record('tag', $tag)) {
|
if (update_record('tag', $tag)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue