diff --git a/include/class/database.class.php b/include/class/database.class.php index eed0e60f5..71dce9ccc 100644 --- a/include/class/database.class.php +++ b/include/class/database.class.php @@ -222,4 +222,25 @@ class Database extends DatabaseCore echo ''; } + /** + * return the name of the database with the domain name + * @param $p_id of the folder WITHOUT the domain name + * @param $p_type dos for folder mod for template + * @return formatted name + */ + function format_name($p_id, $p_type) + { + switch ($p_type) { + case 'dos': + $sys_name = sprintf("%sdossier%d", strtolower(domaine), $p_id); + break; + case 'mod': + $sys_name = sprintf("%smod%d", strtolower(domaine), $p_id); + break; + default: + echo_error(__FILE__ . " format_name invalid type " . $p_type, __LINE__); + throw new Exception(__FILE__ . " format_name invalid type " . $p_type . __LINE__); + } + return $sys_name; + } } \ No newline at end of file diff --git a/include/lib/database_core.class.php b/include/lib/database_core.class.php index 2b3bd9e8e..aa0aa5999 100644 --- a/include/lib/database_core.class.php +++ b/include/lib/database_core.class.php @@ -57,17 +57,16 @@ class DatabaseCore if ($this->db == false) { if (DEBUG) { - echo '
';
- echo "Vos paramètres sont incorrectes :
";
+ echo _("Vos paramètres sont incorrectes").":
";
echo "
";
- echo "base de donnée : $p_dbname
";
- echo "Port $p_port
";
- echo "Utilisateur : $p_user
";
+ printf (_("base de donnée = %s"), $p_dbname)."
";
+ printf (_("Port %s"),$p_port )."
";
+ printf ( _("Utilisateur : %s"),$p_user )."
";
echo '