Fix: Unused parameter
This commit is contained in:
parent
514562bd1b
commit
6d81c0172b
@ -408,7 +408,7 @@ if ($user->admin)
|
|||||||
* Overwrite configs global par configs perso
|
* Overwrite configs global par configs perso
|
||||||
* ------------------------------------------
|
* ------------------------------------------
|
||||||
*/
|
*/
|
||||||
// Set liste_limite
|
// Set liste_limit
|
||||||
if (isset($user->conf->MAIN_SIZE_LISTE_LIMIT)) // Can be 0
|
if (isset($user->conf->MAIN_SIZE_LISTE_LIMIT)) // Can be 0
|
||||||
{
|
{
|
||||||
$conf->liste_limit = $user->conf->MAIN_SIZE_LISTE_LIMIT;
|
$conf->liste_limit = $user->conf->MAIN_SIZE_LISTE_LIMIT;
|
||||||
@ -417,20 +417,22 @@ if (isset($user->conf->PRODUIT_LIMIT_SIZE)) // Can be 0
|
|||||||
{
|
{
|
||||||
$conf->produit->limit_size = $user->conf->PRODUIT_LIMIT_SIZE;
|
$conf->produit->limit_size = $user->conf->PRODUIT_LIMIT_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If user has choosed its own language
|
||||||
if (! empty($user->conf->MAIN_LANG_DEFAULT))
|
if (! empty($user->conf->MAIN_LANG_DEFAULT))
|
||||||
{
|
{
|
||||||
|
// If different than current language
|
||||||
if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT)
|
if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT)
|
||||||
{
|
{
|
||||||
// Si on a un langage perso different du langage courant global
|
|
||||||
$langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT);
|
$langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT);
|
||||||
$langs->setPhpLang($user->conf->MAIN_LANG_DEFAULT);
|
$langs->setPhpLang();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cas de forcage de la langue
|
// If language was forced on URL
|
||||||
if (! empty($_GET["lang"]))
|
if (! empty($_GET["lang"]))
|
||||||
{
|
{
|
||||||
$langs->setDefaultLang($_GET["lang"]);
|
$langs->setDefaultLang($_GET["lang"]);
|
||||||
$langs->setPhpLang($_GET["lang"]);
|
$langs->setPhpLang();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -200,12 +200,12 @@ if (! defined('NOREQUIREDB'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Chargement langage par défaut (must be after the setValues of $conf)
|
* Set default language (must be after the setValues of $conf)
|
||||||
*/
|
*/
|
||||||
if (! defined('NOREQUIRETRAN'))
|
if (! defined('NOREQUIRETRAN'))
|
||||||
{
|
{
|
||||||
$langs->setDefaultLang($conf->global->MAIN_LANG_DEFAULT);
|
$langs->setDefaultLang($conf->global->MAIN_LANG_DEFAULT);
|
||||||
$langs->setPhpLang($conf->global->MAIN_LANG_DEFAULT);
|
$langs->setPhpLang();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -95,12 +95,14 @@ class Translate {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Accesseur de this->defaultlang
|
* \brief Set accessor for this->defaultlang
|
||||||
* \param srclang Language to use
|
* \param srclang Language to use
|
||||||
*/
|
*/
|
||||||
function setDefaultLang($srclang='fr_FR')
|
function setDefaultLang($srclang='fr_FR')
|
||||||
{
|
{
|
||||||
$this->origlang=$srclang;
|
//dolibarr_syslog("Translate::setDefaultLang ".$this->defaultlang,LOG_DEBUG);
|
||||||
|
|
||||||
|
$this->origlang=$srclang;
|
||||||
|
|
||||||
if ($srclang == 'auto')
|
if ($srclang == 'auto')
|
||||||
{
|
{
|
||||||
@ -121,8 +123,8 @@ class Translate {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Accesseur de this->defaultlang
|
* \brief Get accessor for this->defaultlang
|
||||||
* \return string Langue utilis<EFBFBD>e
|
* \return string Language used
|
||||||
*/
|
*/
|
||||||
function getDefaultLang()
|
function getDefaultLang()
|
||||||
{
|
{
|
||||||
@ -132,12 +134,12 @@ class Translate {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Positionne environnement PHP en fonction du langage
|
\brief Positionne environnement PHP en fonction du langage
|
||||||
\remarks Le code langue long (fr_FR, en_US, ...) doit <EFBFBD>tre positionn<EFBFBD>
|
\remarks Le code langue long (fr_FR, en_US, ...) doit avoir etre positionne par setDefaultLang
|
||||||
\return int >0 si ok, <0 so ko
|
\return int >0 si ok, <0 so ko
|
||||||
*/
|
*/
|
||||||
function setPhpLang()
|
function setPhpLang()
|
||||||
{
|
{
|
||||||
//dolibarr_syslog("Translate::set_php_lang: ".$this->defaultlang,LOG_DEBUG);
|
//dolibarr_syslog("Translate::setPhpLang ".$this->defaultlang,LOG_DEBUG);
|
||||||
|
|
||||||
$code_lang_tiret=ereg_replace('_','-',$this->defaultlang);
|
$code_lang_tiret=ereg_replace('_','-',$this->defaultlang);
|
||||||
setlocale(LC_ALL, $this->defaultlang); // Compenser pb de locale avec windows
|
setlocale(LC_ALL, $this->defaultlang); // Compenser pb de locale avec windows
|
||||||
@ -351,11 +353,11 @@ class Translate {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne la version traduite du texte passe en parametre
|
* \brief Retourne la version traduite du texte pass<EFBFBD> en param<EFBFBD>tre
|
||||||
* Si il n'y a pas de correspondance pour ce texte, on cherche dans fichier alternatif
|
* Si il n'y a pas de correspondance pour ce texte, on cherche dans fichier alternatif
|
||||||
* et si toujours pas trouvee, il est retourne tel quel.
|
* et si toujours pas trouv<EFBFBD>, il est retourn<EFBFBD> tel quel.
|
||||||
* Les parametres de cette methode ne doivent pas contenir de balises HTML.
|
* Les param<EFBFBD>tres de cette m<EFBFBD>thode ne doivent pas contenir de balises HTML.
|
||||||
* \param key cle de chaine a traduire
|
* \param key cl<EFBFBD> de chaine a traduire
|
||||||
* \param param1 chaine de param1
|
* \param param1 chaine de param1
|
||||||
* \param param2 chaine de param1
|
* \param param2 chaine de param1
|
||||||
* \param param3 chaine de param1
|
* \param param3 chaine de param1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user