fixed creating of new translations / give [Write] button file not yet existing (permissions given)

This commit is contained in:
Ralf Becker 2011-08-04 07:27:23 +00:00
parent fc5f651412
commit 31c9e8965b
2 changed files with 11 additions and 14 deletions

View File

@ -339,10 +339,6 @@ class solangfile
fclose($fp);
}
}
else
{
$fn = lang('no file');
}
if ($target)
{
$this->tgt_file = $fn;

View File

@ -447,15 +447,16 @@ class translation
$cur_appfile = $langprefix . $app . SEP . 'setup' . SEP . self::LANGFILE_PREFIX . $langsuffix;
$old_appfile = $langprefix . $app . SEP . 'setup' . SEP . self::OLD_LANGFILE_PREFIX . $langsuffix;
// Note there's no chance for 'lang/phpgw_' files
$appfile = $new_appfile; // set as default
if (file_exists($new_appfile))
{
$appfile=$new_appfile;
// nothing to do, already default
}
elseif (file_exists($cur_appfile))
{
$appfile=$cur_appfile;
}
else
elseif (file_exists($old_appfile))
{
$appfile=$old_appfile;
}