Merge branch '3.8' of https://github.com/Dolibarr/dolibarr.git into 3.8
This commit is contained in:
commit
d19a9f66b3
@ -39,6 +39,8 @@ $showpass=GETPOST('showpass');
|
||||
*/
|
||||
|
||||
$label=$db::LABEL;
|
||||
$type=$db->type;
|
||||
|
||||
|
||||
$help_url='EN:Restores|FR:Restaurations|ES:Restauraciones';
|
||||
llxHeader('','',$help_url);
|
||||
@ -91,7 +93,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
|
||||
<fieldset id="exportoptions">
|
||||
<legend><?php echo $langs->trans("ImportMethod"); ?></legend>
|
||||
<?php
|
||||
if ($label == 'MySQL')
|
||||
if (in_array($type, array('mysql', 'mysqli')))
|
||||
{
|
||||
?>
|
||||
<div class="formelementrow">
|
||||
@ -100,7 +102,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else if ($label == 'PostgreSQL')
|
||||
else if (in_array($type, array('pgsql')))
|
||||
{
|
||||
?>
|
||||
<div class="formelementrow">
|
||||
@ -123,7 +125,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
|
||||
|
||||
<div id="div_container_sub_exportoptions">
|
||||
<?php
|
||||
if ($label == 'MySQL')
|
||||
if (in_array($type, array('mysql', 'mysqli')))
|
||||
{
|
||||
?>
|
||||
<fieldset id="mysql_options">
|
||||
@ -157,7 +159,7 @@ if ($label == 'MySQL')
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
else if ($label == 'PostgreSQL')
|
||||
else if (in_array($type, array('pgsql')))
|
||||
{
|
||||
?>
|
||||
<fieldset id="postgresql_options">
|
||||
|
||||
@ -298,6 +298,7 @@ if (empty($reshook))
|
||||
$object->zip = GETPOST("zipcode");
|
||||
$object->town = GETPOST("town");
|
||||
$object->state_id = GETPOST("state_id",'int');
|
||||
$object->fk_departement = GETPOST("state_id",'int'); // For backward compatibility
|
||||
$object->country_id = GETPOST("country_id",'int');
|
||||
|
||||
$object->email = GETPOST("email",'alpha');
|
||||
|
||||
@ -537,7 +537,7 @@ function show_projects($conf,$langs,$db,$object,$backtopage='')
|
||||
else
|
||||
{
|
||||
$var = false;
|
||||
print '<tr '.$bc[$var].'><td colspan="4">'.$langs->trans("None").'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td colspan="5">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
$db->free($result);
|
||||
}
|
||||
|
||||
@ -1375,7 +1375,6 @@ class Societe extends CommonObject
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople";
|
||||
$sql.= " WHERE fk_soc = " . $id;
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$error++;
|
||||
@ -1388,7 +1387,6 @@ class Societe extends CommonObject
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
|
||||
$sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id;
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$error++;
|
||||
@ -1402,7 +1400,18 @@ class Societe extends CommonObject
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib";
|
||||
$sql.= " WHERE fk_soc = " . $id;
|
||||
dol_syslog(get_class($this)."::Delete", LOG_DEBUG);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$error++;
|
||||
$this->error = $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
// Remove societe_remise_except
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except";
|
||||
$sql.= " WHERE fk_soc = " . $id;
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$error++;
|
||||
@ -1415,7 +1424,6 @@ class Societe extends CommonObject
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_commerciaux";
|
||||
$sql.= " WHERE fk_soc = " . $id;
|
||||
dol_syslog(get_class($this)."::Delete", LOG_DEBUG);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
$error++;
|
||||
|
||||
@ -49,7 +49,7 @@ $langs->load("commercial");
|
||||
$langs->load("bills");
|
||||
$langs->load("banks");
|
||||
$langs->load("users");
|
||||
if (! empty($conf->categories->enabled)) $langs->load("categories");
|
||||
if (! empty($conf->categorie->enabled)) $langs->load("categories");
|
||||
if (! empty($conf->incoterm->enabled)) $langs->load("incoterm");
|
||||
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user