MDL-55153 customlang: Remove local DB entries when deleting local file

This commit is contained in:
Sara Arjona 2018-02-21 20:53:19 +01:00
parent d1b4ca921e
commit efa66e0597

View File

@ -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) {