diff --git a/htdocs/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php similarity index 99% rename from htdocs/admin/ftpclient.php rename to htdocs/ftp/admin/ftpclient.php index 4251f647e25..7015402230d 100644 --- a/htdocs/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -23,10 +23,11 @@ * \version $Id$ */ -require("../main.inc.php"); +require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); $langs->load("admin"); +$langs->load("@ftp"); // Security check if (!$user->admin) accessforbidden(); diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index d19cd5b48b9..a2afc2c92f8 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -31,7 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/treeview.lib.php"); // Load traductions files -$langs->load("ftp"); +$langs->load("@ftp"); $langs->load("companies"); $langs->load("other"); diff --git a/htdocs/langs/en_US/ftp.lang b/htdocs/ftp/langs/en_US/ftp.lang similarity index 98% rename from htdocs/langs/en_US/ftp.lang rename to htdocs/ftp/langs/en_US/ftp.lang index 9896abf5585..65b11a7a129 100644 --- a/htdocs/langs/en_US/ftp.lang +++ b/htdocs/ftp/langs/en_US/ftp.lang @@ -1,12 +1,12 @@ -# Dolibarr language file - en_US - ftp -CHARSET=UTF-8 -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. +# Dolibarr language file - en_US - ftp +CHARSET=UTF-8 +FTPClientSetup=FTP Client module setup +NewFTPClient=New FTP connection setup +FTPArea=FTP Area +FTPAreaDesc=This screen show you content of a FTP server view +SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete +FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions +FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) +FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password +FTPFailedToRemoveFile=Failed to remove file %s. FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). \ No newline at end of file diff --git a/htdocs/langs/fr_FR/ftp.lang b/htdocs/ftp/langs/fr_FR/ftp.lang similarity index 84% rename from htdocs/langs/fr_FR/ftp.lang rename to htdocs/ftp/langs/fr_FR/ftp.lang index b446a4bf615..0b29cf1a5fc 100644 --- a/htdocs/langs/fr_FR/ftp.lang +++ b/htdocs/ftp/langs/fr_FR/ftp.lang @@ -1,12 +1,12 @@ -# Dolibarr language file - fr_FR - ftp -CHARSET=UTF-8 -FTPClientSetup=Configuration du module FTP Client -NewFTPClient=Nouvelle connexion FTP cliente -FTPArea=Espace FTP -FTPAreaDesc=Cet écran vous présente une vue de serveur FTP -SetupOfFTPClientModuleNotComplete=La configuration du module FTP Client semble incomplète -FTPFeatureNotSupportedByYourPHP=Votre PHP ne supporte pas les fonctions FTP -FailedToConnectToFTPServer=Echec de connexion au serveur FTP (serveur: %s, port %s) -FailedToConnectToFTPServerWithCredentials=Echec de login avec le login/mot de passe FTP configuré -FTPFailedToRemoveFile=Echec suppression fichier %s. -FTPFailedToRemoveDir=Echec suppression répertoire %s (Vérifiez les permissions et que le répertoire est vide). \ No newline at end of file +# Dolibarr language file - fr_FR - ftp +CHARSET=UTF-8 +FTPClientSetup=Configuration du module FTP Client +NewFTPClient=Nouvelle configuration de connexion FTP +FTPArea=Espace FTP +FTPAreaDesc=Cet écran vous présente une vue de serveur FTP +SetupOfFTPClientModuleNotComplete=La configuration du module FTP Client semble incomplète +FTPFeatureNotSupportedByYourPHP=Votre PHP ne supporte pas les fonctions FTP +FailedToConnectToFTPServer=Echec de connexion au serveur FTP (serveur: %s, port %s) +FailedToConnectToFTPServerWithCredentials=Echec de login avec le login/mot de passe FTP configuré +FTPFailedToRemoveFile=Echec suppression fichier %s. +FTPFailedToRemoveDir=Echec suppression répertoire %s (Vérifiez les permissions et que le répertoire soit vide). \ No newline at end of file diff --git a/htdocs/ftp/pre.inc.php b/htdocs/ftp/pre.inc.php index 3a4307d92d9..c296a9bea5a 100644 --- a/htdocs/ftp/pre.inc.php +++ b/htdocs/ftp/pre.inc.php @@ -30,7 +30,7 @@ $user->getrights('ecm'); function llxHeader($head = '', $title='', $help_url='', $morehtml='') { global $conf,$langs,$user; - $langs->load("ftp"); + $langs->load("@ftp"); top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers diff --git a/htdocs/includes/modules/modFTP.class.php b/htdocs/includes/modules/modFTP.class.php index d7ee83db0e6..02651aa0455 100644 --- a/htdocs/includes/modules/modFTP.class.php +++ b/htdocs/includes/modules/modFTP.class.php @@ -67,9 +67,12 @@ class modFTP extends DolibarrModules // Data directories to create when module is enabled $this->dirs = array("/ftp/temp"); + + // Langs file within the module + $this->langfiles = array("@ftp"); // Config pages. Put here list of php page names stored in admmin directory used to setup module - $this->config_page_url = array('ftpclient.php'); + $this->config_page_url = array('ftpclient.php@ftp'); // Dependencies $this->depends = array(); // List of modules id that must be enabled if this module is enabled