d7b5 language import

Hi,

If I try to import a language file, after selected it and clicked import, it show only a white screen without text or confirm that the language was correctly imported.

Bye

Quote · 2 Sep 2009

ok, found and solved!

admin/lang_file.php contain this code:


if(!file_exists($aFiles['ImportLanguage_File']['tmp_name']))
return '_adm_txt_langs_cannot_upload_file';



require_once($aFiles['ImportLanguage_File']['tmp_name']);

I think the problem are caused by the require_once with a file in temp dir...

Here is the temporary solution that I've used:


if(!file_exists($aFiles['ImportLanguage_File']['tmp_name']))
return '_adm_txt_langs_cannot_upload_file';

copy($aFiles['ImportLanguage_File']['tmp_name'],$_SERVER['DOCUMENT_ROOT'] . "/tmp/lang.php");
unlink($aFiles['ImportLanguage_File']['tmp_name']);

require_once($_SERVER['DOCUMENT_ROOT'] . "/tmp/lang.php");

Before use it create tmp folder in root of your website with write permission, after you've imported lang remove lang.php inside tmp folder.

Please open a ticket for this.

thank

Quote · 2 Sep 2009

up

Quote · 3 Sep 2009

http://www.boonex.com/trac/dolphin/ticket/1092

Rules → http://www.boonex.com/terms
Quote · 3 Sep 2009

Hello

1. tmp folder with write permissions should be there by default.

2. The following code is unnecessary, because temporarily created language file is already in the tmp folder.

copy($aFiles['ImportLanguage_File']['tmp_name'],$_SERVER['DOCUMENT_ROOT'] . "/tmp/lang.php");
unlink($aFiles['ImportLanguage_File']['tmp_name']);

P.S. Looks like for some reason tmp folder was removed from your site, therefore language file cannot be imported.

---

Best Regards

AntonL

Quote · 3 Sep 2009

http://www.boonex.com/trac/dolphin/ticket/1092

In my post I've written: Here is the temporary solution that I've used

Obviously it need some fix to be compliant with boonex classes etc...

Yeah, files are in /tmp.... but lang.php will be in site/tmp not in the server tmp directory. (for example, /tmp/asdacs76 are normally, with my fix it would be /home/aaaa/public_html/tmp/lang.php)

I can't include file that are in tmp folder of the server...I've maked tmp dir but it can be the language folder or any other folder, and after the import the file can be deleted using unlink PHP function.

Bye

Quote · 3 Sep 2009

Hello

Thanks for clarification. Necessary changes were done.

---

Best Regards

AntonLV

Quote · 4 Sep 2009

Thanks to you

Quote · 4 Sep 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.