summaryrefslogtreecommitdiffstats
path: root/modules-available/translation/page.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/translation/page.inc.php')
-rw-r--r--modules-available/translation/page.inc.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/modules-available/translation/page.inc.php b/modules-available/translation/page.inc.php
index e41d4786..df7bc15e 100644
--- a/modules-available/translation/page.inc.php
+++ b/modules-available/translation/page.inc.php
@@ -997,24 +997,19 @@ class Page_Translation extends Page
$data = array();
//find the tag requests to change the file
- foreach ($_POST as $key => $value) {
- $str = explode('#!#', $key, 2);
- if (count($str) !== 2)
+ $tags = Request::post('langtag', array(), 'array');
+ foreach ($tags as $tag => $value) {
+ $tag = trim($tag);
+ if (empty($tag)) {
+ Message::addWarning('i18n-empty-tag');
continue;
- if ($str[0] === 'lang') {
- $tag = trim($str[1]);
- if (empty($tag)) {
- Message::addWarning('i18n-empty-tag');
- continue;
- }
- if (empty($value)) {
- unset($data[$tag]);
- } else {
- $data[$tag] = $value;
- }
+ }
+ if (empty($value)) {
+ unset($data[$tag]);
+ } else {
+ $data[$tag] = $value;
}
}
-
$translation = Request::post('new-text', array(), 'array');
foreach (Request::post('new-id', array(), 'array') as $k => $tag) {
if (empty($translation[$k]) || empty($tag))