From 2fda3b1b46af161950b5e2a5e62553fcec4e475a Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Sat, 8 May 2021 13:53:20 +0200 Subject: [PATCH 1/3] FIX ; var case On this page $datePrint is not used but $dateprint yes --- htdocs/societe/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 420282c4cef..aad5b004f9b 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -218,7 +218,7 @@ if ($type_element == 'propal') $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; $where.= " AND d.fk_propal = c.rowid"; $where.= " AND c.entity = ".$conf->entity; - $datePrint = 'c.datep'; + $dateprint = 'c.datep'; $doc_number='c.ref'; $thirdTypeSelect='customer'; } From 8fb474c6873cd23c9361febee6d1d7e56a8dce97 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Tue, 11 May 2021 11:35:54 +0200 Subject: [PATCH 2/3] Add Hook Extrafields Update - init extrafieldssdao --- htdocs/core/class/extrafields.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index d657c519650..f37d2e1932c 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -603,6 +603,8 @@ class ExtraFields */ public function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) { + global $hookmanager; + if ($elementtype == 'thirdparty') $elementtype = 'societe'; if ($elementtype == 'contact') $elementtype = 'socpeople'; @@ -643,6 +645,18 @@ class ExtraFields } $field_desc = array('type'=>$typedb, 'value'=>$lengthdb, 'null'=>($required ? 'NOT NULL' : 'NULL'), 'default'=>$default); + if (is_object($hookmanager)) + { + $hookmanager->initHooks(array('extrafieldsdao')); + $parameters = array('field_desc'=>&$field_desc, 'table'=>$table, 'attr_name'=>$attrname, 'label'=>$label, 'type'=>$type, 'length'=>$length, 'unique'=>$unique, 'required'=>$required, 'pos'=>$pos, 'param'=>$param, 'alwayseditable'=>$alwayseditable, 'perms'=>$perms, 'list'=>$list, 'help'=>$help, 'default'=>$default, 'computed'=>$computed, 'entity'=>$entity, 'langfile'=>$langfile, 'enabled'=>$enabled, 'totalizable'=>$totalizable, 'printable'=>$printable); + $reshook = $hookmanager->executeHooks('updateExtrafields', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + if ($reshook < 0) { + $this->error = $this->db->lasterror(); + return -1; + } + } + if ($type != 'separate') // No table update when separate type { $result = $this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc); From c2fa19a0b4c4ed66d671c947d02f630644ecfa63 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 May 2021 20:15:20 +0200 Subject: [PATCH 3/3] fix phpcs --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1002216b7cb..dff10e73049 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ jobs: include: - if: type = push php: '5.5' - env: DB=postgresql + env: DB=mysql - if: type = pull_request OR type = push php: '7.4' env: DB=mysql