JoomFish/jf-future — Issue #22: Translation Save and Save&Close button both redirect to translation overview
Author: quodo
Created: 2012-01-30 17:09:06+00:00
State: open

**Issue**
Saving a translation with "Save" returns you to the Translation Overview just like "Save & Close" where it should return you to the translation (Edit page) itself.

**Probable cause**
In /JROOT/administrator/components/com_joomfish/joomfish.php on line 52 (https://github.com/JoomFish/jf-future/blob/master/component/admin/joomfish.php#L52) and further the $task is split when it is a pair like translate.apply or translate.save (e.g. when you want to save a translation using Save or Save & Close) via
```list($controllerName, $task) = explode('.', $cmd);```

This split $task (apply or save) is then used in line 83
```$controller->execute($task);```
and then used in function saveTranslation in /JROOT/administrator/components/com_joomfish/controllers/translate.php

However, on line 342 the $task is tested like this (https://github.com/JoomFish/jf-future/blob/master/component/admin/controllers/translate.php#L342):
```	if ($this->task == "translate.apply")```

**Fix**
I'll create a pull request to change this to
```	if ($this->task == "apply")```
(not today; if no one beats me to it :))

**Tested**
Joomla 2.5 + JoomFish of 30 jan. 2012
Backend > Components > JoomFish > Translation > [choose language and content element] > Edit an item and click "Save" (not "Save & Close")