Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fix tag search criterion matching items of other types sharing the same ID
- Fix error when updating a ticket without creation date (e.g. entity transfer)
- Fix tags left in a deleted entity: declare their entity relation so it is checked and replaced on entity deletion
- Improve performance: no more database queries on each page load, fewer queries when displaying an item with many tags, faster "Associated items" tab of a tag (new index on the tag of the links), lighter entity tags and tag save requests

Comment thread
jdurand-teclib marked this conversation as resolved.
Resolved
## [2.14.8] - 2026-09-30

Expand Down
3 changes: 3 additions & 0 deletions ajax/get_entity_tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@
throw new BadRequestHttpException();
}

// Only reads the session: release its lock so the other calls of the page are not serialized behind this one
Session::writeClose();

echo PluginTagTag::getTagForEntityName($_REQUEST['name']);
36 changes: 36 additions & 0 deletions inc/config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,41 @@ class PluginTagConfig extends CommonDBTM
{
protected static $notable = true;

/**
* Configured location of the tags field, memoized for the current request.
*/
private static ?string $tags_location = null;

/**
* Get the configured location of the tags field in item forms.
*
* @return string '1' for the bottom of the form, '0' for the top (default)
*/
public static function getTagsLocation(): string
{
return self::$tags_location ??= (string) (Config::getConfigurationValues('plugin:Tag', ['tags_location'])['tags_location'] ?? '0');
}

/**
* Forget the memoized location.
*/
public static function resetTagsLocation(): void
{
self::$tags_location = null;
}

/**
* Called by core when the configuration form of the plugin is saved (`config_class` input).
*
* @param array $input submitted configuration values
* @return array
*/
public static function configUpdate($input)
{
self::resetTagsLocation();
return $input;
}

public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{

Expand Down Expand Up @@ -95,6 +130,7 @@ public static function uninstall()
{
$config = Config::getConfigurationValues('plugin:Tag');
Config::deleteConfigurationValues('plugin:Tag', array_keys($config));
self::resetTagsLocation();
return true;
}
}
Loading