From 22dbec47d3246b385c28609d10644a47af0a2f8d Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms Date: Fri, 20 Feb 2026 17:27:17 +0100 Subject: introduce Config::reset() to reset a config value, fixes #6287 --- lib/classes/Config.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/classes/Config.php b/lib/classes/Config.php index 20eebdc..434c5a9 100644 --- a/lib/classes/Config.php +++ b/lib/classes/Config.php @@ -358,6 +358,16 @@ class Config implements ArrayAccess, Countable, IteratorAggregate } /** + * Resets the configuration to it's default value. + * + * @return int The number of removed value entries + */ + public function reset(string $field): int + { + return ConfigValue::deleteBySql('field=?', [$field]); + } + + /** * delete config entry from database * @param string name of entry * @throws InvalidArgumentException -- cgit v1.0