From d50b1ed470764e681b4ca7da1b9a62488da80d91 Mon Sep 17 00:00:00 2001 From: David Carrillo Date: Wed, 17 Sep 2025 10:18:37 +0200 Subject: [PATCH] MDL-86065 customfield: Add privacy provider metadata for 'shared' table --- public/customfield/classes/privacy/provider.php | 11 +++++++++++ public/lang/en/customfield.php | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/public/customfield/classes/privacy/provider.php b/public/customfield/classes/privacy/provider.php index 95187475c83..ed21a461507 100644 --- a/public/customfield/classes/privacy/provider.php +++ b/public/customfield/classes/privacy/provider.php @@ -80,6 +80,17 @@ class provider implements 'privacy:metadata:customfield_data' ); + $collection->add_database_table( + 'customfield_shared', + [ + 'categoryid' => 'privacy:metadata:customfield_shared:categoryid', + 'component' => 'privacy:metadata:customfield_shared:component', + 'area' => 'privacy:metadata:customfield_shared:area', + 'itemid' => 'privacy:metadata:customfield_shared:itemid', + ], + 'privacy:metadata:customfield_shared' + ); + // Link to subplugins. $collection->add_plugintype_link('customfield', [], 'privacy:metadata:customfieldpluginsummary'); diff --git a/public/lang/en/customfield.php b/public/lang/en/customfield.php index 19ed96fbbd3..847c015873a 100644 --- a/public/lang/en/customfield.php +++ b/public/lang/en/customfield.php @@ -85,6 +85,11 @@ $string['privacy:metadata:customfield_data:timemodified'] = 'Time when data was $string['privacy:metadata:customfield_data:value'] = 'Data value, when it is a text'; $string['privacy:metadata:customfield_data:valueformat'] = 'The format of the value, when it is a text'; $string['privacy:metadata:customfield_data:valuetrust'] = 'The trust flag of the value, when it is text'; +$string['privacy:metadata:customfield_shared'] = 'Represents custom field shared saved to a context'; +$string['privacy:metadata:customfield_shared:area'] = 'The area the shared field is associated with'; +$string['privacy:metadata:customfield_shared:categoryid'] = 'The ID of the category the shared field belongs to'; +$string['privacy:metadata:customfield_shared:component'] = 'The component the shared field is associated with'; +$string['privacy:metadata:customfield_shared:itemid'] = 'The ID of the item the shared field is associated with'; $string['privacy:metadata:customfieldpluginsummary'] = 'Fields for various components'; $string['privacy:metadata:filepurpose'] = 'File attached to the custom field data'; $string['sharedcategoryhelptext'] = 'When enabled, the custom fields in this category will be used';