| Línea 419... |
Línea 419... |
| 419 |
"WHERE ti.itemtype = :itemtype2 AND ti.component = :component2 ";
|
419 |
"WHERE ti.itemtype = :itemtype2 AND ti.component = :component2 ";
|
| 420 |
$cleanupcollections = $DB->get_fieldset_sql($sql, $params);
|
420 |
$cleanupcollections = $DB->get_fieldset_sql($sql, $params);
|
| Línea 421... |
Línea 421... |
| 421 |
|
421 |
|
| 422 |
// Find all tags that are related to the tags being moved and make sure they are present in the target tagcoll.
|
422 |
// Find all tags that are related to the tags being moved and make sure they are present in the target tagcoll.
|
| - |
|
423 |
// This query is a little complicated because Oracle does not allow to run SELECT DISTINCT on CLOB fields.
|
| 423 |
// This query is a little complicated because Oracle does not allow to run SELECT DISTINCT on CLOB fields.
|
424 |
// TODO: Optimise the query, as Oracle-specific constraints no longer apply.
|
| 424 |
$sql = "SELECT name, rawname, description, descriptionformat, userid, isstandard, flag, timemodified ".
|
425 |
$sql = "SELECT name, rawname, description, descriptionformat, userid, isstandard, flag, timemodified ".
|
| 425 |
"FROM {tag} WHERE id IN ".
|
426 |
"FROM {tag} WHERE id IN ".
|
| 426 |
"(SELECT r.id ".
|
427 |
"(SELECT r.id ".
|
| 427 |
"FROM {tag_instance} ti ". // Instances that need moving.
|
428 |
"FROM {tag_instance} ti ". // Instances that need moving.
|
| Línea 453... |
Línea 454... |
| 453 |
}
|
454 |
}
|
| 454 |
$result->close();
|
455 |
$result->close();
|
| Línea 455... |
Línea 456... |
| 455 |
|
456 |
|
| 456 |
// Find all tags that are used for this itemtype/component and are not present in the target tag collection.
|
457 |
// Find all tags that are used for this itemtype/component and are not present in the target tag collection.
|
| - |
|
458 |
// This query is a little complicated because Oracle does not allow to run SELECT DISTINCT on CLOB fields.
|
| 457 |
// This query is a little complicated because Oracle does not allow to run SELECT DISTINCT on CLOB fields.
|
459 |
// TODO: Optimise the query, as Oracle-specific constraints no longer apply.
|
| 458 |
$sql = "SELECT id, name, rawname, description, descriptionformat, userid, isstandard, flag, timemodified
|
460 |
$sql = "SELECT id, name, rawname, description, descriptionformat, userid, isstandard, flag, timemodified
|
| 459 |
FROM {tag} WHERE id IN
|
461 |
FROM {tag} WHERE id IN
|
| 460 |
(SELECT t.id
|
462 |
(SELECT t.id
|
| 461 |
FROM {tag_instance} ti
|
463 |
FROM {tag_instance} ti
|