FIX to avoid error during upgrade with pgsql (#30443)
This commit is contained in:
parent
ed5dfc2a21
commit
df932f7fea
1 changed files with 24 additions and 16 deletions
|
|
@ -523,10 +523,12 @@ class modSociete extends DolibarrModules
|
|||
if (isModEnabled('socialnetworks')) {
|
||||
$sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_socialnetworks WHERE active = 1";
|
||||
$resql = $this->db->query($sql);
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_fields_array[$r][$fieldname] = $fieldlabel;
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_fields_array[$r][$fieldname] = $fieldlabel;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Add extra fields
|
||||
|
|
@ -695,10 +697,12 @@ class modSociete extends DolibarrModules
|
|||
if (isModEnabled('socialnetworks')) {
|
||||
$sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_socialnetworks WHERE active = 1";
|
||||
$resql = $this->db->query($sql);
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_updatekeys_array[$r][$fieldname] = $fieldlabel;
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_updatekeys_array[$r][$fieldname] = $fieldlabel;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Add profids as criteria to search duplicates
|
||||
|
|
@ -759,10 +763,12 @@ class modSociete extends DolibarrModules
|
|||
if (isModEnabled('socialnetworks')) {
|
||||
$sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_socialnetworks WHERE active = 1";
|
||||
$resql = $this->db->query($sql);
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_fields_array[$r][$fieldname] = $fieldlabel;
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_fields_array[$r][$fieldname] = $fieldlabel;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Add extra fields
|
||||
|
|
@ -837,10 +843,12 @@ class modSociete extends DolibarrModules
|
|||
if (isModEnabled('socialnetworks')) {
|
||||
$sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_socialnetworks WHERE active = 1";
|
||||
$resql = $this->db->query($sql);
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_updatekeys_array[$r][$fieldname] = $fieldlabel;
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$fieldname = 's.socialnetworks_'.$obj->code;
|
||||
$fieldlabel = ucfirst($obj->label);
|
||||
$this->import_updatekeys_array[$r][$fieldname] = $fieldlabel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue