Skip to content

Commit

Permalink
Merge pull request #199 from Achal-Aggarwal/fix-162
Browse files Browse the repository at this point in the history
Fixes issue of language filter state after deleting the selected languag...
  • Loading branch information
infograf768 committed Aug 21, 2014
2 parents dc9cb7e + e080eb5 commit 8f1eeea
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions component/admin/models/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ public function save($data = array())
$text .= "\t" . '<authorEmail>' . htmlspecialchars($data['authorEmail'], ENT_COMPAT, 'UTF-8') . '</authorEmail>' . "\n";
$text .= "\t" . '<authorUrl>' . htmlspecialchars($data['authorUrl'], ENT_COMPAT, 'UTF-8') . '</authorUrl>' . "\n";
}

$text .= "\t" . '<copyright>' . htmlspecialchars($data['joomlacopyright'], ENT_COMPAT, 'UTF-8') . '</copyright>' . "\n";

// Author copyright is not used in installation. It is present in CREDITS file
Expand Down Expand Up @@ -468,6 +469,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;
}
}

0 comments on commit 8f1eeea

Please sign in to comment.