diff --git a/admin/tool/customlang/locallib.php b/admin/tool/customlang/locallib.php index 02ae558dcb8..83e879a866d 100644 --- a/admin/tool/customlang/locallib.php +++ b/admin/tool/customlang/locallib.php @@ -159,6 +159,11 @@ class tool_customlang_utils { $needsupdate = true; $current[$stringid]->local = $stringlocal; $current[$stringid]->timecustomized = $now; + } else if (isset($currentlocal) && $stringlocal !== $currentlocal) { + // If local string has been removed, we need to remove also the old local value from DB. + $needsupdate = true; + $current[$stringid]->local = null; + $current[$stringid]->timecustomized = $now; } if ($needsupdate) {