From e080eb5273c371cba346cdec0446f14597ed10dd Mon Sep 17 00:00:00 2001 From: Achal-Aggarwal Date: Thu, 21 Aug 2014 16:09:42 +0530 Subject: [PATCH] Fixes issue of language filter state after deleting the selected language. --- component/admin/models/language.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/component/admin/models/language.php b/component/admin/models/language.php index 70832128..c0256780 100644 --- a/component/admin/models/language.php +++ b/component/admin/models/language.php @@ -298,6 +298,7 @@ public function save($data = array()) $text .= "\t" . '' . htmlspecialchars($data['authorEmail'], ENT_COMPAT, 'UTF-8') . '' . "\n"; $text .= "\t" . '' . htmlspecialchars($data['authorUrl'], ENT_COMPAT, 'UTF-8') . '' . "\n"; } + $text .= "\t" . '' . htmlspecialchars($data['joomlacopyright'], ENT_COMPAT, 'UTF-8') . '' . "\n"; // Author copyright is not used in installation. It is present in CREDITS file @@ -494,6 +495,16 @@ public function delete() return false; } + // Clear UserState for select.tag if the language deleted is selected in the filter. + $app = JFactory::getApplication(); + $data = $app->getUserState('com_localise.select'); + + if ($data['tag'] == $tag) + { + $data['tag'] = ''; + $app->setUserState('com_localise.select', $data); + } + return true; } }