From d7673084cffc3c5fdb5f4870a33948f6272996f0 Mon Sep 17 00:00:00 2001 From: Jyhere Date: Thu, 25 May 2023 16:53:26 +0200 Subject: [PATCH 01/69] ADD: custom compute for exports --- htdocs/exports/class/export.class.php | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 6563e9d6338..b257269a616 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -706,6 +706,44 @@ class Export $remaintopay = $tmpobjforcomputecall->getRemainToPay(); } $obj->$alias = $remaintopay; + } elseif (is_array($this->array_export_special[$indice][$key]) && + !empty($this->array_export_special[$indice][$key]['rule']) && + $this->array_export_special[$indice][$key]['rule'] == 'compute' + ) { + // Custom compute + $alias = str_replace(array('.', '-', '(', ')'), '_', $key); + $value = ''; + if (!empty($this->array_export_special[$indice][$key]['class']) && + !empty($this->array_export_special[$indice][$key]['classfile']) && + !empty($this->array_export_special[$indice][$key]['method']) + ) { + if (!dol_include_once($this->array_export_special[$indice][$key]['classfile'])) { + $this->error = "Computed field bad configuration: {$this->array_export_special[$indice][$key]['classfile']} not found"; + return -1; + } + + if (!class_exists($this->array_export_special[$indice][$key]['class'])) { + $this->error = "Computed field bad configuration: {$this->array_export_special[$indice][$key]['class']} class doesn't exist"; + return -1; + } + + $className = $this->array_export_special[$indice][$key]['class']; + $tmpObject = new $className($this->db); + if (!method_exists($tmpObject, $this->array_export_special[$indice][$key]['method'])) { + $this->error = "Computed field bad configuration: {$this->array_export_special[$indice][$key]['method']} method doesn't exist"; + return -1; + } + + $methodName = $this->array_export_special[$indice][$key]['method']; + $params = []; + if (!empty($this->array_export_special[$indice][$key]['method_params'])) { + foreach ($this->array_export_special[$indice][$key]['method_params'] as $paramName) { + $params[] = $obj->$paramName ?? null; + } + } + $value = $tmpObject->$methodName(...$params); + } + $obj->$alias = $value; } else { // TODO FIXME // Export of compute field does not work. $obj contains $obj->alias_field and formula may contains $obj->field From 6e0824bf553071bb08e920b81a9bf05e2361404b Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 5 Sep 2023 12:26:19 +0200 Subject: [PATCH 02/69] fix: a comment in SQL in -- and space not --comment in one word --- htdocs/install/mysql/tables/llx_adherent.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 01a87167411..f7bdabd3f7e 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -53,15 +53,15 @@ create table llx_adherent url varchar(255) NULL, socialnetworks text DEFAULT NULL, -- json with socialnetworks - --skype varchar(255), -- deprecated - --twitter varchar(255), -- deprecated - --facebook varchar(255), -- deprecated - --linkedin varchar(255), -- deprecated - --instagram varchar(255), -- deprecated - --snapchat varchar(255), -- deprecated - --googleplus varchar(255), -- deprecated - --youtube varchar(255), -- deprecated - --whatsapp varchar(255), -- deprecated + -- skype varchar(255), -- deprecated + -- twitter varchar(255), -- deprecated + -- facebook varchar(255), -- deprecated + -- linkedin varchar(255), -- deprecated + -- instagram varchar(255), -- deprecated + -- snapchat varchar(255), -- deprecated + -- googleplus varchar(255), -- deprecated + -- youtube varchar(255), -- deprecated + -- whatsapp varchar(255), -- deprecated phone varchar(30), phone_perso varchar(30), From ab7ab5c81790c9760278d77ac0f357d7d8c6ccd3 Mon Sep 17 00:00:00 2001 From: tnegre Date: Tue, 5 Sep 2023 16:19:20 +0200 Subject: [PATCH 03/69] FIX : message order in ticket public view is not coherent with tickets events tab --- htdocs/ticket/class/actions_ticket.class.php | 2 +- htdocs/ticket/class/ticket.class.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index d7d971b4edc..7dd41668c69 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -293,7 +293,7 @@ class ActionsTicket //print ''; print ''; print ''; - print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datec'], 'dayhour'); + print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datep'], 'dayhour'); print ''; if ($show_user) { print ''; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index e7392c33f1d..c9e678a1d51 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1729,11 +1729,11 @@ class Ticket extends CommonObject // Cache already loaded - $sql = "SELECT id as rowid, fk_user_author, datec, label, note as message, code"; + $sql = "SELECT id as rowid, fk_user_author, datec, datep, label, note as message, code"; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm"; $sql .= " WHERE fk_element = ".(int) $this->id; $sql .= " AND elementtype = 'ticket'"; - $sql .= " ORDER BY datec DESC"; + $sql .= " ORDER BY datep DESC"; dol_syslog(get_class($this)."::load_cache_actions_ticket sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); @@ -1745,6 +1745,7 @@ class Ticket extends CommonObject $this->cache_msgs_ticket[$i]['id'] = $obj->rowid; $this->cache_msgs_ticket[$i]['fk_user_author'] = $obj->fk_user_author; $this->cache_msgs_ticket[$i]['datec'] = $this->db->jdate($obj->datec); + $this->cache_msgs_ticket[$i]['datep'] = $this->db->jdate($obj->datep); $this->cache_msgs_ticket[$i]['subject'] = $obj->label; $this->cache_msgs_ticket[$i]['message'] = $obj->message; $this->cache_msgs_ticket[$i]['private'] = ($obj->code == 'TICKET_MSG_PRIVATE' ? 1 : 0); From 84d12cf591fe6bde9e2af47146c1b8b14e95b656 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 02:38:08 +0200 Subject: [PATCH 04/69] NEW Add option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS --- htdocs/takepos/index.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 32d7301b6fe..3be9730e9cd 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1455,10 +1455,12 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) { //echo ''; print ''; } else { - if (getDolGlobalString('TAKEPOS_HIDE_PRODUCT_IMAGES')) { - echo ''; - } else { + if (!getDolGlobalString('TAKEPOS_HIDE_PRODUCT_PRICES')) { print '
'; + } + if (getDolGlobalString('TAKEPOS_HIDE_PRODUCT_IMAGES')) { + print ''; + } else { print ''; } } From 0d76c492446f9b96827fb54dda7b0f18a0193ee4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 03:19:38 +0200 Subject: [PATCH 05/69] Trans --- htdocs/langs/en_US/ecm.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index c10f3a088b7..941977b3e40 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -45,7 +45,7 @@ ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup GenerateImgWebp=Duplicate all images with another version with .webp format -ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder (subfolders are not included)... +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder (subfolders are not included, webp images will not be generated if size is greater than original)... ConfirmImgWebpCreation=Confirm all images duplication GenerateChosenImgWebp=Duplicate chosen image with another version with .webp format ConfirmGenerateChosenImgWebp=If you confirm, you will generate an image in .webp format for the image %s From 9b4f2f920aed9fe8e7aa6df3f9fbbd4f4a2ef8c9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 6 Sep 2023 06:27:12 +0200 Subject: [PATCH 06/69] FIX avoid php8 warning --- htdocs/compta/facture/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2800fa7388d..762a0e11528 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2029,6 +2029,8 @@ if (empty($reshook)) { $price_ht_devise = ''; $price_ttc = ''; $price_ttc_devise = ''; + $price_min = ''; + $price_min_ttc = ''; if (GETPOST('price_ht') !== '') { $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); From 927cc91da47e0e06076046613513b465c5e1ccdd Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 6 Sep 2023 06:44:10 +0200 Subject: [PATCH 07/69] FIX avoid wrong backtopage url --- htdocs/comm/propal/card.php | 4 ++-- htdocs/commande/card.php | 4 ++-- htdocs/compta/facture/card.php | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 973cfbee9e3..2ea554473e5 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1889,7 +1889,7 @@ if ($action == 'create') { $thirdparty = $soc; $discount_type = 0; - $backtopage = urlencode($_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid')); + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid'); include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; } @@ -2473,7 +2473,7 @@ if ($action == 'create') { $thirdparty = $soc; $discount_type = 0; - $backtopage = urlencode($_SERVER["PHP_SELF"].'?id='.$object->id); + $backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4c40f086d3e..f6f549a84ef 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1852,7 +1852,7 @@ if ($action == 'create' && $usercancreate) { $thirdparty = $soc; $discount_type = 0; - $backtopage = urlencode($_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid')); + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid'); include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; @@ -2470,7 +2470,7 @@ if ($action == 'create' && $usercancreate) { $thirdparty = $soc; $discount_type = 0; - $backtopage = urlencode($_SERVER["PHP_SELF"].'?id='.$object->id); + $backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 762a0e11528..8bd7b4cbb88 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3169,7 +3169,6 @@ if ($action == 'create') { print ''."\n"; } print ''; - print ''; print ''; print ''; print ''; @@ -4498,7 +4497,7 @@ if ($action == 'create') { print ''; $thirdparty = $soc; $discount_type = 0; - $backtopage = urlencode($_SERVER["PHP_SELF"].'?facid='.$object->id); + $backtopage = $_SERVER["PHP_SELF"].'?facid='.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; From 7a51977cbd541670f4c7f9bd46ba41325f5624a6 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 6 Sep 2023 08:47:31 +0200 Subject: [PATCH 08/69] Fix missing --- htdocs/societe/class/societe.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 86edd8f013f..6273085d601 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2132,6 +2132,7 @@ class Societe extends CommonObject */ public function set_as_client() { + global $conf; // phpcs:enable if ($this->id) { $newclient = 1; From 68ba7d230002ba622ae2b59499b28918e794b897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 6 Sep 2023 08:52:01 +0200 Subject: [PATCH 09/69] phpstan --- htdocs/comm/propal/class/propal.class.php | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index b76ba76fb8d..c1bf1c04782 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -116,9 +116,22 @@ class Propal extends CommonObject /** * Ref from thirdparty * @var string + * @deprecated + * @see $ref_customer */ public $ref_client; + /** + * Ref from thirdparty + * @var string + */ + public $ref_customer; + + /** + * @var Propal oldcopy with propal properties + */ + public $oldcopy; + /** * Status of the quote * @var int @@ -240,7 +253,21 @@ class Propal extends CommonObject public $address_type; public $address; + /** + * @var int availabilty ID + */ public $availability_id; + + /** + * @var int availabilty ID + * @deprecated + * @see $availability_id + */ + public $fk_availability; + + /** + * @var string availabilty code + */ public $availability_code; public $duree_validite; @@ -256,6 +283,10 @@ class Propal extends CommonObject * @var PropaleLigne[] */ public $lines = array(); + + /** + * @var PropaleLigne + */ public $line; public $labelStatus = array(); From 9715d5fbc7110dcd6c5f694ffc9100c1573f23ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 6 Sep 2023 08:57:00 +0200 Subject: [PATCH 10/69] phpstan --- htdocs/comm/propal/class/propal.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index b76ba76fb8d..5e1989dd934 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -970,8 +970,9 @@ class Propal extends CommonObject $this->update_price(1, 'auto'); - $this->fk_propal = $this->id; - $this->rowid = $rowid; + // $this is Propal + // $this->fk_propal = $this->id; + // $this->rowid = $rowid; $this->db->commit(); return $result; From b6e84b1c74526d10924f43895c2b1bb360e4e916 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 6 Sep 2023 10:02:12 +0200 Subject: [PATCH 11/69] FIX use urlencode for origin and originid --- htdocs/comm/propal/card.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/compta/facture/card.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 2ea554473e5..c1586576657 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1889,7 +1889,7 @@ if ($action == 'create') { $thirdparty = $soc; $discount_type = 0; - $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid'); + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode(GETPOST('origin')).'&originid='.urlencode(GETPOSTINT('originid')); include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index f6f549a84ef..34561b6ae9c 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1852,7 +1852,7 @@ if ($action == 'create' && $usercancreate) { $thirdparty = $soc; $discount_type = 0; - $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid'); + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode(GETPOST('origin')).'&originid='.urlencode(GETPOSTINT('originid')); include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 8bd7b4cbb88..e348c1136e3 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3663,7 +3663,7 @@ if ($action == 'create') { $thirdparty = $soc; $discount_type = 0; - $backtopage = urlencode($_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.GETPOST('origin', 'alpha').'&originid='.GETPOST('originid', 'int')); + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode(GETPOST('origin')).'&originid='.urlencode(GETPOSTINT('originid')); include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; print ''; From cac1d7f617ef2eda48f5920b2459612f176484ee Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 6 Sep 2023 11:09:46 +0200 Subject: [PATCH 12/69] new: all in repair.php force_collation_from_conf_on_tables --- htdocs/install/repair.php | 59 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 8e0d3218df7..095feb995a8 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -97,6 +97,7 @@ print 'Option set_empty_time_spent_amount (\'test\' or \'confirmed\') is '.(GETP // Structure print 'Option force_utf8_on_tables (force utf8 + row=dynamic), for mysql/mariadb only (\'test\' or \'confirmed\') is '.(GETPOST('force_utf8_on_tables', 'alpha') ?GETPOST('force_utf8_on_tables', 'alpha') : 'undefined').'
'."\n"; print "Option force_utf8mb4_on_tables (force utf8mb4 + row=dynamic, EXPERIMENTAL!), for mysql/mariadb only ('test' or 'confirmed') is ".(GETPOST('force_utf8mb4_on_tables', 'alpha') ? GETPOST('force_utf8mb4_on_tables', 'alpha') : 'undefined')."
\n"; +print "Option force_collation_from_conf_on_tables (force ".$conf->db->character_set."/".$conf->db->dolibarr_main_db_collation." + row=dynamic), for mysql/mariadb only ('test' or 'confirmed') is ".(GETPOST('force_collation_from_conf_on_tables', 'alpha') ? GETPOST('force_collation_from_conf_on_tables', 'alpha') : 'undefined')."
\n"; // Rebuild sequence print 'Option rebuild_sequences, for postgresql only (\'test\' or \'confirmed\') is '.(GETPOST('rebuild_sequences', 'alpha') ?GETPOST('rebuild_sequences', 'alpha') : 'undefined').'
'."\n"; print '
'; @@ -178,7 +179,7 @@ $oneoptionset = (GETPOST('standard', 'alpha') || GETPOST('restore_thirdparties_l || GETPOST('clean_orphelin_dir', 'alpha') || GETPOST('clean_product_stock_batch', 'alpha') || GETPOST('set_empty_time_spent_amount', 'alpha') || GETPOST('rebuild_product_thumbs', 'alpha') || GETPOST('clean_perm_table', 'alpha') || GETPOST('force_disable_of_modules_not_found', 'alpha') - || GETPOST('force_utf8_on_tables', 'alpha') || GETPOST('force_utf8mb4_on_tables', 'alpha') + || GETPOST('force_utf8_on_tables', 'alpha') || GETPOST('force_utf8mb4_on_tables', 'alpha') || GETPOST('force_collation_from_conf_on_tables', 'alpha') || GETPOST('rebuild_sequences', 'alpha')); if ($ok && $oneoptionset) { @@ -1366,6 +1367,62 @@ if ($ok && GETPOST('force_utf8mb4_on_tables', 'alpha')) { } } +if ($ok && GETPOST('force_collation_from_conf_on_tables', 'alpha')) { + print '
*** Force page code and collation of tables into '.$conf->db->character_set.'/'.$conf->db->dolibarr_main_db_collation.' and row_format=dynamic (for mysql/mariadb only)'; + + if ($db->type == "mysql" || $db->type == "mysqli") { + $force_collation_from_conf_on_tables = GETPOST('force_collation_from_conf_on_tables', 'alpha'); + + $listoftables = $db->DDLListTablesFull($db->database_name); + + // Disable foreign key checking for avoid errors + if ($force_collation_from_conf_on_tables == 'confirmed') { + $sql = 'SET FOREIGN_KEY_CHECKS=0'; + print ''; + $resql = $db->query($sql); + } + + foreach ($listoftables as $table) { + // do not convert llx_const if mysql encrypt/decrypt is used + if ($conf->db->dolibarr_main_db_encryption != 0 && preg_match('/\_const$/', $table[0])) { + continue; + } + if ($table[1] == 'VIEW') { + print ''.$table[0].' is a '.$table[1].' (Skipped)'; + continue; + } + + print ''; + print $table[0]; + $sql1 = "ALTER TABLE ".$table[0]." ROW_FORMAT=dynamic"; + $sql2 = "ALTER TABLE ".$table[0]." CONVERT TO CHARACTER SET ".$conf->db->character_set." COLLATE ".$conf->db->dolibarr_main_db_collation; + print ''; + print ''; + if ($force_collation_from_conf_on_tables == 'confirmed') { + $resql1 = $db->query($sql1); + if ($resql1) { + $resql2 = $db->query($sql2); + } else { + $resql2 = false; + } + print ' - Done ('.(($resql1 && $resql2) ? 'OK' : 'KO').')'; + } else { + print ' - Disabled'; + } + print ''; + } + + // Enable foreign key checking + if ($force_collation_from_conf_on_tables == 'confirmed') { + $sql = 'SET FOREIGN_KEY_CHECKS=1'; + print ''; + $resql = $db->query($sql); + } + } else { + print 'Not available with database type '.$db->type.''; + } +} + // rebuild sequences for pgsql if ($ok && GETPOST('rebuild_sequences', 'alpha')) { print '
*** Force to rebuild sequences (for postgresql only)'; From 26dff90658131ec074e18022e949162a49423dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 6 Sep 2023 13:58:08 +0200 Subject: [PATCH 13/69] deprecate set_as_client --- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/contrat/class/contrat.class.php | 2 +- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/societe/class/societe.class.php | 18 ++++++++++++++++-- test/phpunit/SocieteTest.php | 2 +- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index b76ba76fb8d..be4cff37295 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2702,7 +2702,7 @@ class Propal extends CommonObject // The connected company is classified as a client $soc=new Societe($this->db); $soc->id = $this->socid; - $result = $soc->set_as_client(); + $result = $soc->setAsCustomer(); if ($result < 0) { $this->error=$this->db->lasterror(); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 250d6c49aa0..6dedde25fc0 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -505,7 +505,7 @@ class Commande extends CommonOrder $soc->fetch($this->socid); // Class of company linked to order - $result = $soc->set_as_client(); + $result = $soc->setAsCustomer(); // Define new ref if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) { // empty should not happened, but when it occurs, the test save life diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 0b20b4ddae8..b87ccdfe286 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3372,7 +3372,7 @@ class Facture extends CommonInvoice if (!$error) { // Define third party as a customer - $result = $this->thirdparty->set_as_client(); + $result = $this->thirdparty->setAsCustomer(); // If active we decrement the main product and its components at invoice validation if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && isModEnabled('stock') && !empty($conf->global->STOCK_CALCULATE_ON_BILL) && $idwarehouse > 0) { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index bf63fbf261d..1b3e60939e0 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -499,7 +499,7 @@ class Contrat extends CommonObject // A contract is validated so we can move thirdparty to status customer if (empty($conf->global->CONTRACT_DISABLE_AUTOSET_AS_CLIENT_ON_CONTRACT_VALIDATION)) { - $result = $this->thirdparty->set_as_client(); + $result = $this->thirdparty->setAsCustomer(); } // Define new ref diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 967b4e9a4fb..1171e0367b9 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -725,7 +725,7 @@ class Expedition extends CommonObject $soc->fetch($this->socid); // Class of company linked to order - $result = $soc->set_as_client(); + $result = $soc->setAsCustomer(); // Define new ref if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) { // empty should not happened, but when it occurs, the test save life diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 8f67f7567d1..19c6349e296 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2171,16 +2171,30 @@ class Societe extends CommonObject * Define third party as a customer * * @return int <0 if KO, >0 if OK + * @deprecated + * @see setAsCustomer() */ public function set_as_client() { // phpcs:enable + dol_syslog(get_class($this)."::set_as_client is deprecated use setAsCustomer instead", LOG_NOTICE); + return $this->setAsCustomer(); + } + + /** + * Define third party as a customer + * + * @return int <0 if KO, >0 if OK + * @since dolibarr v19 + */ + public function setAsCustomer() + { if ($this->id) { $newclient = 1; - if (($this->client == 2 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) { + if (($this->client == 2 || $this->client == 3) && !getDolGlobalInt('SOCIETE_DISABLE_PROSPECTSCUSTOMERS')) { $newclient = 3; //If prospect, we keep prospect tag } - $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; $sql .= " SET client = ".((int) $newclient); $sql .= " WHERE rowid = ".((int) $this->id); diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 9191a7e1d5c..96d2071ce7d 100644 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -337,7 +337,7 @@ class SocieteTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; - $result=$localobject->set_as_client(); + $result=$localobject->setAsCustomer(); print __METHOD__." id=".$localobject->id." result=".$result."\n"; $this->assertLessThan($result, 0); From d32f76b394e3cddb913756138929b39ba2f9f496 Mon Sep 17 00:00:00 2001 From: vmaury Date: Wed, 6 Sep 2023 14:54:40 +0200 Subject: [PATCH 14/69] Order by salary lastname in hollidays month report (instead of fk_user) --- htdocs/holiday/month_report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index e73e83861c8..962ebc48a19 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -317,7 +317,7 @@ if (!empty($arrayfields['cp.fk_type']['checked'])) { print_liste_field_titre($arrayfields['cp.fk_type']['label'], $_SERVER["PHP_SELF"], 'cp.fk_type', '', '', '', $sortfield, $sortorder); } if (!empty($arrayfields['cp.fk_user']['checked'])) { - print_liste_field_titre($arrayfields['cp.fk_user']['label'], $_SERVER["PHP_SELF"], 'cp.fk_user', '', '', '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['cp.fk_user']['label'], $_SERVER["PHP_SELF"], 'u.lastname', '', '', '', $sortfield, $sortorder); } if (!empty($arrayfields['ct.label']['checked'])) { print_liste_field_titre($arrayfields['ct.label']['label'], $_SERVER["PHP_SELF"], 'ct.label', '', '', '', $sortfield, $sortorder); From b65b8d7bcbe75235a0981bc964991c26eb0d5f83 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 14:56:51 +0200 Subject: [PATCH 15/69] FIX Navigation to/from a project from page of projects of a thirdparty --- htdocs/core/lib/company.lib.php | 2 +- htdocs/main.inc.php | 12 ++++++++++++ htdocs/projet/agenda.php | 8 +++++++- htdocs/projet/card.php | 19 +++++++++++++++++-- htdocs/projet/class/project.class.php | 7 ++++++- htdocs/projet/comment.php | 8 +++++++- htdocs/projet/contact.php | 8 +++++++- htdocs/projet/document.php | 8 +++++++- htdocs/projet/element.php | 8 +++++++- htdocs/projet/ganttview.php | 8 +++++++- htdocs/projet/list.php | 2 ++ htdocs/projet/messaging.php | 8 +++++++- htdocs/projet/note.php | 8 +++++++- htdocs/projet/tasks.php | 8 +++++++- htdocs/projet/tasks/time.php | 8 +++++++- htdocs/societe/project.php | 10 +++++----- 16 files changed, 113 insertions(+), 19 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index e1344e8f94f..a2ae0e8f7a2 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -869,7 +869,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel // Ref print ''; - print $projecttmp->getNomUrl(1); + print $projecttmp->getNomUrl(1, '', 0, '', '-', 0, 1, '', 'project:'.$_SERVER["PHP_SELF"].'?socid=__SOCID__'); print ''; // Label diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a91dc43adbd..3236c637828 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1082,6 +1082,18 @@ if (!defined('NOLOGIN')) { unset($_SESSION['lastsearch_mode_tmp_'.$relativepathstring]); } } + if (!empty($_GET['save_pageforbacktolist']) && !empty($_SERVER["HTTP_REFERER"])) { // We must use $_GET here + if (empty($_SESSION['pageforbacktolist'])) { + $pageforbacktolistarray = array(); + } else { + $pageforbacktolistarray = $_SESSION['pageforbacktolist']; + } + $tmparray = explode(':', $_GET['save_pageforbacktolist'], 2); + if (!empty($tmparray[0]) && !empty($tmparray[1])) { + $pageforbacktolistarray[$tmparray[0]] = $tmparray[1]; + $_SESSION['pageforbacktolist'] = $pageforbacktolistarray; + } + } $action = ''; $parameters = array(); diff --git a/htdocs/projet/agenda.php b/htdocs/projet/agenda.php index 5e8f0dfafbf..84a204a2e6a 100644 --- a/htdocs/projet/agenda.php +++ b/htdocs/projet/agenda.php @@ -127,7 +127,13 @@ print dol_get_fiche_head($head, 'agenda', $langs->trans("Project"), -1, ($object // Project card -$linkback = ''.$langs->trans("BackToList").''; +if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; +} else { + $linkback = ''.$langs->trans("BackToList").''; +} $morehtmlref = '
'; // Title diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 806d73f225e..dc7eaa538f3 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -463,7 +463,16 @@ if (empty($reshook)) { $result = $object->delete($user); if ($result > 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - header("Location: list.php?restore_lastsearch_values=1"); + + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $urlback = $tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1'; + } else { + $urlback = DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1'; + } + + header("Location: ".$urlback); exit; } else { dol_syslog($object->error, LOG_DEBUG); @@ -1221,7 +1230,13 @@ if ($action == 'create' && $user->rights->projet->creer) { // Project card - $linkback = ''.$langs->trans("BackToList").''; + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Title diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6267c370eb3..94b213cf17d 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1313,9 +1313,10 @@ class Project extends CommonObject * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param string $morecss More css on a link + * @param string $save_pageforbacktolist Back to this page 'context:url' * @return string String with URL */ - public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1, $morecss = '') + public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1, $morecss = '', $save_pageforbacktolist = '') { global $conf, $langs, $user, $hookmanager; @@ -1364,6 +1365,10 @@ class Project extends CommonObject if ($add_save_lastsearch_values) { $url .= '&save_lastsearch_values=1'; } + $add_save_backpagefor = ($save_pageforbacktolist ? 1 : 0); + if ($add_save_backpagefor) { + $url .= "&save_pageforbacktolist=".urlencode($save_pageforbacktolist); + } } $linkclose = ''; diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index 7103916cdb4..0b2cc2681f1 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -98,7 +98,13 @@ $param = ($mode == 'mine' ? '&mode=mine' : ''); // Project card -$linkback = ''.$langs->trans("BackToList").''; +if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; +} else { + $linkback = ''.$langs->trans("BackToList").''; +} $morehtmlref = '
'; // Title diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index b0fece54827..17fb0cd10ef 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -294,7 +294,13 @@ if ($id > 0 || !empty($ref)) { // Project card - $linkback = ''.$langs->trans("BackToList").''; + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Title diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 19ecebb2214..0f2733daec9 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -131,7 +131,13 @@ if ($object->id > 0) { // Project card - $linkback = ''.$langs->trans("BackToList").''; + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Title diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 3b8393c402d..aa8c0182c58 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -211,7 +211,13 @@ print dol_get_fiche_head($head, 'element', $langs->trans("Project"), -1, ($objec // Project card -$linkback = ''.$langs->trans("BackToList").''; +if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; +} else { + $linkback = ''.$langs->trans("BackToList").''; +} $morehtmlref = '
'; // Title diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 47f7cb0a9ef..6e284b5dd0e 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -110,7 +110,13 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) { // Project card - $linkback = ''.$langs->trans("BackToList").''; + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Title diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 985be60b138..d75602e76b5 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -375,6 +375,8 @@ if (empty($reshook)) { * View */ +unset($_SESSION['pageforbacktolist']['project']); + $form = new Form($db); $formcompany = new FormCompany($db); diff --git a/htdocs/projet/messaging.php b/htdocs/projet/messaging.php index e0290d984a4..2b50f32f3d4 100644 --- a/htdocs/projet/messaging.php +++ b/htdocs/projet/messaging.php @@ -126,7 +126,13 @@ print dol_get_fiche_head($head, 'agenda', $langs->trans("Project"), -1, ($object // Project card -$linkback = ''.$langs->trans("BackToList").''; +if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; +} else { + $linkback = ''.$langs->trans("BackToList").''; +} $morehtmlref = '
'; // Title diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 20392059916..5f11bf20282 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -96,7 +96,13 @@ if ($id > 0 || !empty($ref)) { // Project card - $linkback = ''.$langs->trans("BackToList").''; + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Title diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 196bc2d4582..b044b2a2a48 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -566,7 +566,13 @@ if ($id > 0 || !empty($ref)) { // Project card - $linkback = ''.$langs->trans("BackToList").''; + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Title diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 52f68b11b08..ffc67f6e2cb 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -943,7 +943,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser // Project card - $linkback = ''.$langs->trans("BackToList").''; + if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { + $tmpurl = $_SESSION['pageforbacktolist']['project']; + $tmpurl = preg_replace('/__SOCID__/', $projectstatic->socid, $tmpurl); + $linkback = ''.$langs->trans("BackToList").''; + } else { + $linkback = ''.$langs->trans("BackToList").''; + } $morehtmlref = '
'; // Title diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index 5a8ba6a46b2..4bb657bee2b 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -37,6 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'projects')); +$action = GETPOST('action', 'aZ09'); + // Security check $socid = GETPOST('socid', 'int'); if ($user->socid) { @@ -47,6 +49,8 @@ $result = restrictedArea($user, 'societe', $socid, '&societe'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('projectthirdparty')); +$object = new Societe($db); + /* * Actions @@ -64,9 +68,7 @@ if ($reshook < 0) { * View */ -$contactstatic = new Contact($db); - -$form = new Form($db); +unset($_SESSION['pageforbacktolist']['project']); if ($socid) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -74,8 +76,6 @@ if ($socid) { $langs->load("companies"); - - $object = new Societe($db); $result = $object->fetch($socid); $title = $langs->trans("Projects"); From fccd05a633a82f6bb888b6546944b9227884e503 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 15:20:24 +0200 Subject: [PATCH 16/69] css --- htdocs/user/group/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index f14eace736a..76f3f73f573 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -440,7 +440,7 @@ while ($i < $imaxinloop) { } } - print ''; + print ''; print $object->getNomUrl(1); if (isModEnabled('multicompany') && !$obj->entity) { print img_picto($langs->trans("GlobalGroup"), 'redstar'); @@ -457,12 +457,12 @@ while ($i < $imaxinloop) { $totalarray['nbfield']++; } } - print ''.$obj->nb.''; + print ''.dol_escape_htmltag($obj->nb).''; if (!$i) { $totalarray['nbfield']++; } print ''; - print ''.$obj->nbpermissions.''; + print ''.dol_escape_htmltag($obj->nbpermissions).''; print ''; if (!$i) { $totalarray['nbfield']++; From deac0a6a1d847e52d451b69c9e0d4578b83af49f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 15:50:07 +0200 Subject: [PATCH 17/69] Fix when there is more than 2 exclusion filter in emailcollector --- .../class/emailcollector.class.php | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index d1341fb729d..d4e20a7e6f5 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1105,8 +1105,8 @@ class EmailCollector extends CommonObject $searchfilterisanswer = 0; $searchfilterisnotanswer = 0; $searchfilterreplyto = 0; - $searchfilterexcludebody = ''; - $searchfilterexcludesubject = ''; + $searchfilterexcludebodyarray = array(); + $searchfilterexcludesubjectarray = array(); $operationslog = ''; $now = dol_now(); @@ -1298,7 +1298,7 @@ class EmailCollector extends CommonObject if ($rule['type'] == 'subject') { if (strpos($rule['rulevalue'], '!') === 0) { //array_push($criteria, array("NOT SUBJECT" => $rule['rulevalue'])); - $searchfilterexcludesubject = preg_replace('/^!/', '', $rule['rulevalue']); + $searchfilterexcludesubjectarray[] = preg_replace('/^!/', '', $rule['rulevalue']); } else { array_push($criteria, array("SUBJECT" => $rule['rulevalue'])); } @@ -1306,7 +1306,7 @@ class EmailCollector extends CommonObject if ($rule['type'] == 'body') { if (strpos($rule['rulevalue'], '!') === 0) { //array_push($criteria, array("NOT BODY" => $rule['rulevalue'])); - $searchfilterexcludebody = preg_replace('/^!/', '', $rule['rulevalue']); + $searchfilterexcludebodyarray[] = preg_replace('/^!/', '', $rule['rulevalue']); } else { array_push($criteria, array("BODY" => $rule['rulevalue'])); } @@ -1429,7 +1429,7 @@ class EmailCollector extends CommonObject if ($rule['type'] == 'subject') { if (strpos($rule['rulevalue'], '!') === 0) { //$search .= ($search ? ' ' : '').'NOT BODY "'.str_replace('"', '', $rule['rulevalue']).'"'; - $searchfilterexcludesubject = preg_replace('/^!/', '', $rule['rulevalue']); + $searchfilterexcludesubjectarray[] = preg_replace('/^!/', '', $rule['rulevalue']); } else { $search .= ($search ? ' ' : '').'SUBJECT "'.str_replace('"', '', $rule['rulevalue']).'"'; } @@ -1437,7 +1437,7 @@ class EmailCollector extends CommonObject if ($rule['type'] == 'body') { if (strpos($rule['rulevalue'], '!') === 0) { //$search .= ($search ? ' ' : '').'NOT BODY "'.str_replace('"', '', $rule['rulevalue']).'"'; - $searchfilterexcludebody = preg_replace('/^!/', '', $rule['rulevalue']); + $searchfilterexcludebodyarray[] = preg_replace('/^!/', '', $rule['rulevalue']); } else { // Warning: Google doesn't implement IMAP properly, and only matches whole words, $search .= ($search ? ' ' : '').'BODY "'.str_replace('"', '', $rule['rulevalue']).'"'; @@ -1769,12 +1769,14 @@ class EmailCollector extends CommonObject continue; // Exclude email } - if ($searchfilterexcludebody) { - if (preg_match('/'.preg_quote($searchfilterexcludebody, '/').'/ms', $messagetext)) { - $nbemailprocessed++; - $operationslog .= '
Discarded - Email body contains string '.$searchfilterexcludebody; - dol_syslog(" Discarded - Email body contains string ".$searchfilterexcludebody); - continue; // Exclude email + if (!empty($searchfilterexcludebodyarray)) { + foreach ($searchfilterexcludebodyarray as $searchfilterexcludebody) { + if (preg_match('/'.preg_quote($searchfilterexcludebody, '/').'/ms', $messagetext)) { + $nbemailprocessed++; + $operationslog .= '
Discarded - Email body contains string '.$searchfilterexcludebody; + dol_syslog(" Discarded - Email body contains string ".$searchfilterexcludebody); + continue 2; // Exclude email + } } } @@ -1861,12 +1863,14 @@ class EmailCollector extends CommonObject //var_dump($msgid);exit; } - if ($searchfilterexcludesubject) { - if (preg_match('/'.preg_quote($searchfilterexcludesubject, '/').'/ms', $subject)) { - $nbemailprocessed++; - $operationslog .= '
Discarded - Email subject contains string '.$searchfilterexcludesubject; - dol_syslog(" Discarded - Email subject contains string ".$searchfilterexcludesubject); - continue; // Exclude email + if (!empty($searchfilterexcludesubjectarray)) { + foreach ($searchfilterexcludesubjectarray as $searchfilterexcludesubject) { + if (preg_match('/'.preg_quote($searchfilterexcludesubject, '/').'/ms', $subject)) { + $nbemailprocessed++; + $operationslog .= '
Discarded - Email subject contains string '.$searchfilterexcludesubject; + dol_syslog(" Discarded - Email subject contains string ".$searchfilterexcludesubject); + continue 2; // Exclude email + } } } From c55c639f8ecdba27c7c252467342c74f5e13d73a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 16:31:56 +0200 Subject: [PATCH 18/69] FIX emailcollector to search existing thirdparty when extract not found --- .../emailcollector/class/emailcollector.class.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index d4e20a7e6f5..19463d16814 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2274,12 +2274,16 @@ class EmailCollector extends CommonObject } } else { // Regex not found - $idtouseforthirdparty = null; - $nametouseforthirdparty = null; - $emailtouseforthirdparty = null; - $namealiastouseforthirdparty = null; + if (in_array($propertytooverwrite, array('id', 'email', 'name', 'name_alias'))) { + $idtouseforthirdparty = null; + $nametouseforthirdparty = null; + $emailtouseforthirdparty = null; + $namealiastouseforthirdparty = null; - $operationslog .= '
propertytooverwrite='.$propertytooverwrite.' Regex /'.dol_escape_htmltag($regexstring).'/ms into '.strtoupper($sourcefield).' -> Not found'; + $operationslog .= '
propertytooverwrite='.$propertytooverwrite.' Regex /'.dol_escape_htmltag($regexstring).'/ms into '.strtoupper($sourcefield).' -> Not found. Property searched is critical so we cancel the search.'; + } else { + $operationslog .= '
propertytooverwrite='.$propertytooverwrite.' Regex /'.dol_escape_htmltag($regexstring).'/ms into '.strtoupper($sourcefield).' -> Not found'; + } } //var_dump($object->$tmpproperty);exit; } else { From 5af2da11918f78e207b57cab72ff7aaaca7721ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 16:38:45 +0200 Subject: [PATCH 19/69] Log --- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 19463d16814..a12411c09e2 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2325,7 +2325,7 @@ class EmailCollector extends CommonObject if (!$errorforactions && ($idtouseforthirdparty || $emailtouseforthirdparty || $nametouseforthirdparty || $namealiastouseforthirdparty)) { // We make another search on thirdparty - $operationslog .= '
We have this data to search thirdparty: '.$idtouseforthirdparty.' '.$emailtouseforthirdparty.' '.$nametouseforthirdparty.' '.$namealiastouseforthirdparty; + $operationslog .= '
We have this data to search thirdparty: id='.$idtouseforthirdparty.', email='.$emailtouseforthirdparty.', name='.$nametouseforthirdparty.', name_alias='.$namealiastouseforthirdparty; $tmpobject = new stdClass(); $tmpobject->element == 'generic'; From 9f53892fbe05bf111eb904255e84aa7040b59ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 6 Sep 2023 16:57:50 +0200 Subject: [PATCH 20/69] fix loadlangs --- htdocs/core/boxes/box_last_knowledgerecord.php | 2 +- htdocs/core/boxes/box_last_modified_knowledgerecord.php | 2 +- htdocs/core/lib/asset.lib.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/boxes/box_last_knowledgerecord.php b/htdocs/core/boxes/box_last_knowledgerecord.php index 2cb4818d6ac..f1bbb3438bf 100644 --- a/htdocs/core/boxes/box_last_knowledgerecord.php +++ b/htdocs/core/boxes/box_last_knowledgerecord.php @@ -78,7 +78,7 @@ class box_last_knowledgerecord extends ModeleBoxes public function __construct($db, $param = '') { global $langs; - $langs->load("boxes", "languages"); + $langs->loadLangs(array("boxes", "languages")); $this->db = $db; $this->boxlabel = $langs->transnoentitiesnoconv("BoxLastKnowledgerecord"); diff --git a/htdocs/core/boxes/box_last_modified_knowledgerecord.php b/htdocs/core/boxes/box_last_modified_knowledgerecord.php index 2c5319151fa..f15ed3d4d5c 100644 --- a/htdocs/core/boxes/box_last_modified_knowledgerecord.php +++ b/htdocs/core/boxes/box_last_modified_knowledgerecord.php @@ -78,7 +78,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes public function __construct($db, $param = '') { global $langs; - $langs->load("boxes", "knowledgemanagement", "languages"); + $langs->loadLangs(array("boxes", "knowledgemanagement", "languages")); $this->db = $db; $this->boxlabel = $langs->transnoentitiesnoconv("BoxLastModifiedKnowledgerecord"); diff --git a/htdocs/core/lib/asset.lib.php b/htdocs/core/lib/asset.lib.php index be31f995657..bfa95ce9c0a 100644 --- a/htdocs/core/lib/asset.lib.php +++ b/htdocs/core/lib/asset.lib.php @@ -88,7 +88,7 @@ function assetPrepareHead(Asset $object) { global $db, $langs, $conf; - $langs->load("assets", "admin"); + $langs->loadLangs(array("assets", "admin")); $h = 0; $head = array(); @@ -184,7 +184,7 @@ function assetModelPrepareHead($object) { global $langs, $conf; - $langs->load("assets", "admin"); + $langs->loadLangs(array("assets", "admin")); $h = 0; $head = array(); From e6f249eaca143435ff5da2253f6245567c33ab76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 6 Sep 2023 17:00:19 +0200 Subject: [PATCH 21/69] fix loadlangs --- htdocs/asset/class/asset.class.php | 6 +++--- htdocs/asset/class/assetmodel.class.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index b3db4e087fb..05b1e4a2433 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1433,7 +1433,7 @@ class Asset extends CommonObject // phpcs:enable if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; - //$langs->load("asset@asset"); + //$langs->load("assets"); $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('AssetInProgress'); $this->labelStatus[self::STATUS_DISPOSED] = $langs->transnoentitiesnoconv('AssetDisposed'); $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('AssetInProgress'); @@ -1516,7 +1516,7 @@ class Asset extends CommonObject public function getNextNumRef() { global $langs, $conf; - $langs->load("asset@asset"); + $langs->load("assets"); if (empty($conf->global->ASSET_ASSET_ADDON)) { $conf->global->ASSET_ASSET_ADDON = 'mod_asset_standard'; @@ -1581,7 +1581,7 @@ class Asset extends CommonObject // $result = 0; // $includedocgeneration = 1; // - // $langs->load("asset@asset"); + // $langs->load("assets"); // // if (!dol_strlen($modele)) { // $modele = 'standard_asset'; diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php index d31a68284fd..8f777144f6e 100644 --- a/htdocs/asset/class/assetmodel.class.php +++ b/htdocs/asset/class/assetmodel.class.php @@ -698,7 +698,7 @@ class AssetModel extends CommonObject // phpcs:enable if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; - //$langs->load("asset@asset"); + //$langs->load("assets"); $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Enabled'); $this->labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled'); From 20162a6d1116eda7e3da371a3c24841e63c68c34 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 17:11:30 +0200 Subject: [PATCH 22/69] Fix support of xlink:href links in website module. --- htdocs/core/lib/website.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 7f01c1f3902..ee77e7dd316 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -171,6 +171,7 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c $content = str_replace('href="styles.css.php', 'href="!~!~!~styles.css.php', $content); $content = str_replace('src="javascript.js.php', 'src="!~!~!~javascript.js.php', $content); $content = str_replace('href="http', 'href="!~!~!~http', $content); + $content = str_replace('xlink:href="', 'xlink:href="!~!~!~', $content); $content = str_replace('href="//', 'href="!~!~!~//', $content); $content = str_replace('src="//', 'src="!~!~!~//', $content); $content = str_replace('src="viewimage.php', 'src="!~!~!~/viewimage.php', $content); @@ -311,6 +312,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') $content = str_replace('href="styles.css.php', 'href="!~!~!~styles.css.php', $content); $content = str_replace('src="javascript.css.php', 'src="!~!~!~javascript.css.php', $content); $content = str_replace('href="http', 'href="!~!~!~http', $content); + $content = str_replace('xlink:href="', 'xlink:href="!~!~!~', $content); $content = str_replace('href="//', 'href="!~!~!~//', $content); $content = str_replace('src="//', 'src="!~!~!~//', $content); $content = str_replace(array('src="viewimage.php', 'src="/viewimage.php'), 'src="!~!~!~/viewimage.php', $content); From 94758009dd3afcfd2ffebf4bb2d4da4872b3b7b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Sep 2023 18:35:40 +0200 Subject: [PATCH 23/69] NEW Can see the favicon file into setup of properties of a website --- htdocs/viewimage.php | 5 ++++- htdocs/website/index.php | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index c531dbc09e0..e2adaa6700f 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -56,6 +56,8 @@ if (!defined('NOREQUIREAJAX')) { // Note that only directory logo is free to access without login. $needlogin = 1; if (isset($_GET["modulepart"])) { + // Some value of modulepart can be used to get resources that are public so no login are required. + // For logo of company if ($_GET["modulepart"] == 'mycompany' && preg_match('/^\/?logos\//', $_GET['file'])) { $needlogin = 0; @@ -64,10 +66,11 @@ if (isset($_GET["modulepart"])) { if ($_GET["modulepart"] == 'barcode') { $needlogin = 0; } - // Some value of modulepart can be used to get resources that are public so no login are required. + // Medias files if ($_GET["modulepart"] == 'medias') { $needlogin = 0; } + // User photo if ($_GET["modulepart"] == 'userphotopublic') { $needlogin = 0; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index e0b4d4c6c84..997af5d8f2f 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3731,6 +3731,13 @@ if ($action == 'editcss') { print ''; // MAX_FILE_SIZE must precede the field type=file } print ''; + + $uploadfolder = $conf->website->dir_output.'/'.$websitekey; + if (dol_is_file($uploadfolder.'/favicon.png')) { + print '
'; + print ''; + print '
'; + } print ''; // CSS file From 05b067283ab23cda2a7011261fb4010fd8fec3a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Sep 2023 03:27:39 +0200 Subject: [PATCH 24/69] Removed useless file --- htdocs/langs/en_US/link.lang | 11 ----------- htdocs/langs/en_US/main.lang | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 htdocs/langs/en_US/link.lang diff --git a/htdocs/langs/en_US/link.lang b/htdocs/langs/en_US/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/en_US/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index d6f21c973a1..b20aee98e69 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1239,3 +1239,13 @@ DateOfPrinting=Date of printing ClickFullScreenEscapeToLeave=Click here to switch in Full screen mode. Press ESCAPE to leave Full screen mode. UserNotYetValid=Not yet valid UserExpired=Expired +LinkANewFile=Link a new file/document +LinkedFiles=Linked files and documents +NoLinkFound=No registered links +LinkComplete=The file has been linked successfully +ErrorFileNotLinked=The file could not be linked +LinkRemoved=The link %s has been removed +ErrorFailedToDeleteLink= Failed to remove link '%s' +ErrorFailedToUpdateLink= Failed to update link '%s' +URLToLink=URL to link +OverwriteIfExists=Overwrite if file exists From 0a853fe794e37e40be641e2ff0c6e8ebaa9d12f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Sep 2023 03:30:41 +0200 Subject: [PATCH 25/69] Removed files links.lang --- htdocs/core/actions_linkedfiles.inc.php | 2 +- htdocs/core/lib/files.lib.php | 2 +- htdocs/langs/am_ET/link.lang | 11 ----------- htdocs/langs/ar_DZ/link.lang | 11 ----------- htdocs/langs/ar_JO/link.lang | 11 ----------- htdocs/langs/ar_SA/link.lang | 11 ----------- htdocs/langs/ar_SY/link.lang | 11 ----------- htdocs/langs/az_AZ/link.lang | 11 ----------- htdocs/langs/bg_BG/link.lang | 11 ----------- htdocs/langs/bn_BD/link.lang | 11 ----------- htdocs/langs/bn_IN/link.lang | 11 ----------- htdocs/langs/bs_BA/link.lang | 11 ----------- htdocs/langs/ca_ES/link.lang | 11 ----------- htdocs/langs/cs_CZ/link.lang | 11 ----------- htdocs/langs/cy_GB/link.lang | 11 ----------- htdocs/langs/da_DK/link.lang | 11 ----------- htdocs/langs/de_CH/link.lang | 5 ----- htdocs/langs/de_DE/link.lang | 11 ----------- htdocs/langs/el_GR/link.lang | 11 ----------- htdocs/langs/es_AR/link.lang | 10 ---------- htdocs/langs/es_CL/link.lang | 10 ---------- htdocs/langs/es_CO/link.lang | 9 --------- htdocs/langs/es_CR/link.lang | 8 -------- htdocs/langs/es_CU/link.lang | 7 ------- htdocs/langs/es_EC/link.lang | 8 -------- htdocs/langs/es_ES/link.lang | 11 ----------- htdocs/langs/es_MX/link.lang | 10 ---------- htdocs/langs/et_EE/link.lang | 11 ----------- htdocs/langs/eu_ES/link.lang | 11 ----------- htdocs/langs/fa_IR/link.lang | 11 ----------- htdocs/langs/fi_FI/link.lang | 11 ----------- htdocs/langs/fr_CA/link.lang | 6 ------ htdocs/langs/fr_FR/link.lang | 11 ----------- htdocs/langs/gl_ES/link.lang | 11 ----------- htdocs/langs/he_IL/link.lang | 11 ----------- htdocs/langs/hi_IN/link.lang | 11 ----------- htdocs/langs/hr_HR/link.lang | 11 ----------- htdocs/langs/hu_HU/link.lang | 11 ----------- htdocs/langs/id_ID/link.lang | 11 ----------- htdocs/langs/is_IS/link.lang | 11 ----------- htdocs/langs/it_IT/link.lang | 11 ----------- htdocs/langs/ja_JP/link.lang | 11 ----------- htdocs/langs/ka_GE/link.lang | 11 ----------- htdocs/langs/kk_KZ/link.lang | 11 ----------- htdocs/langs/km_KH/link.lang | 11 ----------- htdocs/langs/kn_IN/link.lang | 11 ----------- htdocs/langs/ko_KR/link.lang | 11 ----------- htdocs/langs/lo_LA/link.lang | 11 ----------- htdocs/langs/lt_LT/link.lang | 11 ----------- htdocs/langs/lv_LV/link.lang | 11 ----------- htdocs/langs/mk_MK/link.lang | 11 ----------- htdocs/langs/mn_MN/link.lang | 11 ----------- htdocs/langs/ms_MY/link.lang | 11 ----------- htdocs/langs/my_MM/link.lang | 11 ----------- htdocs/langs/nb_NO/link.lang | 11 ----------- htdocs/langs/ne_NP/link.lang | 11 ----------- htdocs/langs/nl_NL/link.lang | 11 ----------- htdocs/langs/pl_PL/link.lang | 11 ----------- htdocs/langs/pt_BR/link.lang | 10 ---------- htdocs/langs/pt_MZ/link.lang | 10 ---------- htdocs/langs/pt_PT/link.lang | 11 ----------- htdocs/langs/ro_RO/link.lang | 11 ----------- htdocs/langs/ru_RU/link.lang | 11 ----------- htdocs/langs/sk_SK/link.lang | 11 ----------- htdocs/langs/sl_SI/link.lang | 11 ----------- htdocs/langs/sq_AL/link.lang | 11 ----------- htdocs/langs/sr_RS/link.lang | 11 ----------- htdocs/langs/sv_SE/link.lang | 11 ----------- htdocs/langs/sw_SW/link.lang | 11 ----------- htdocs/langs/ta_IN/link.lang | 11 ----------- htdocs/langs/tg_TJ/link.lang | 11 ----------- htdocs/langs/th_TH/link.lang | 11 ----------- htdocs/langs/tr_TR/link.lang | 11 ----------- htdocs/langs/uk_UA/link.lang | 11 ----------- htdocs/langs/ur_PK/link.lang | 11 ----------- htdocs/langs/uz_UZ/link.lang | 11 ----------- htdocs/langs/vi_VN/link.lang | 11 ----------- htdocs/langs/zh_CN/link.lang | 11 ----------- htdocs/langs/zh_HK/link.lang | 11 ----------- htdocs/langs/zh_TW/link.lang | 11 ----------- 80 files changed, 2 insertions(+), 832 deletions(-) delete mode 100644 htdocs/langs/am_ET/link.lang delete mode 100644 htdocs/langs/ar_DZ/link.lang delete mode 100644 htdocs/langs/ar_JO/link.lang delete mode 100644 htdocs/langs/ar_SA/link.lang delete mode 100644 htdocs/langs/ar_SY/link.lang delete mode 100644 htdocs/langs/az_AZ/link.lang delete mode 100644 htdocs/langs/bg_BG/link.lang delete mode 100644 htdocs/langs/bn_BD/link.lang delete mode 100644 htdocs/langs/bn_IN/link.lang delete mode 100644 htdocs/langs/bs_BA/link.lang delete mode 100644 htdocs/langs/ca_ES/link.lang delete mode 100644 htdocs/langs/cs_CZ/link.lang delete mode 100644 htdocs/langs/cy_GB/link.lang delete mode 100644 htdocs/langs/da_DK/link.lang delete mode 100644 htdocs/langs/de_CH/link.lang delete mode 100644 htdocs/langs/de_DE/link.lang delete mode 100644 htdocs/langs/el_GR/link.lang delete mode 100644 htdocs/langs/es_AR/link.lang delete mode 100644 htdocs/langs/es_CL/link.lang delete mode 100644 htdocs/langs/es_CO/link.lang delete mode 100644 htdocs/langs/es_CR/link.lang delete mode 100644 htdocs/langs/es_CU/link.lang delete mode 100644 htdocs/langs/es_EC/link.lang delete mode 100644 htdocs/langs/es_ES/link.lang delete mode 100644 htdocs/langs/es_MX/link.lang delete mode 100644 htdocs/langs/et_EE/link.lang delete mode 100644 htdocs/langs/eu_ES/link.lang delete mode 100644 htdocs/langs/fa_IR/link.lang delete mode 100644 htdocs/langs/fi_FI/link.lang delete mode 100644 htdocs/langs/fr_CA/link.lang delete mode 100644 htdocs/langs/fr_FR/link.lang delete mode 100644 htdocs/langs/gl_ES/link.lang delete mode 100644 htdocs/langs/he_IL/link.lang delete mode 100644 htdocs/langs/hi_IN/link.lang delete mode 100644 htdocs/langs/hr_HR/link.lang delete mode 100644 htdocs/langs/hu_HU/link.lang delete mode 100644 htdocs/langs/id_ID/link.lang delete mode 100644 htdocs/langs/is_IS/link.lang delete mode 100644 htdocs/langs/it_IT/link.lang delete mode 100644 htdocs/langs/ja_JP/link.lang delete mode 100644 htdocs/langs/ka_GE/link.lang delete mode 100644 htdocs/langs/kk_KZ/link.lang delete mode 100644 htdocs/langs/km_KH/link.lang delete mode 100644 htdocs/langs/kn_IN/link.lang delete mode 100644 htdocs/langs/ko_KR/link.lang delete mode 100644 htdocs/langs/lo_LA/link.lang delete mode 100644 htdocs/langs/lt_LT/link.lang delete mode 100644 htdocs/langs/lv_LV/link.lang delete mode 100644 htdocs/langs/mk_MK/link.lang delete mode 100644 htdocs/langs/mn_MN/link.lang delete mode 100644 htdocs/langs/ms_MY/link.lang delete mode 100644 htdocs/langs/my_MM/link.lang delete mode 100644 htdocs/langs/nb_NO/link.lang delete mode 100644 htdocs/langs/ne_NP/link.lang delete mode 100644 htdocs/langs/nl_NL/link.lang delete mode 100644 htdocs/langs/pl_PL/link.lang delete mode 100644 htdocs/langs/pt_BR/link.lang delete mode 100644 htdocs/langs/pt_MZ/link.lang delete mode 100644 htdocs/langs/pt_PT/link.lang delete mode 100644 htdocs/langs/ro_RO/link.lang delete mode 100644 htdocs/langs/ru_RU/link.lang delete mode 100644 htdocs/langs/sk_SK/link.lang delete mode 100644 htdocs/langs/sl_SI/link.lang delete mode 100644 htdocs/langs/sq_AL/link.lang delete mode 100644 htdocs/langs/sr_RS/link.lang delete mode 100644 htdocs/langs/sv_SE/link.lang delete mode 100644 htdocs/langs/sw_SW/link.lang delete mode 100644 htdocs/langs/ta_IN/link.lang delete mode 100644 htdocs/langs/tg_TJ/link.lang delete mode 100644 htdocs/langs/th_TH/link.lang delete mode 100644 htdocs/langs/tr_TR/link.lang delete mode 100644 htdocs/langs/uk_UA/link.lang delete mode 100644 htdocs/langs/ur_PK/link.lang delete mode 100644 htdocs/langs/uz_UZ/link.lang delete mode 100644 htdocs/langs/vi_VN/link.lang delete mode 100644 htdocs/langs/zh_CN/link.lang delete mode 100644 htdocs/langs/zh_HK/link.lang delete mode 100644 htdocs/langs/zh_TW/link.lang diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index b599480f583..de30b356b03 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -191,7 +191,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissionto } } elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha') && !empty($permissiontoadd)) { require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $langs->load('link'); + $link = new Link($db); $f = $link->fetch(GETPOST('linkid', 'int')); if ($f) { diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 69ce183cc0d..44cbe0ec1e2 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1885,7 +1885,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess $linkObject->objectid = GETPOST('objectid', 'int'); $linkObject->label = GETPOST('label', 'alpha'); $res = $linkObject->create($user); - $langs->load('link'); + if ($res > 0) { setEventMessages($langs->trans("LinkComplete"), null, 'mesgs'); } else { diff --git a/htdocs/langs/am_ET/link.lang b/htdocs/langs/am_ET/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/am_ET/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ar_DZ/link.lang b/htdocs/langs/ar_DZ/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ar_DZ/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ar_JO/link.lang b/htdocs/langs/ar_JO/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ar_JO/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ar_SA/link.lang b/htdocs/langs/ar_SA/link.lang deleted file mode 100644 index 2e0aa65c6f3..00000000000 --- a/htdocs/langs/ar_SA/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=ربط ملف جديد/ وثيقة -LinkedFiles=الملفات والمستندات المرتبطة -NoLinkFound=لا يوجد روابط مسجلة -LinkComplete=تم ربط الملف بنجاح -ErrorFileNotLinked=لا يمكن ربط الملف -LinkRemoved= الرابط%sتم إزالتة -ErrorFailedToDeleteLink= فشل في إزالة الرابط ' %s ' -ErrorFailedToUpdateLink= فشل تحديث الرابط ' %s ' -URLToLink=عنوان URL للربط -OverwriteIfExists=إستبدال محتوى الملف إذا كان موجوداً diff --git a/htdocs/langs/ar_SY/link.lang b/htdocs/langs/ar_SY/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ar_SY/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/az_AZ/link.lang b/htdocs/langs/az_AZ/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/az_AZ/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/bg_BG/link.lang b/htdocs/langs/bg_BG/link.lang deleted file mode 100644 index c513bbfbbbe..00000000000 --- a/htdocs/langs/bg_BG/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Свързване на нов файл / документ -LinkedFiles=Свързани файлове и документи -NoLinkFound=Няма регистрирани връзки -LinkComplete=Файлът е успешно свързан -ErrorFileNotLinked=Файлът не може да бъде свързан -LinkRemoved=Връзката %s е премахната -ErrorFailedToDeleteLink= Премахването на връзката '%s' не е успешно -ErrorFailedToUpdateLink= Актуализацията на връзката '%s' не е успешна -URLToLink=URL адрес -OverwriteIfExists=Презаписване на файл, ако съществува diff --git a/htdocs/langs/bn_BD/link.lang b/htdocs/langs/bn_BD/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/bn_BD/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/bn_IN/link.lang b/htdocs/langs/bn_IN/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/bn_IN/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/bs_BA/link.lang b/htdocs/langs/bs_BA/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/bs_BA/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ca_ES/link.lang b/htdocs/langs/ca_ES/link.lang deleted file mode 100644 index 60bb39b3786..00000000000 --- a/htdocs/langs/ca_ES/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Enllaça un nou arxiu/document -LinkedFiles=Arxius i documents enllaçats -NoLinkFound=No hi ha enllaços registrats -LinkComplete=L'arxiu s'ha enllaçat correctament -ErrorFileNotLinked=L'arxiu no s'ha enllaçat -LinkRemoved=L'enllaç %s s'ha eliminat -ErrorFailedToDeleteLink= Error en eliminar l'enllaç '%s' -ErrorFailedToUpdateLink= Error en actualitzar l'enllaç '%s' -URLToLink=URL a enllaçar -OverwriteIfExists=Sobreescriu el fitxer si existeix diff --git a/htdocs/langs/cs_CZ/link.lang b/htdocs/langs/cs_CZ/link.lang deleted file mode 100644 index 310b3935630..00000000000 --- a/htdocs/langs/cs_CZ/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Připojit nový soubor/dokument -LinkedFiles=Připojené soubory a dokumenty -NoLinkFound=Žádné odkazy -LinkComplete=Soubor byl úspěšně připojen -ErrorFileNotLinked=Soubor nemohl být připojen -LinkRemoved=Odkaz %s byl odstraněn -ErrorFailedToDeleteLink= Nepodařilo se odstranit odkaz '%s' -ErrorFailedToUpdateLink= Nepodařilo se aktualizovat odkaz '%s' -URLToLink=Připojit URL -OverwriteIfExists=Pokud existuje, přepište soubor diff --git a/htdocs/langs/cy_GB/link.lang b/htdocs/langs/cy_GB/link.lang deleted file mode 100644 index 2cdbc0e3d5b..00000000000 --- a/htdocs/langs/cy_GB/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Cysylltwch ffeil/dogfen newydd -LinkedFiles=Ffeiliau a dogfennau cysylltiedig -NoLinkFound=Dim dolenni cofrestredig -LinkComplete=Mae'r ffeil wedi'i chysylltu'n llwyddiannus -ErrorFileNotLinked=Nid oedd modd cysylltu'r ffeil -LinkRemoved=Mae'r cyswllt %s wedi'i ddileu -ErrorFailedToDeleteLink= Wedi methu tynnu dolen ' %s ' -ErrorFailedToUpdateLink= Wedi methu diweddaru'r ddolen ' %s ' -URLToLink=URL i'r ddolen -OverwriteIfExists=Trosysgrifo ffeil os yw'n bodoli diff --git a/htdocs/langs/da_DK/link.lang b/htdocs/langs/da_DK/link.lang deleted file mode 100644 index 8f538298baf..00000000000 --- a/htdocs/langs/da_DK/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link en ny fil / et dokument -LinkedFiles=Sammenkædede filer og dokumenter -NoLinkFound=Ingen registrerede links -LinkComplete=Filen er blevet linket korrekt -ErrorFileNotLinked=Filen kunne ikke forbindes -LinkRemoved=Linket %s er blevet fjernet -ErrorFailedToDeleteLink= Kunne ikke fjerne linket ' %s ' -ErrorFailedToUpdateLink= Kunne ikke opdatere linket ' %s ' -URLToLink=URL til link -OverwriteIfExists=Overskriv fil, hvis den findes diff --git a/htdocs/langs/de_CH/link.lang b/htdocs/langs/de_CH/link.lang deleted file mode 100644 index db7e1395400..00000000000 --- a/htdocs/langs/de_CH/link.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Verknüpfe eine neue Datei /Dokument -LinkComplete=Die Datei wurde erfolgreich verlinkt -ErrorFileNotLinked=Die Datei konnte nicht verlinkt werden -URLToLink=URL zum Verlinken diff --git a/htdocs/langs/de_DE/link.lang b/htdocs/langs/de_DE/link.lang deleted file mode 100644 index e66eb1bdf6f..00000000000 --- a/htdocs/langs/de_DE/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Neue Verknüpfung erstellen -LinkedFiles=Verknüpfte Dateien -NoLinkFound=Keine verknüpften Links -LinkComplete=Die Datei wurde erfolgreich verlinkt. -ErrorFileNotLinked=Die Datei konnte nicht verlinkt werden. -LinkRemoved=Der Link %s wurde entfernt -ErrorFailedToDeleteLink= Fehler beim entfernen des Links '%s' -ErrorFailedToUpdateLink= Fehler beim aktualisieren des Link '%s' -URLToLink=zu verlinkende URL -OverwriteIfExists=Datei überschreiben, falls vorhanden diff --git a/htdocs/langs/el_GR/link.lang b/htdocs/langs/el_GR/link.lang deleted file mode 100644 index 1057e624b10..00000000000 --- a/htdocs/langs/el_GR/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Συνδέστε ένα νέο αρχείο / έγγραφο -LinkedFiles=Συνδεδεμένα αρχεία και έγγραφα -NoLinkFound=Δεν υπάρχουν εγγεγραμμένοι σύνδεσμοι -LinkComplete=Το αρχείο έχει συνδεθεί με επιτυχία -ErrorFileNotLinked=Το αρχείο δεν μπορεί να συνδεθεί -LinkRemoved=Ο σύνδεσμος %s έχει αφαιρεθεί -ErrorFailedToDeleteLink= Απέτυχε η αφαίρεση του συνδέσμου '%s' -ErrorFailedToUpdateLink= Απέτυχε η ενημέρωση του σύνδεσμο '%s' -URLToLink=Διεύθυνση URL για σύνδεση -OverwriteIfExists=Επανεγγραφή αρχείου εάν υπάρχει diff --git a/htdocs/langs/es_AR/link.lang b/htdocs/langs/es_AR/link.lang deleted file mode 100644 index 3dbd72adba5..00000000000 --- a/htdocs/langs/es_AR/link.lang +++ /dev/null @@ -1,10 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Enlazar a un nuevo archivo/documento -LinkedFiles=Archivos y documentos enlazados -NoLinkFound=No hay enlaces registrados -LinkComplete=El archivo se ha enlazado correctamente -ErrorFileNotLinked=El archivo no pudo ser enlazado -LinkRemoved=El enlace %s ha sido eliminado -ErrorFailedToDeleteLink=Error al eliminar el enlace '%s' -ErrorFailedToUpdateLink=Error al actualizar enlace '%s' -URLToLink=URL del enlace diff --git a/htdocs/langs/es_CL/link.lang b/htdocs/langs/es_CL/link.lang deleted file mode 100644 index b3f562fac79..00000000000 --- a/htdocs/langs/es_CL/link.lang +++ /dev/null @@ -1,10 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Enlace un nuevo archivo / documento -LinkedFiles=Links archivos y documentos -NoLinkFound=No hay enlaces registrados -LinkComplete=El archivo ha sido vinculado exitosamente -ErrorFileNotLinked=El archivo no pudo ser vinculado -LinkRemoved=El enlace %s ha sido eliminado -ErrorFailedToDeleteLink=Error al eliminar el enlace '%s' -ErrorFailedToUpdateLink=Error al actualizar el enlace '%s' -URLToLink=URL para enlazar diff --git a/htdocs/langs/es_CO/link.lang b/htdocs/langs/es_CO/link.lang deleted file mode 100644 index 3f1aa9375e2..00000000000 --- a/htdocs/langs/es_CO/link.lang +++ /dev/null @@ -1,9 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Vincular un nuevo archivo / documento -NoLinkFound=No hay enlaces registrados -LinkComplete=El archivo se ha vinculado correctamente -ErrorFileNotLinked=El archivo no se pudo vincular -LinkRemoved=El enlace %s ha sido eliminado -ErrorFailedToDeleteLink=Error al eliminar el enlace ' %s ' -ErrorFailedToUpdateLink=Error al actualizar el enlace ' %s ' -URLToLink=URL para vincular diff --git a/htdocs/langs/es_CR/link.lang b/htdocs/langs/es_CR/link.lang deleted file mode 100644 index 1c76a193ca7..00000000000 --- a/htdocs/langs/es_CR/link.lang +++ /dev/null @@ -1,8 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -NoLinkFound=No hay enlaces registrados -LinkComplete=El archivo se ha vinculado con éxito. -ErrorFileNotLinked=No se pudo vincular el archivo -LinkRemoved=El enlace %s ha sido eliminado -ErrorFailedToDeleteLink=Error al eliminar el enlace ' %s ' -ErrorFailedToUpdateLink=Error al actualizar el enlace ' %s ' -URLToLink=URL para vincular diff --git a/htdocs/langs/es_CU/link.lang b/htdocs/langs/es_CU/link.lang deleted file mode 100644 index 7740f83bf62..00000000000 --- a/htdocs/langs/es_CU/link.lang +++ /dev/null @@ -1,7 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkComplete=El archivo se ha vinculado con éxito. -ErrorFileNotLinked=No se pudo vincular el archivo -LinkRemoved=El enlace %s ha sido eliminado -ErrorFailedToDeleteLink=Error al eliminar el enlace ' %s ' -ErrorFailedToUpdateLink=Error al actualizar el enlace ' %s ' -URLToLink=URL para vincular diff --git a/htdocs/langs/es_EC/link.lang b/htdocs/langs/es_EC/link.lang deleted file mode 100644 index 0ad5de1e897..00000000000 --- a/htdocs/langs/es_EC/link.lang +++ /dev/null @@ -1,8 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkedFiles=Archivos enlazados y documentos -NoLinkFound=No hay enlaces registrados -LinkComplete=El archivo se ha vinculado correctamente -ErrorFileNotLinked=No se pudo vincular el archivo. -LinkRemoved=Se ha eliminado el enlace %s -ErrorFailedToDeleteLink=No se pudo eliminar el vínculo '%s' -URLToLink=URL para vincular diff --git a/htdocs/langs/es_ES/link.lang b/htdocs/langs/es_ES/link.lang deleted file mode 100644 index feb76151fde..00000000000 --- a/htdocs/langs/es_ES/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Vincular un nuevo archivo/documento -LinkedFiles=Archivos y documentos vinculados -NoLinkFound=Sin enlaces registrados -LinkComplete=El archivo ha sido vinculado correctamente -ErrorFileNotLinked=El archivo no ha podido ser vinculado -LinkRemoved=El vínculo %s ha sido eliminado -ErrorFailedToDeleteLink= Error al eliminar el vínculo '%s' -ErrorFailedToUpdateLink= Error al actualizar el vínculo '%s' -URLToLink=URL a enlazar -OverwriteIfExists=Sobrescribir archivo si existe diff --git a/htdocs/langs/es_MX/link.lang b/htdocs/langs/es_MX/link.lang deleted file mode 100644 index b97dcbc1a69..00000000000 --- a/htdocs/langs/es_MX/link.lang +++ /dev/null @@ -1,10 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Vincular un nuevo archivo / documento -LinkedFiles=Archivos enlazados y documentos -NoLinkFound=No hay enlaces registrados -LinkComplete=El archivo se ha vinculado correctamente -ErrorFileNotLinked=No se pudo vincular el archivo. -LinkRemoved=Se ha eliminado el enlace %s -ErrorFailedToDeleteLink=No se pudo eliminar el vínculo ' %s ' -ErrorFailedToUpdateLink=Error al actualizar el vínculo ' %s ' -URLToLink=URL para vincular diff --git a/htdocs/langs/et_EE/link.lang b/htdocs/langs/et_EE/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/et_EE/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/eu_ES/link.lang b/htdocs/langs/eu_ES/link.lang deleted file mode 100644 index d3a0fc9370e..00000000000 --- a/htdocs/langs/eu_ES/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Fitxategi/dokumentu berria estekatu -LinkedFiles=Estekatutako fitxategi eta dokumentuak -NoLinkFound=Ez dago gordetako estekarik -LinkComplete=Fitxategia ondo estekatu da -ErrorFileNotLinked=Ezin izan da fitxategia estekatu -LinkRemoved=%s esteka ezabatua izan da -ErrorFailedToDeleteLink= Ezin izan da '%s' esteka ezabatu -ErrorFailedToUpdateLink= Ezin izan da '%s' esteka berritu -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/fa_IR/link.lang b/htdocs/langs/fa_IR/link.lang deleted file mode 100644 index 012040c2baa..00000000000 --- a/htdocs/langs/fa_IR/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=پیوند یک فایل/سند -LinkedFiles=اسناد و فایل‌های مرتبط -NoLinkFound=پیوند ثبت‌شده‌ای وجود ندارد -LinkComplete=فایل با موفقیت پیوند شد -ErrorFileNotLinked=امکان پیوند فایل وجود ندارد -LinkRemoved=پیوند %s برداشته شد -ErrorFailedToDeleteLink= امکان حذف پیوند '%s' نبود -ErrorFailedToUpdateLink= امکان روزآمدسازی پیوند '%s' نبود -URLToLink=نشانی برای پیوند کردن -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/fi_FI/link.lang b/htdocs/langs/fi_FI/link.lang deleted file mode 100644 index 62802ede960..00000000000 --- a/htdocs/langs/fi_FI/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Luo uusi linkki tiedostoon/dokumenttiin -LinkedFiles=Linkitetyt tiedostot ja dokumentit -NoLinkFound=Rekisteröityjä linkkejä ei ole -LinkComplete=Tiedosto on linkitetty onnistuneesti -ErrorFileNotLinked=Tiedostoa ei voitu linkittää -LinkRemoved=%s linkki on poistettu -ErrorFailedToDeleteLink= Linkin '%s' poisto ei onnistunut -ErrorFailedToUpdateLink= Linkin '%s' päivitys ei onnistunut -URLToLink=URL linkiksi -OverwriteIfExists=Korvaa tiedosto jos olemassa diff --git a/htdocs/langs/fr_CA/link.lang b/htdocs/langs/fr_CA/link.lang deleted file mode 100644 index 8acd890c9a0..00000000000 --- a/htdocs/langs/fr_CA/link.lang +++ /dev/null @@ -1,6 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Relier un nouveau fichier / document -NoLinkFound=Pas de liens enregistrés -LinkComplete=Le fichier a été lié avec succès -ErrorFailedToDeleteLink=Impossible d'enlever le lien '%s' -ErrorFailedToUpdateLink=Impossible de mettre à jour le lien '%s' diff --git a/htdocs/langs/fr_FR/link.lang b/htdocs/langs/fr_FR/link.lang deleted file mode 100644 index 4534b8420e7..00000000000 --- a/htdocs/langs/fr_FR/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Lier un nouveau fichier/document -LinkedFiles=Fichiers et documents liés -NoLinkFound=Aucun lien associé -LinkComplete=Le fichier a été correctement lié -ErrorFileNotLinked=Le fichier n'a pas pu être lié -LinkRemoved=Le lien %s a été supprimé -ErrorFailedToDeleteLink= Impossible de supprimer le lien '%s' -ErrorFailedToUpdateLink= Impossible de modifier le lien '%s' -URLToLink=URL à lier -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/gl_ES/link.lang b/htdocs/langs/gl_ES/link.lang deleted file mode 100644 index 4815cf15e64..00000000000 --- a/htdocs/langs/gl_ES/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Ligar un novo ficheiro/documento -LinkedFiles=Ficheiros e documentos ligados -NoLinkFound=Sen ligazóns registrados -LinkComplete=O ficheiro foi ligado correctamente -ErrorFileNotLinked=O ficheiro non puido ser ligado -LinkRemoved=A ligazón %s foi eliminada -ErrorFailedToDeleteLink= Erro ao eliminar a ligazón '%s' -ErrorFailedToUpdateLink= Erro ao actualizar a ligazón '%s' -URLToLink=URL a ligar -OverwriteIfExists=Sobrescribir ficheiro se existe diff --git a/htdocs/langs/he_IL/link.lang b/htdocs/langs/he_IL/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/he_IL/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/hi_IN/link.lang b/htdocs/langs/hi_IN/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/hi_IN/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/hr_HR/link.lang b/htdocs/langs/hr_HR/link.lang deleted file mode 100644 index ee140b37440..00000000000 --- a/htdocs/langs/hr_HR/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Poveži novu datoteku/dokument -LinkedFiles=Povezane datoteke i dokumenti -NoLinkFound=Nema registriranih veza -LinkComplete=Datoteka je uspješno povezana -ErrorFileNotLinked=Datoteku je nemoguće povezati -LinkRemoved=Veza %s je obrisana -ErrorFailedToDeleteLink= Neuspješno brisanje veze '%s' -ErrorFailedToUpdateLink= Neuspješna promjena veze '%s' -URLToLink=URL prema vezi -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/hu_HU/link.lang b/htdocs/langs/hu_HU/link.lang deleted file mode 100644 index 05653373fbd..00000000000 --- a/htdocs/langs/hu_HU/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Új fájl/dokumentum hivatkozása -LinkedFiles=Hivatkozott fájlok és dokumentumok -NoLinkFound=Nincs mentett hivatkozás -LinkComplete=A fájlra történt hivatkozás sikerült -ErrorFileNotLinked=A fájlra nem lehet hivatkozni -LinkRemoved=A %s hivatkozás törölve -ErrorFailedToDeleteLink= A '%s' hivakozás törlése sikertelen -ErrorFailedToUpdateLink= A '%s' hivakozás frissítése sikertelen -URLToLink=A hivatkozás címe -OverwriteIfExists=Fájl felülírása, ha létezik diff --git a/htdocs/langs/id_ID/link.lang b/htdocs/langs/id_ID/link.lang deleted file mode 100644 index 4b6d73e7c52..00000000000 --- a/htdocs/langs/id_ID/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Tautan untuk berkas/dokumen baru -LinkedFiles=Tautan berkas dan dokumen -NoLinkFound=Link tidak terdaftar -LinkComplete=Berkas telah berhasil ditautkan -ErrorFileNotLinked=Berkas tidak dapat ditautkan -LinkRemoved=Tautan %s telah dihapus -ErrorFailedToDeleteLink= gagal untuk menghapus tautan '%s' -ErrorFailedToUpdateLink= Gagal untuk memperbaharui tautan '%s' -URLToLink=URL untuk ditautkan -OverwriteIfExists=Timpa file jika ada diff --git a/htdocs/langs/is_IS/link.lang b/htdocs/langs/is_IS/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/is_IS/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/it_IT/link.lang b/htdocs/langs/it_IT/link.lang deleted file mode 100644 index 551802192d1..00000000000 --- a/htdocs/langs/it_IT/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Collega un nuovo file/documento -LinkedFiles=File e documenti collegati -NoLinkFound=Nessun collegamento registrato -LinkComplete=Il file è stato correttamente collegato -ErrorFileNotLinked=Il file non può essere collegato -LinkRemoved=Il collegamento %s è stato rimosso -ErrorFailedToDeleteLink= Impossibile rimuovere il collegamento '%s' -ErrorFailedToUpdateLink= Impossibile caricare il collegamento '%s' -URLToLink=Indirizzo del link -OverwriteIfExists=Sovrascrivi file se esiste diff --git a/htdocs/langs/ja_JP/link.lang b/htdocs/langs/ja_JP/link.lang deleted file mode 100644 index 71b9e42f923..00000000000 --- a/htdocs/langs/ja_JP/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=新規ファイル/ドキュメントをリンクする -LinkedFiles=ファイルとドキュメントをリンクした -NoLinkFound=リンクは登録されていない -LinkComplete=ファイルを正常にリンクした -ErrorFileNotLinked=ファイルをリンクできなかった -LinkRemoved=リンク %s が削除された -ErrorFailedToDeleteLink= リンク '%s' を削除できなかった -ErrorFailedToUpdateLink= リンク '%s' を更新できなかった -URLToLink=リンクの URL -OverwriteIfExists=存在する場合はファイルを上書きする diff --git a/htdocs/langs/ka_GE/link.lang b/htdocs/langs/ka_GE/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ka_GE/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/kk_KZ/link.lang b/htdocs/langs/kk_KZ/link.lang deleted file mode 100644 index 5ef5de861ec..00000000000 --- a/htdocs/langs/kk_KZ/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Жаңа файлды/құжатты байланыстырыңыз -LinkedFiles=Байланысты файлдар мен құжаттар -NoLinkFound=Тіркелген сілтемелер жоқ -LinkComplete=Файл сәтті байланыстырылды -ErrorFileNotLinked=Файлды байланыстыру мүмкін болмады -LinkRemoved=%s сілтемесі жойылды -ErrorFailedToDeleteLink= ' %s ' сілтемесі жойылмады -ErrorFailedToUpdateLink= ' %s ' сілтемесі жаңартылмады -URLToLink=Сілтеме үшін URL -OverwriteIfExists=Егер бар болса, файлды қайта жазыңыз diff --git a/htdocs/langs/km_KH/link.lang b/htdocs/langs/km_KH/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/km_KH/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/kn_IN/link.lang b/htdocs/langs/kn_IN/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/kn_IN/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ko_KR/link.lang b/htdocs/langs/ko_KR/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ko_KR/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/lo_LA/link.lang b/htdocs/langs/lo_LA/link.lang deleted file mode 100644 index 80f013d66bd..00000000000 --- a/htdocs/langs/lo_LA/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=ເຊື່ອມໂຍງໄຟລ//ເອກະສານໃ່ -LinkedFiles=ໄຟລ Linked ແລະເອກະສານທີ່ເຊື່ອມໂຍງ -NoLinkFound=ບໍ່ມີລິ້ງເຊື່ອມຕໍ່ທີ່ລົງທະບຽນ -LinkComplete=ໄຟລ has ໄດ້ຖືກເຊື່ອມຕໍ່ ສຳ ເລັດແລ້ວ -ErrorFileNotLinked=ບໍ່ສາມາດເຊື່ອມໂຍງໄຟລໄດ້ -LinkRemoved=ລິ້ງ %s ໄດ້ຖືກລຶບອອກແລ້ວ -ErrorFailedToDeleteLink= ລຶບລິ້ງ ' %s ບໍ່ ສຳ ເລັດ' -ErrorFailedToUpdateLink= ອັບເດດລິ້ງ ' %s ບໍ່ ສຳ ເລັດ' -URLToLink=URL ເພື່ອເຊື່ອມຕໍ່ -OverwriteIfExists=ຂຽນທັບໄຟລ if ຖ້າມີ diff --git a/htdocs/langs/lt_LT/link.lang b/htdocs/langs/lt_LT/link.lang deleted file mode 100644 index c9e19c70173..00000000000 --- a/htdocs/langs/lt_LT/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Susieti naują filą / dokumentą -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Nesėkmingas sąsajos '%s' atnaujinimas -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/lv_LV/link.lang b/htdocs/langs/lv_LV/link.lang deleted file mode 100644 index e649eb2874b..00000000000 --- a/htdocs/langs/lv_LV/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Salinkot jaunu failu/dokumentu -LinkedFiles=Salinkotie faili un dokumenti -NoLinkFound=Nav reģistrētas saites -LinkComplete=Fails veiksmīgi salinkots -ErrorFileNotLinked=Failu nevar salinkot -LinkRemoved=Saite %s tika dzēsta -ErrorFailedToDeleteLink= Kļūda dzēšot saiti '%s' -ErrorFailedToUpdateLink= Kļūda atjaunojot saiti '%s' -URLToLink=Saites uz URL -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/mk_MK/link.lang b/htdocs/langs/mk_MK/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/mk_MK/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/mn_MN/link.lang b/htdocs/langs/mn_MN/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/mn_MN/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ms_MY/link.lang b/htdocs/langs/ms_MY/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ms_MY/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/my_MM/link.lang b/htdocs/langs/my_MM/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/my_MM/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/nb_NO/link.lang b/htdocs/langs/nb_NO/link.lang deleted file mode 100644 index d8f4d669605..00000000000 --- a/htdocs/langs/nb_NO/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Koble en ny fil/dokument -LinkedFiles=Koblede filer og dokumenter -NoLinkFound=Ingen registrerte koblinger -LinkComplete=Filkoblingen ble opprettet -ErrorFileNotLinked=Filen kunne ikke kobles -LinkRemoved=Koblingen til %s ble fjernet -ErrorFailedToDeleteLink= Klarte ikke å fjerne kobling'%s' -ErrorFailedToUpdateLink= Klarte ikke å oppdatere koblingen til '%s' -URLToLink=URL til link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ne_NP/link.lang b/htdocs/langs/ne_NP/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/ne_NP/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/nl_NL/link.lang b/htdocs/langs/nl_NL/link.lang deleted file mode 100644 index 3b82167aab4..00000000000 --- a/htdocs/langs/nl_NL/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Koppel een nieuw bestand/document -LinkedFiles=Gekoppelde bestanden en documenten -NoLinkFound=Geen geregistreerde koppelingen -LinkComplete=Het bestand is succesvol gekoppeld -ErrorFileNotLinked=Het bestand kon niet gekoppeld worden -LinkRemoved=De koppeling %s is verwijderd -ErrorFailedToDeleteLink= Kon de verbinding '%s' niet verwijderen -ErrorFailedToUpdateLink= Kon verbinding '%s' niet bijwerken -URLToLink=URL naar link -OverwriteIfExists=Overschrijf bestand indien aanwezig diff --git a/htdocs/langs/pl_PL/link.lang b/htdocs/langs/pl_PL/link.lang deleted file mode 100644 index f067994f757..00000000000 --- a/htdocs/langs/pl_PL/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Podepnij nowy plik/dokument -LinkedFiles=Podpięte pliki i dokumenty -NoLinkFound=Brak zarejestrowanych linków -LinkComplete=Plik został podlinkowany poprawnie -ErrorFileNotLinked=Plik nie mógł zostać podlinkowany -LinkRemoved=Link %s został usunięty -ErrorFailedToDeleteLink= Niemożna usunąc linku '%s' -ErrorFailedToUpdateLink= Niemożna uaktualnić linku '%s' -URLToLink=Adres URL linka -OverwriteIfExists=Zastąp plik, jeśli istnieje diff --git a/htdocs/langs/pt_BR/link.lang b/htdocs/langs/pt_BR/link.lang deleted file mode 100644 index f86a13d83c3..00000000000 --- a/htdocs/langs/pt_BR/link.lang +++ /dev/null @@ -1,10 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Vincular um novo arquivo/documento -LinkedFiles=Arquivos vinculados e documentos -NoLinkFound=Não há links registrados -LinkComplete=O arquivo foi associada com sucesso -ErrorFileNotLinked=O arquivo não pôde ser vinculado -LinkRemoved=A ligação %s foi removida -ErrorFailedToDeleteLink=Falha ao remover link '%s' -ErrorFailedToUpdateLink=Falha ao atualizar link '%s' -URLToLink=URL para link diff --git a/htdocs/langs/pt_MZ/link.lang b/htdocs/langs/pt_MZ/link.lang deleted file mode 100644 index f86a13d83c3..00000000000 --- a/htdocs/langs/pt_MZ/link.lang +++ /dev/null @@ -1,10 +0,0 @@ -# Dolibarr language file - Source file is en_US - link -LinkANewFile=Vincular um novo arquivo/documento -LinkedFiles=Arquivos vinculados e documentos -NoLinkFound=Não há links registrados -LinkComplete=O arquivo foi associada com sucesso -ErrorFileNotLinked=O arquivo não pôde ser vinculado -LinkRemoved=A ligação %s foi removida -ErrorFailedToDeleteLink=Falha ao remover link '%s' -ErrorFailedToUpdateLink=Falha ao atualizar link '%s' -URLToLink=URL para link diff --git a/htdocs/langs/pt_PT/link.lang b/htdocs/langs/pt_PT/link.lang deleted file mode 100644 index 49a5aaaef43..00000000000 --- a/htdocs/langs/pt_PT/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Associar um novo ficheiro/documento -LinkedFiles=Ficheiros e documentos associados -NoLinkFound=Nenhumas ligações registadas -LinkComplete=Os ficheiros foram ligados com sucesso -ErrorFileNotLinked=Os ficheiros não puderam ser ligados -LinkRemoved=A hiperligação %s foi removida -ErrorFailedToDeleteLink= falhou a remoção da ligação '%s' -ErrorFailedToUpdateLink= Falha na atualização de ligação '%s' -URLToLink=URL para hiperligação -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ro_RO/link.lang b/htdocs/langs/ro_RO/link.lang deleted file mode 100644 index 12147377aea..00000000000 --- a/htdocs/langs/ro_RO/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link fişier/document nou -LinkedFiles=Fişiere şi documente ataşate -NoLinkFound=Niciun link inregistrat -LinkComplete=Fişierul a fost ataşat cu succes -ErrorFileNotLinked=Fişierul nu a putut fi ataşat -LinkRemoved=Linkul %s a fost înlăturat -ErrorFailedToDeleteLink= Eşec la înlăturarea linkului '%s' -ErrorFailedToUpdateLink= Eşec la modificarea linkului '%s' -URLToLink=URL la link -OverwriteIfExists=Suprascrie dacă fişierul există diff --git a/htdocs/langs/ru_RU/link.lang b/htdocs/langs/ru_RU/link.lang deleted file mode 100644 index edfddc8994b..00000000000 --- a/htdocs/langs/ru_RU/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Создать ссылку на файл или документ -LinkedFiles=Ссылки на файлы и документы -NoLinkFound=Нет зарегистрированных ссылок -LinkComplete=Создана ссылка на файл -ErrorFileNotLinked=Не возможно создать ссылку на файл -LinkRemoved=Ссылка на файл %s удалена -ErrorFailedToDeleteLink= При удалении ссылки на файл '%s' возникла ошибка -ErrorFailedToUpdateLink= При обновлении ссылки на файл '%s' возникла ошибка -URLToLink=URL для ссылки -OverwriteIfExists=Перезаписать файл, если он существует diff --git a/htdocs/langs/sk_SK/link.lang b/htdocs/langs/sk_SK/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/sk_SK/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/sl_SI/link.lang b/htdocs/langs/sl_SI/link.lang deleted file mode 100644 index 8ec7ff7d758..00000000000 --- a/htdocs/langs/sl_SI/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Poveži novo datoteko/dokument -LinkedFiles=Povezane datoteke in dokumenti -NoLinkFound=Ni registriranih povezav -LinkComplete=Datoteka je bila uspešno povezana -ErrorFileNotLinked=Datoteke ni možno povezati -LinkRemoved=Povezava %s je bila odstranjena -ErrorFailedToDeleteLink= Napaka pri odstranitvi povezave '%s'. -ErrorFailedToUpdateLink= Napaka pri posodobitvi povezave '%s'. -URLToLink=URL za povezavo -OverwriteIfExists=Prepiši datoteko, če obstaja diff --git a/htdocs/langs/sq_AL/link.lang b/htdocs/langs/sq_AL/link.lang deleted file mode 100644 index 1ffcd41a18b..00000000000 --- a/htdocs/langs/sq_AL/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link a new file/document -LinkedFiles=Linked files and documents -NoLinkFound=No registered links -LinkComplete=The file has been linked successfully -ErrorFileNotLinked=The file could not be linked -LinkRemoved=The link %s has been removed -ErrorFailedToDeleteLink= Failed to remove link '%s' -ErrorFailedToUpdateLink= Failed to update link '%s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/sr_RS/link.lang b/htdocs/langs/sr_RS/link.lang deleted file mode 100644 index 36e3aaf6aea..00000000000 --- a/htdocs/langs/sr_RS/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Link ka novom fajlu/dokumentu -LinkedFiles=Linkovani fajlovi i dokumenti -NoLinkFound=Nema registrovanih linkova -LinkComplete=Fajl je uspešno linkovan -ErrorFileNotLinked=Fajl nije mogao biti linkovan -LinkRemoved=Link %s je uklonjen -ErrorFailedToDeleteLink= Greška prilikom uklanjanja linka '%s' -ErrorFailedToUpdateLink= Greška prilikom ažuriranja linka '%s' -URLToLink=URL za link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/sv_SE/link.lang b/htdocs/langs/sv_SE/link.lang deleted file mode 100644 index da38186f5b8..00000000000 --- a/htdocs/langs/sv_SE/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Länka en ny fil/dokument -LinkedFiles=Länkade filer och dokument -NoLinkFound=Inga registrerade länkar -LinkComplete=Filen har länkats -ErrorFileNotLinked=Filen kunde inte länkas -LinkRemoved=Länken %s har tagits bort -ErrorFailedToDeleteLink= Det gick inte att ta bort länk %s -ErrorFailedToUpdateLink= Det gick inte att uppdatera länken %s -URLToLink=URL för länk -OverwriteIfExists=Skriv över fil om den existerar diff --git a/htdocs/langs/sw_SW/link.lang b/htdocs/langs/sw_SW/link.lang deleted file mode 100644 index 4a4c19cb49c..00000000000 --- a/htdocs/langs/sw_SW/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Unganisha faili/hati mpya -LinkedFiles=Faili na hati zilizounganishwa -NoLinkFound=Hakuna viungo vilivyosajiliwa -LinkComplete=Faili imeunganishwa kwa mafanikio -ErrorFileNotLinked=Faili haikuweza kuunganishwa -LinkRemoved=Kiungo %s imeondolewa -ErrorFailedToDeleteLink= Imeshindwa kuondoa kiungo ' %s ' -ErrorFailedToUpdateLink= Imeshindwa kusasisha kiungo ' %s ' -URLToLink=URL ya kuunganisha -OverwriteIfExists=Batilisha faili ikiwa ipo diff --git a/htdocs/langs/ta_IN/link.lang b/htdocs/langs/ta_IN/link.lang deleted file mode 100644 index 177caf7ef14..00000000000 --- a/htdocs/langs/ta_IN/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=புதிய கோப்பு/ஆவணத்தை இணைக்கவும் -LinkedFiles=இணைக்கப்பட்ட கோப்புகள் மற்றும் ஆவணங்கள் -NoLinkFound=பதிவு செய்யப்பட்ட இணைப்புகள் இல்லை -LinkComplete=கோப்பு வெற்றிகரமாக இணைக்கப்பட்டது -ErrorFileNotLinked=கோப்பை இணைக்க முடியவில்லை -LinkRemoved=%s இணைப்பு அகற்றப்பட்டது -ErrorFailedToDeleteLink= ' %s ' இணைப்பை அகற்ற முடியவில்லை -ErrorFailedToUpdateLink= ' %s ' இணைப்பைப் புதுப்பிக்க முடியவில்லை -URLToLink=இணைக்க வேண்டிய URL -OverwriteIfExists=கோப்பு இருந்தால் மேலெழுதவும் diff --git a/htdocs/langs/tg_TJ/link.lang b/htdocs/langs/tg_TJ/link.lang deleted file mode 100644 index d9f2ddbfd93..00000000000 --- a/htdocs/langs/tg_TJ/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Файл/ҳуҷҷати навро пайванд кунед -LinkedFiles=Ҳуҷҷатҳо ва файлҳои алоқаманд -NoLinkFound=Истинодҳои ба қайд гирифташуда вуҷуд надоранд -LinkComplete=Файл бомуваффақият пайваст карда шуд -ErrorFileNotLinked=Файлро пайванд кардан ғайриимкон буд -LinkRemoved=Истиноди %s хориҷ карда шуд -ErrorFailedToDeleteLink= Истиноди ' %s ' хориҷ карда нашуд -ErrorFailedToUpdateLink= Истиноди ' %s ' навсозӣ карда нашуд -URLToLink=URL барои пайванд -OverwriteIfExists=Агар мавҷуд бошад, файлро аз нав сабт кунед diff --git a/htdocs/langs/th_TH/link.lang b/htdocs/langs/th_TH/link.lang deleted file mode 100644 index 7a1e16ba362..00000000000 --- a/htdocs/langs/th_TH/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=เชื่อมโยงไฟล์ใหม่ / เอกสาร -LinkedFiles=แฟ้มที่เชื่อมโยงและเอกสาร -NoLinkFound=ไม่มีการเชื่อมโยงลงทะเบียน -LinkComplete=ไฟล์ที่ได้รับการประสบความสำเร็จในการเชื่อมโยง -ErrorFileNotLinked=ไฟล์ไม่สามารถเชื่อมโยง -LinkRemoved=การเชื่อมโยง% s ได้ถูกลบออก -ErrorFailedToDeleteLink= ล้มเหลวในการลบการเชื่อมโยง '% s' -ErrorFailedToUpdateLink= ล้มเหลวในการปรับปรุงการเชื่อมโยง '% s' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/tr_TR/link.lang b/htdocs/langs/tr_TR/link.lang deleted file mode 100644 index 646d610a408..00000000000 --- a/htdocs/langs/tr_TR/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Yeni bir dosya/belge bağlantıla -LinkedFiles=Bağlantılı dosyalar ve belgeler -NoLinkFound=Kayıtlı bağlantı yok -LinkComplete=Dosya bağlantısı başarılı -ErrorFileNotLinked=Dosya bağlantılanamadı -LinkRemoved=%s bağlantısı kaldırıldı -ErrorFailedToDeleteLink= '%s' bağlantısı kaldırılamadı -ErrorFailedToUpdateLink= '%s' bağlantısı güncellenemedi -URLToLink=Bağlantılanalıcak URL -OverwriteIfExists=Dosya varsa üzerine yaz diff --git a/htdocs/langs/uk_UA/link.lang b/htdocs/langs/uk_UA/link.lang deleted file mode 100644 index 8fde3beae63..00000000000 --- a/htdocs/langs/uk_UA/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Зв’язати новий файл/документ -LinkedFiles=Пов’язані файли та документи -NoLinkFound=Немає зареєстрованих посилань -LinkComplete=Файл успішно пов’язано -ErrorFileNotLinked=Не вдалося зв’язати файл -LinkRemoved=Посилання %s видалено -ErrorFailedToDeleteLink= Не вдалося видалити посилання " %s " -ErrorFailedToUpdateLink= Не вдалося оновити посилання " %s " -URLToLink=URL для посилання -OverwriteIfExists=Перезаписати файл, якщо він існує diff --git a/htdocs/langs/ur_PK/link.lang b/htdocs/langs/ur_PK/link.lang deleted file mode 100644 index 256f4dc462b..00000000000 --- a/htdocs/langs/ur_PK/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=ایک نئی فائل/دستاویز سے لنک کریں۔ -LinkedFiles=منسلک فائلیں اور دستاویزات -NoLinkFound=کوئی رجسٹرڈ لنکس نہیں۔ -LinkComplete=فائل کو کامیابی سے جوڑ دیا گیا ہے۔ -ErrorFileNotLinked=فائل کو لنک نہیں کیا جا سکا -LinkRemoved=لنک %s ہٹا دیا گیا ہے۔ -ErrorFailedToDeleteLink= لنک ' %s ' کو ہٹانے میں ناکام -ErrorFailedToUpdateLink= لنک ' %s ' کو اپ ڈیٹ کرنے میں ناکام -URLToLink=لنک کرنے کے لیے URL -OverwriteIfExists=اگر موجود ہو تو فائل کو اوور رائٹ کریں۔ diff --git a/htdocs/langs/uz_UZ/link.lang b/htdocs/langs/uz_UZ/link.lang deleted file mode 100644 index e37e7f0be18..00000000000 --- a/htdocs/langs/uz_UZ/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Yangi fayl / hujjatni bog'lang -LinkedFiles=Bog'langan fayllar va hujjatlar -NoLinkFound=Ro'yxatdan o'tgan havolalar yo'q -LinkComplete=Fayl muvaffaqiyatli ulandi -ErrorFileNotLinked=Faylni ulab bo‘lmadi -LinkRemoved=%s havolasi o'chirildi -ErrorFailedToDeleteLink= ' %s ' havolasi o'chirilmadi -ErrorFailedToUpdateLink= ' %s ' havolasi yangilanmadi -URLToLink=Ulanish uchun URL -OverwriteIfExists=Agar mavjud bo'lsa, faylni qayta yozing diff --git a/htdocs/langs/vi_VN/link.lang b/htdocs/langs/vi_VN/link.lang deleted file mode 100644 index bacbeaf98e2..00000000000 --- a/htdocs/langs/vi_VN/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=Liên kết một tập tin / tài liệu mới -LinkedFiles=Các tập tin và tài liệu được liên kết -NoLinkFound=Không có liên kết đã đăng ký -LinkComplete=Các tập tin đã được liên kết thành công -ErrorFileNotLinked=Các tập tin không thể được liên kết -LinkRemoved=Liên kết %s đã bị xóa -ErrorFailedToDeleteLink= Không thể xóa liên kết ' %s ' -ErrorFailedToUpdateLink= Không thể cập nhật liên kết ' %s ' -URLToLink=URL để liên kết -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/zh_CN/link.lang b/htdocs/langs/zh_CN/link.lang deleted file mode 100644 index 00f14808c56..00000000000 --- a/htdocs/langs/zh_CN/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=链接一份新文件/文档 -LinkedFiles=链接文件和文档 -NoLinkFound=无注册链接 -LinkComplete=文件链接成功 -ErrorFileNotLinked=文件无法链接 -LinkRemoved=链接 %s 已移除 -ErrorFailedToDeleteLink= 移除链接失败 '%s' -ErrorFailedToUpdateLink= 更新链接失败 '%s' -URLToLink=URL网址超链接 -OverwriteIfExists=如果存在就覆盖文件 diff --git a/htdocs/langs/zh_HK/link.lang b/htdocs/langs/zh_HK/link.lang deleted file mode 100644 index 3205abcd1be..00000000000 --- a/htdocs/langs/zh_HK/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=鏈接新文件/文檔 -LinkedFiles=鏈接的文件和文檔 -NoLinkFound=沒有註冊鏈接 -LinkComplete=文件已鏈接成功 -ErrorFileNotLinked=該文件無法鏈接 -LinkRemoved=鏈接%s 已被刪除 -ErrorFailedToDeleteLink= 無法刪除鏈接“”\n %s ' -ErrorFailedToUpdateLink= 無法更新鏈接“”\n %s ' -URLToLink=URL to link -OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/zh_TW/link.lang b/htdocs/langs/zh_TW/link.lang deleted file mode 100644 index 23949b86a29..00000000000 --- a/htdocs/langs/zh_TW/link.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - languages -LinkANewFile=連接新文件/檔案 -LinkedFiles=連接新文件/檔案(複數) -NoLinkFound=沒有註冊連線 -LinkComplete=此文件已成功連接 -ErrorFileNotLinked=此文件無法連接 -LinkRemoved=此連線%s已被刪除 -ErrorFailedToDeleteLink= 無法刪除連線“ %s ” -ErrorFailedToUpdateLink= 無法更新連線' %s' -URLToLink=連線網址 -OverwriteIfExists=Overwrite file if exists From 5b4eac734bb2974aec64f97489feaf536dd584d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20Le=20Doar=C3=A9?= Date: Thu, 7 Sep 2023 09:28:20 +0000 Subject: [PATCH 26/69] Fix #25613 --- htdocs/core/class/smtps.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index ee886b5bb83..0ab9bd3ef8d 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -653,6 +653,7 @@ class SMTPs { global $conf; + require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; /** * Default return value */ From b61998ec4b476904b3df11a20a790eb49700e383 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Sep 2023 12:13:10 +0200 Subject: [PATCH 27/69] Log --- htdocs/emailcollector/class/emailcollector.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index f20d21463af..8a3e2634699 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -3225,6 +3225,7 @@ class EmailCollector extends CommonObject } else { $langs->load("admin"); $output = $langs->trans('NoNewEmailToProcess'); + $output .= ' (defaultlang='.$langs->defaultlang.')'; } // Disconnect From 53d43ab50f4bfa2457b9fa2270a3715b5e491bc7 Mon Sep 17 00:00:00 2001 From: atm-florian Date: Thu, 7 Sep 2023 14:47:47 +0200 Subject: [PATCH 28/69] FIX 17.0 PHP8: supplier invoice class: - use declared attribute socid instead of fk_soc - fk_project should be null, not 0 (would break constraint) --- htdocs/fourn/class/fournisseur.facture.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index ca81a778fee..e5c7c0097e5 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -938,7 +938,7 @@ class FactureFournisseur extends CommonInvoice $this->ref_ext = $obj->ref_ext; $this->entity = $obj->entity; $this->type = empty($obj->type) ? self::TYPE_STANDARD : $obj->type; - $this->fk_soc = $obj->fk_soc; + $this->socid = $obj->fk_soc; $this->datec = $this->db->jdate($obj->datec); $this->date = $this->db->jdate($obj->datef); $this->datep = $this->db->jdate($obj->datef); @@ -1161,8 +1161,8 @@ class FactureFournisseur extends CommonInvoice if (isset($this->type)) { $this->type = trim($this->type); } - if (isset($this->fk_soc)) { - $this->fk_soc = trim($this->fk_soc); + if (isset($this->socid)) { + $this->socid = trim($this->socid); } if (isset($this->label)) { $this->label = trim($this->label); @@ -1242,14 +1242,14 @@ class FactureFournisseur extends CommonInvoice $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " entity=".(isset($this->entity) ? ((int) $this->entity) : "null").","; $sql .= " type=".(isset($this->type) ? ((int) $this->type) : "null").","; - $sql .= " fk_soc=".(isset($this->fk_soc) ? ((int) $this->fk_soc) : "null").","; + $sql .= " fk_soc=".(isset($this->socid) ? ((int) $this->socid) : "null").","; $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').","; $sql .= " datef=".(dol_strlen($this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').","; if (dol_strlen($this->tms) != 0) { $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; } $sql .= " libelle=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; - $sql .= " paye=".(isset($this->paye) ? ((int) $this->paye) : "null").","; + $sql .= " paye=".(isset($this->paye) ? ((int) $this->paye) : "0").","; $sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").","; $sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").","; $sql .= " localtax1=".(isset($this->localtax1) ? ((float) $this->localtax1) : "null").","; @@ -1261,7 +1261,7 @@ class FactureFournisseur extends CommonInvoice $sql .= " fk_user_author=".(isset($this->author) ? ((int) $this->author) : "null").","; $sql .= " fk_user_valid=".(isset($this->fk_user_valid) ? ((int) $this->fk_user_valid) : "null").","; $sql .= " fk_facture_source=".($this->fk_facture_source ? ((int) $this->fk_facture_source) : "null").","; - $sql .= " fk_projet=".(isset($this->fk_project) ? ((int) $this->fk_project) : "null").","; + $sql .= " fk_projet=".(! empty($this->fk_project) ? ((int) $this->fk_project) : "null").","; $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? ((int) $this->cond_reglement_id) : "null").","; $sql .= " date_lim_reglement=".(dol_strlen($this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').","; $sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; From 822981b5616e4379d5237ee8d7fd74559e7c8f4a Mon Sep 17 00:00:00 2001 From: tnegre Date: Thu, 7 Sep 2023 16:56:29 +0200 Subject: [PATCH 29/69] FIX payment : language is not propagated to following pages --- htdocs/public/payment/newpayment.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 208134a1f6a..df57986505b 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -97,6 +97,7 @@ if (!GETPOST("currency", 'alpha')) { } $source = GETPOST("s", 'aZ09') ?GETPOST("s", 'aZ09') : GETPOST("source", 'aZ09'); $download = GETPOST('d', 'int') ?GETPOST('d', 'int') : GETPOST('download', 'int'); +$getpostlang = GETPOST('lang', 'aZ09'); if (!$action) { if (!GETPOST("amount", 'alpha') && !$source) { @@ -242,6 +243,10 @@ if (!empty($entity)) { $urlok .= 'e='.urlencode($entity).'&'; $urlko .= 'e='.urlencode($entity).'&'; } +if (!empty($getpostlang)) { + $urlok .= 'lang='.urlencode($getpostlang).'&'; + $urlko .= 'lang='.urlencode($getpostlang).'&'; +} $urlok = preg_replace('/&$/', '', $urlok); // Remove last & $urlko = preg_replace('/&$/', '', $urlko); // Remove last & @@ -814,7 +819,7 @@ $form = new Form($db); $head = ''; if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) { - $head = ''."\n"; + $head = ''."\n"; } $conf->dol_hide_topmenu = 1; @@ -853,6 +858,7 @@ print ''."\n"; print ''; print ''; +print ''; print "\n"; @@ -2105,6 +2111,7 @@ if ($action != 'dopayment') { } if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) { + if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) { $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; } @@ -2209,6 +2216,7 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme print ''; print ''; print ''; + print ''; if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || !empty($conf->global->STRIPE_USE_NEW_CHECKOUT)) { // Use a SCA ready method require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; From 862f10f7fdda3f0eb750a007c16c7bad485589f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Sep 2023 17:28:51 +0200 Subject: [PATCH 30/69] Fix error management --- htdocs/compta/prelevement/class/bonprelevement.class.php | 7 +++++-- htdocs/compta/prelevement/create.php | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 455e1c7972c..da35df53876 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -895,6 +895,8 @@ class BonPrelevement extends CommonObject $factures_errors = array(); if (!$error) { + dol_syslog(__METHOD__." Read invoices for did=".((int) $did), LOG_DEBUG); + $sql = "SELECT f.rowid, pd.rowid as pfdrowid, f.fk_soc"; $sql .= ", pfd.code_banque, pfd.code_guichet, pfd.number, pfd.cle_rib"; $sql .= ", pfd.amount"; @@ -919,7 +921,6 @@ class BonPrelevement extends CommonObject if ($did > 0) { $sql .= " AND pd.rowid = ".((int) $did); } - dol_syslog(__METHOD__." Read invoices,", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -941,7 +942,9 @@ class BonPrelevement extends CommonObject dol_syslog(__METHOD__." Read invoices, ".$i." invoices to withdraw", LOG_DEBUG); } else { $error++; - dol_syslog(__METHOD__." Read invoices error ".$this->db->error(), LOG_ERR); + $this->error = $this->db->lasterror(); + dol_syslog(__METHOD__." Read invoices error ".$this->db->lasterror(), LOG_ERR); + return -1; } } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 62d84cd444c..2555ab9d37e 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -128,6 +128,7 @@ if (empty($reshook)) { if (!$error) { // getDolGlobalString('PRELEVEMENT_CODE_BANQUE') and getDolGlobalString('PRELEVEMENT_CODE_GUICHET') should be empty (we don't use them anymore) $result = $bprev->create(getDolGlobalString('PRELEVEMENT_CODE_BANQUE'), getDolGlobalString('PRELEVEMENT_CODE_GUICHET'), $mode, $format, $executiondate, 0, $type); + if ($result < 0) { setEventMessages($bprev->error, $bprev->errors, 'errors'); } elseif ($result == 0) { From 66a4433896d001bc461f82a0ba2b45d999f7b6ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Sep 2023 17:39:54 +0200 Subject: [PATCH 31/69] Fix regression --- htdocs/compta/prelevement/class/bonprelevement.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index da35df53876..724cf5ff8fc 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -898,8 +898,8 @@ class BonPrelevement extends CommonObject dol_syslog(__METHOD__." Read invoices for did=".((int) $did), LOG_DEBUG); $sql = "SELECT f.rowid, pd.rowid as pfdrowid, f.fk_soc"; - $sql .= ", pfd.code_banque, pfd.code_guichet, pfd.number, pfd.cle_rib"; - $sql .= ", pfd.amount"; + $sql .= ", pd.code_banque, pd.code_guichet, pd.number, pd.cle_rib"; + $sql .= ", pd.amount"; $sql .= ", s.nom as name"; $sql .= ", f.ref, sr.bic, sr.iban_prefix, sr.frstrecur"; if ($type != 'bank-transfer') { @@ -968,7 +968,7 @@ class BonPrelevement extends CommonObject if ($resfetch >= 0) { // Field 0 of $fac is rowid of invoice */ - // Check if $fac[8] s.nom is null + // Check if $fac[8] s.nom is null if ($fac[8] != null) { //$bac = new CompanyBankAccount($this->db); //$bac->fetch(0, $soc->id); From d3f3147de39f0e56a69ca46dae4263d56298a906 Mon Sep 17 00:00:00 2001 From: Can Arslan <138895927+mc2rcanarslan@users.noreply.github.com> Date: Thu, 7 Sep 2023 12:53:50 -0600 Subject: [PATCH 32/69] fix: unknown column error on generated product sql --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ff3115ee40b..e31cce2234b 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2817,7 +2817,7 @@ class Product extends CommonObject $sql .= " FROM ".$this->db->prefix()."mrp_mo as c"; $sql .= " INNER JOIN ".$this->db->prefix()."mrp_production as mp ON mp.fk_mo=c.rowid"; if (empty($user->rights->societe->client->voir) && !$socid) { - $sql .= "INNER JOIN ".$this->db->prefix()."societe_commerciaux as sc ON sc.fk_soc=c.fk_soc AND sc.fk_user = ".((int) $user->id); + $sql .= " INNER JOIN ".$this->db->prefix()."societe_commerciaux as sc ON sc.fk_soc=c.fk_soc AND sc.fk_user = ".((int) $user->id); } $sql .= " WHERE "; $sql .= " c.entity IN (".getEntity('mo').")"; From 3073a98563778ab566afb6ee1e287054afeaf4e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 01:28:11 +0200 Subject: [PATCH 33/69] Fix creation of subdir for website --- htdocs/core/lib/functions.lib.php | 3 ++- htdocs/website/class/website.class.php | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3508fa865a5..0794dfb9955 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6934,7 +6934,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = ' * Creation of a directory (this can create recursive subdir) * * @param string $dir Directory to create (Separator must be '/'. Example: '/mydir/mysubdir') - * @param string $dataroot Data root directory (To avoid having the data root in the loop. Using this will also lost the warning on first dir PHP has no permission when open_basedir is used) + * @param string $dataroot Data root directory (To avoid having the data root in the loop. Using this will also lost the warning, on first dir, saying PHP has no permission when open_basedir is used) * @param string $newmask Mask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444' * @return int < 0 if KO, 0 = already exists, > 0 if OK */ @@ -6967,6 +6967,7 @@ function dol_mkdir($dir, $dataroot = '', $newmask = '') } else { $ccdir .= $cdir[$i]; } + $regs = array(); if (preg_match("/^.:$/", $ccdir, $regs)) { continue; // Si chemin Windows incomplet, on poursuit par rep suivant } diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 9e3237b0a1d..09ca7e21639 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -255,7 +255,7 @@ class Website extends CommonObject if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - // Create subdirectory per language + // Create a subdirectory for each language (except main language) $tmplangarray = explode(',', $this->otherlang); if (is_array($tmplangarray)) { dol_mkdir($conf->website->dir_output.'/'.$this->ref); @@ -263,10 +263,14 @@ class Website extends CommonObject if (trim($val) == $this->lang) { continue; } - dol_mkdir($conf->website->dir_output.'/'.$this->ref.'/'.trim($val)); + dol_mkdir($conf->website->dir_output.'/'.$this->ref.'/'.trim($val), DOL_DATA_ROOT); } } + // Create subdirectory for images and js + dol_mkdir($conf->medias->multidir_output[$conf->entity].'/image/'.$this->ref, DOL_DATA_ROOT); + dol_mkdir($conf->medias->multidir_output[$conf->entity].'/js/'.$this->ref, DOL_DATA_ROOT); + // Uncomment this and change WEBSITE to your own tag if you // want this action to call a trigger. // if (!$notrigger) { From 9ed7bb77cd8f28931182993efcf56592f5aa5ff1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 01:36:26 +0200 Subject: [PATCH 34/69] Sec: Increase list of not allowed function in dol_eval --- htdocs/core/lib/functions.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index dbd31e984cf..43c6747300a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9255,8 +9255,11 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' $forbiddenphpstrings = array('$$'); $forbiddenphpstrings = array_merge($forbiddenphpstrings, array('_ENV', '_SESSION', '_COOKIE', '_GET', '_POST', '_REQUEST')); - $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen", "eval", "dol_eval", "executeCLI", "verifCond", "base64_decode"); + $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen", "eval"); + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("dol_eval", "executeCLI", "verifCond")); // native dolibarr functions + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64_decode", "rawurldecode", "urldecode")); // decode string functions $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("fopen", "file_put_contents", "fputs", "fputscsv", "fwrite", "fpassthru", "require", "include", "mkdir", "rmdir", "symlink", "touch", "unlink", "umask")); + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("get_defined_functions", "get_defined_vars", "get_defined_constants", "get_declared_classes")); $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("function", "call_user_func")); $forbiddenphpregex = 'global\s+\$|\b('.implode('|', $forbiddenphpfunctions).')\b'; From 684c0b88b524ad4580fb68a83f9122538dc09fd4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 01:57:47 +0200 Subject: [PATCH 35/69] Sec: More robust call for dol_eval (with param '2') for computed fields --- htdocs/core/class/commonobject.class.php | 10 +++++----- htdocs/core/lib/functions.lib.php | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 56fe182f10b..16df81f610b 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6165,7 +6165,7 @@ abstract class CommonObject if (empty($conf->disable_compute)) { global $objectoffield; // We set a global variable to $objectoffield so $objectoffield = $this; // we can use it inside computed formula - $this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, ''); + $this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '2'); } } } @@ -6294,8 +6294,8 @@ abstract class CommonObject if (!empty($attrfieldcomputed)) { if (!empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { - $value = dol_eval($attrfieldcomputed, 1, 0, ''); - dol_syslog($langs->trans("Extrafieldcomputed")." sur ".$attributeLabel."(".$value.")", LOG_DEBUG); + $value = dol_eval($attrfieldcomputed, 1, 0, '2'); + dol_syslog($langs->trans("Extrafieldcomputed")." on ".$attributeLabel."(".$value.")", LOG_DEBUG); $new_array_options[$key] = $value; } else { $new_array_options[$key] = null; @@ -6675,7 +6675,7 @@ abstract class CommonObject if (!empty($attrfieldcomputed)) { if (!empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { - $value = dol_eval($attrfieldcomputed, 1, 0, ''); + $value = dol_eval($attrfieldcomputed, 1, 0, '2'); dol_syslog($langs->trans("Extrafieldcomputed")." sur ".$attributeLabel."(".$value.")", LOG_DEBUG); $this->array_options["options_".$key] = $value; } else { @@ -7597,7 +7597,7 @@ abstract class CommonObject if ($computed) { // Make the eval of compute string //var_dump($computed); - $value = dol_eval($computed, 1, 0, ''); + $value = dol_eval($computed, 1, 0, '2'); } if (empty($morecss)) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 43c6747300a..74ca8626850 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9196,8 +9196,8 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' // Test on dangerous char (used for RCE), we allow only characters to make PHP variable testing if ($onlysimplestring == '1') { // We must accept: '1 && getDolGlobalInt("doesnotexist1") && $conf->global->MAIN_FEATURES_LEVEL' - // We must accept: '$conf->barcode->enabled || preg_match(\'/^AAA/\',$leftmenu)' - // We must accept: '$user->rights->cabinetmed->read && !$object->canvas=="patient@cabinetmed"' + // We must accept: 'isModEnabled("barcode") || preg_match(\'/^AAA/\',$leftmenu)' + // We must accept: '$user->hasRight("cabinetmed", "read") && !$object->canvas=="patient@cabinetmed"' if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/@', '/').']/i', $s)) { if ($returnvalue) { return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s; @@ -9219,7 +9219,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' return ''; } // TODO - // We can exclude all parenthesis ( that are not '($db' and 'getDolGlobalInt(' and 'getDolGlobalString(' and 'preg_match(' and 'isModEnabled(' + // We can exclude all parenthesis ( that are not '($db' and 'getDolGlobalInt(' and 'getDolGlobalString(' and 'preg_match(' and 'isModEnabled(' and 'hasRight(' // ... } } From 0c588ccd60eee620ad182ef947fd73047ea31339 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 01:36:26 +0200 Subject: [PATCH 36/69] Sec: Increase list of not allowed function in dol_eval --- htdocs/core/lib/functions.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0794dfb9955..35260c813f8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9246,8 +9246,11 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' $forbiddenphpstrings = array('$$'); $forbiddenphpstrings = array_merge($forbiddenphpstrings, array('_ENV', '_SESSION', '_COOKIE', '_GET', '_POST', '_REQUEST')); - $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen", "eval", "dol_eval", "executeCLI", "verifCond", "base64_decode"); + $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen", "eval"); + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("dol_eval", "executeCLI", "verifCond")); // native dolibarr functions + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64_decode", "rawurldecode", "urldecode")); // decode string functions $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("fopen", "file_put_contents", "fputs", "fputscsv", "fwrite", "fpassthru", "require", "include", "mkdir", "rmdir", "symlink", "touch", "unlink", "umask")); + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("get_defined_functions", "get_defined_vars", "get_defined_constants", "get_declared_classes")); $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("function", "call_user_func")); $forbiddenphpregex = 'global\s+\$|\b('.implode('|', $forbiddenphpfunctions).')\b'; From 32837761b5453ea34029da80c0d07acf899d96fd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 01:36:26 +0200 Subject: [PATCH 37/69] Sec: Increase list of not allowed function in dol_eval --- htdocs/core/lib/functions.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index aa63097d2ec..c33326ad0ec 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9024,8 +9024,11 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' $forbiddenphpstrings = array('$$'); $forbiddenphpstrings = array_merge($forbiddenphpstrings, array('_ENV', '_SESSION', '_COOKIE', '_GET', '_POST', '_REQUEST')); - $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen", "eval", "dol_eval", "executeCLI", "verifCond", "base64_decode"); + $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen", "eval"); + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("dol_eval", "executeCLI", "verifCond")); // native dolibarr functions + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64_decode", "rawurldecode", "urldecode")); // decode string functions $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("fopen", "file_put_contents", "fputs", "fputscsv", "fwrite", "fpassthru", "require", "include", "mkdir", "rmdir", "symlink", "touch", "unlink", "umask")); + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("get_defined_functions", "get_defined_vars", "get_defined_constants", "get_declared_classes")); $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("function", "call_user_func")); $forbiddenphpregex = 'global\s+\$|\b('.implode('|', $forbiddenphpfunctions).')\b'; From c2f8c4f47c7520d196101ecef1e9abe338e699e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 02:29:20 +0200 Subject: [PATCH 38/69] Sec: param onlysimplestring is always 1 or 2 --- htdocs/core/boxes/box_scheduled_jobs.php | 2 +- htdocs/core/lib/functions.lib.php | 6 +++++- htdocs/core/tpl/extrafields_list_print_fields.tpl.php | 2 +- htdocs/public/ticket/list.php | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/core/boxes/box_scheduled_jobs.php b/htdocs/core/boxes/box_scheduled_jobs.php index f0868036e9d..7073e886301 100644 --- a/htdocs/core/boxes/box_scheduled_jobs.php +++ b/htdocs/core/boxes/box_scheduled_jobs.php @@ -103,7 +103,7 @@ class box_scheduled_jobs extends ModeleBoxes while ($i < $num) { $objp = $this->db->fetch_object($result); - if (dol_eval($objp->test, 1, 1, '')) { + if (dol_eval($objp->test, 1, 1, '2')) { $nextrun = $this->db->jdate($objp->datenextrun); if (empty($nextrun)) { $nextrun = $this->db->jdate($objp->datestart); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 74ca8626850..6d5073aae58 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9175,7 +9175,7 @@ function verifCond($strToEvaluate) * @param string $s String to evaluate * @param int $returnvalue 0=No return (used to execute eval($a=something)). 1=Value of eval is returned (used to eval($something)). * @param int $hideerrors 1=Hide errors - * @param string $onlysimplestring '0' (used for computed property of extrafields)=Accept all chars, '1' (most common use)=Accept only simple string with char 'a-z0-9\s^$_+-.*>&|=!?():"\',/@';', '2' (rarely used)=Accept also '[]' + * @param string $onlysimplestring '0' (deprecated, used for computed property of extrafields)=Accept all chars, '1' (most common use)=Accept only simple string with char 'a-z0-9\s^$_+-.*>&|=!?():"\',/@';', '2' (rarely used)=Accept also '[]' * @return mixed Nothing or return result of eval */ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1') @@ -9192,6 +9192,10 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' global $obj; // To get $obj used into list when dol_eval is used for computed fields and $obj is not yet $object global $soc; // For backward compatibility + if (!in_array($onlysimplestring, array('0', '1', '2'))) { + return 'Bad call of dol_eval. Parameter onlysimplestring must be 0, 1 or 2'; + } + try { // Test on dangerous char (used for RCE), we allow only characters to make PHP variable testing if ($onlysimplestring == '1') { diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index cf6a3b35648..0f0add8e9ae 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -35,7 +35,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield // If field is a computed field, we make computation to get value if ($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]) { $objectoffield = $object; //For compatibily with the computed formula - $value = dol_eval($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key], 1, 1, '0'); + $value = dol_eval($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key], 1, 1, '2'); if (is_numeric(price2num($value)) && $extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key]) { $obj->$tmpkey = price2num($value); } diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 954e2428cfe..ccf0b992e29 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -266,7 +266,7 @@ if ($action == "view_ticketlist") { if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate') { - $enabled = abs(dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1, 1, 0)); + $enabled = abs(dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1, 1, '2')); $enabled = (($enabled == 0 || $enabled == 3) ? 0 : $enabled); $arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' => $enabled && $extrafields->attributes[$object->table_element]['perms'][$key]); } From 7819b9586df53e7d54949e79baa2e0f700777223 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 04:22:24 +0200 Subject: [PATCH 39/69] Exclude more exec functions --- htdocs/core/lib/functions.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c33326ad0ec..3e674184c5e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9024,12 +9024,13 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' $forbiddenphpstrings = array('$$'); $forbiddenphpstrings = array_merge($forbiddenphpstrings, array('_ENV', '_SESSION', '_COOKIE', '_GET', '_POST', '_REQUEST')); - $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen", "eval"); + $forbiddenphpfunctions = array("exec", "passthru", "shell_exec", "system", "proc_open", "popen"); $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("dol_eval", "executeCLI", "verifCond")); // native dolibarr functions - $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64_decode", "rawurldecode", "urldecode")); // decode string functions + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("base64_decode", "rawurldecode", "urldecode")); // decode string functions $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("fopen", "file_put_contents", "fputs", "fputscsv", "fwrite", "fpassthru", "require", "include", "mkdir", "rmdir", "symlink", "touch", "unlink", "umask")); $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("get_defined_functions", "get_defined_vars", "get_defined_constants", "get_declared_classes")); $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("function", "call_user_func")); + $forbiddenphpfunctions = array_merge($forbiddenphpfunctions, array("eval", "create_function", "assert", "mb_ereg_replace")); // function with eval capabilities $forbiddenphpregex = 'global\s+\$|\b('.implode('|', $forbiddenphpfunctions).')\b'; From e9787451a82bd89727939a4f39e54a8faedffd28 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 05:51:06 +0200 Subject: [PATCH 40/69] Disallow more use of parenthesis into dol_eval --- ChangeLog | 1 + htdocs/core/lib/functions.lib.php | 86 ++++++++++++++++++++++------ htdocs/core/lib/security.lib.php | 22 +++---- htdocs/core/modules/modApi.class.php | 1 - test/phpunit/SecurityTest.php | 18 +++++- 5 files changed, 96 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82771d980ab..0e57d0be48a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ Following changes may create regressions for some external modules, but were nec * The method get_substitutionarray_shipment_lines() has been removed. Use the generic get_substitutionarray_lines() instead. * Recheck setup of your module workflow to see if you need to enable the new setting to have shipment set to billed automatically when an invoice from a shipment is validated (and if your process is to make invoice on shipment and not on order). +* It was possible to use a variable $soc or $right inside a php code condition of some extrafields properties, this is no more true (this vars are no more defined globaly). ***** ChangeLog for 18.0.1 compared to 18.0.0 ***** diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6d5073aae58..2ae73a96a64 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9145,6 +9145,33 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = } } +/** + * Check if a variable with name $var start with $text. + * Can be used to forge dol_eval() conditions. + * + * @param $var string Variable + * @param $regextext string Text that must be a valid regex string + * @param $matchrule int 1=Test if start with, 0=Test if equal + * @return boolean|string True or False, text if bad use. + */ +function isStringVarMatching($var, $regextext, $matchrule = 1) +{ + if ($matchrule == 1) { + if ($var == 'mainmenu') { + global $mainmenu; + return (preg_match('/^'.$regextext.'/', $mainmenu)); + } elseif ($var == 'leftmenu') { + global $leftmenu; + return (preg_match('/^'.$regextext.'/', $leftmenu)); + } else { + return 'This variable is not accessible with dol_eval'; + } + } else { + return 'This value for matchrule is not implemented'; + } +} + + /** * Verify if condition in string is ok or not * @@ -9153,15 +9180,15 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = */ function verifCond($strToEvaluate) { - global $user, $conf, $langs; + global $conf; // Read of const is done with getDolGlobalString() but we need $conf->currency for example + global $user, $langs; global $leftmenu; - global $rights; // To export to dol_eval function //print $strToEvaluate."
\n"; $rights = true; if (isset($strToEvaluate) && $strToEvaluate !== '') { //var_dump($strToEvaluate); - $rep = dol_eval($strToEvaluate, 1, 1, '1'); // The dol_eval must contains all the global $xxx for all variables $xxx found into the string condition + $rep = dol_eval($strToEvaluate, 1, 1, '1'); // The dol_eval() must contains all the "global $xxx;" for all variables $xxx found into the string condition $rights = $rep && (!is_string($rep) || strpos($rep, 'Bad string syntax to evaluate') === false); //var_dump($rights); } @@ -9175,32 +9202,35 @@ function verifCond($strToEvaluate) * @param string $s String to evaluate * @param int $returnvalue 0=No return (used to execute eval($a=something)). 1=Value of eval is returned (used to eval($something)). * @param int $hideerrors 1=Hide errors - * @param string $onlysimplestring '0' (deprecated, used for computed property of extrafields)=Accept all chars, '1' (most common use)=Accept only simple string with char 'a-z0-9\s^$_+-.*>&|=!?():"\',/@';', '2' (rarely used)=Accept also '[]' + * @param string $onlysimplestring '0' (deprecated, used for computed property of extrafields)=Accept all chars, + * '1' (most common use)=Accept only simple string with char 'a-z0-9\s^$_+-.*>&|=!?():"\',/@';', + * '2' (rarely used)=Accept also '[]' * @return mixed Nothing or return result of eval + * @see verifCond() */ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1') { - // Only global variables can be changed by eval function and returned to caller - global $db, $langs, $user, $conf, $website, $websitepage; + // Only this global variables can be read by eval function and returned to caller + global $conf; // Read of const is done with getDolGlobalString() but we need $conf->currency for example + global $db, $langs, $user, $website, $websitepage; global $action, $mainmenu, $leftmenu; global $mysoc; - global $objectoffield; + global $objectoffield; // To allow the use of $objectoffield in computed fields // Old variables used - global $rights; global $object; - global $obj; // To get $obj used into list when dol_eval is used for computed fields and $obj is not yet $object - global $soc; // For backward compatibility + global $obj; // To get $obj used into list when dol_eval() is used for computed fields and $obj is not yet $object + //global $rights; + //global $soc; // For backward compatibility if (!in_array($onlysimplestring, array('0', '1', '2'))) { - return 'Bad call of dol_eval. Parameter onlysimplestring must be 0, 1 or 2'; + return "Bad call of dol_eval. Parameter onlysimplestring must be '0' (deprecated), '1' or '2'"; } try { // Test on dangerous char (used for RCE), we allow only characters to make PHP variable testing if ($onlysimplestring == '1') { - // We must accept: '1 && getDolGlobalInt("doesnotexist1") && $conf->global->MAIN_FEATURES_LEVEL' - // We must accept: 'isModEnabled("barcode") || preg_match(\'/^AAA/\',$leftmenu)' + // We must accept: '1 && getDolGlobalInt("doesnotexist1") && getDolGlobalString("MAIN_FEATURES_LEVEL")' // We must accept: '$user->hasRight("cabinetmed", "read") && !$object->canvas=="patient@cabinetmed"' if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/@', '/').']/i', $s)) { if ($returnvalue) { @@ -9209,10 +9239,21 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' dol_syslog('Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s); return ''; } - // TODO - // We can exclude all parenthesis ( that are not '($db' and 'getDolGlobalInt(' and 'getDolGlobalString(' and 'preg_match(' and 'isModEnabled(' - // ... } + $scheck = preg_replace('/->[a-zA-Z0-9_]+\(/', '->__METHOD__', $s); + $scheck = preg_replace('/\s[a-zA-Z0-9_]+\(/', ' __FUNCTION__', $scheck); + $scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)') + //print 'scheck='.$scheck." : ".strpos($scheck, '(')."\n"; + if (strpos($scheck, '(') !== false) { + if ($returnvalue) { + return 'Bad string syntax to evaluate (found call of a function or method without using direct name): '.$s; + } else { + dol_syslog('Bad string syntax to evaluate (found call of a function or method without using direct name): '.$s); + return ''; + } + } + // TODO + // We can exclude $ char that are not: $db, $langs, $leftmenu, $topmenu, $user, $langs, $objectoffield, $object..., } elseif ($onlysimplestring == '2') { // We must accept: (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref : "Parent project not found" if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/@[]', '/').']/i', $s)) { @@ -9222,10 +9263,17 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' dol_syslog('Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s); return ''; } - // TODO - // We can exclude all parenthesis ( that are not '($db' and 'getDolGlobalInt(' and 'getDolGlobalString(' and 'preg_match(' and 'isModEnabled(' and 'hasRight(' - // ... } + if (strpos($scheck, '(') !== false) { + if ($returnvalue) { + return 'Bad string syntax to evaluate (found call of a function or method without using direct name): '.$s; + } else { + dol_syslog('Bad string syntax to evaluate (found call of a function or method without using direct name): '.$s); + return ''; + } + } + // TODO + // We can exclude $ char that are not: $db, $leftmenu, $topmenu, $user, $langs, $object..., } if (is_array($s) || $s === 'Array') { return 'Bad string syntax to evaluate (value is Array) '.var_export($s, true); diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 7818b9d2e7e..0a2d2572889 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -434,19 +434,21 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '', // Get more permissions checks from hooks $parameters = array('features'=>$features, 'originalfeatures'=>$originalfeatures, 'objectid'=>$objectid, 'dbt_select'=>$dbt_select, 'idtype'=>$dbt_select, 'isdraft'=>$isdraft); - $reshook = $hookmanager->executeHooks('restrictedArea', $parameters); + if (!empty($hookmanager)) { + $reshook = $hookmanager->executeHooks('restrictedArea', $parameters); - if (isset($hookmanager->resArray['result'])) { - if ($hookmanager->resArray['result'] == 0) { - if ($mode) { - return 0; - } else { - accessforbidden(); // Module returns 0, so access forbidden + if (isset($hookmanager->resArray['result'])) { + if ($hookmanager->resArray['result'] == 0) { + if ($mode) { + return 0; + } else { + accessforbidden(); // Module returns 0, so access forbidden + } } } - } - if ($reshook > 0) { // No other test done. - return 1; + if ($reshook > 0) { // No other test done. + return 1; + } } // Features/modules to check diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index acceaa822d1..9621904ebe6 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -163,7 +163,6 @@ class modApi extends DolibarrModules 'langs'=>'modulebuilder', 'position'=>100, 'perms'=>'1', - //'enabled'=>'isModEnabled("api") && preg_match(\'/^(devtools)/\',$leftmenu)', 'enabled'=>'isModEnabled("api")', 'target'=>'_apiexplorer', 'user'=>0); diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index 545306f5734..cf9e223d737 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -960,7 +960,7 @@ class SecurityTest extends PHPUnit\Framework\TestCase print "result = ".$result."\n"; $this->assertEquals('Parent project not found', $result); - $result=dol_eval('$a=function() { }; $a;', 1, 1, ''); + $result=dol_eval('$a=function() { }; $a;', 1, 1, '0'); print "result = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); @@ -999,12 +999,22 @@ class SecurityTest extends PHPUnit\Framework\TestCase print "result = ".$result."\n"; $this->assertTrue($result); - // Same with syntax error + // Same with a value that does not match $leftmenu = 'XXX'; $result=dol_eval('$conf->currency && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1'); print "result = ".$result."\n"; $this->assertFalse($result); + $leftmenu = 'AAA'; + $result=dol_eval('$conf->currency && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); + print "result = ".$result."\n"; + $this->assertTrue($result); + + $leftmenu = 'XXX'; + $result=dol_eval('$conf->currency && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); + print "result = ".$result."\n"; + $this->assertFalse($result); + // Case with param onlysimplestring = 1 @@ -1015,6 +1025,10 @@ class SecurityTest extends PHPUnit\Framework\TestCase $result=dol_eval("(\$a.'aa')", 1, 0); print "result = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); + + $result=dol_eval('$a="abs" && $a(5)', 1, 0); + print "result = a".$result."\n"; + $this->assertContains('Bad string syntax to evaluate', $result); } From 6f0e82f5d764cc72230941bc028cf26bdc750f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 8 Sep 2023 09:49:47 +0200 Subject: [PATCH 41/69] phpstan --- htdocs/product/class/product.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ff3115ee40b..a4b75da9f49 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -173,6 +173,7 @@ class Product extends CommonObject public $multiprices = array(); public $multiprices_ttc = array(); public $multiprices_base_type = array(); + public $multiprices_default_vat_code = array(); public $multiprices_min = array(); public $multiprices_min_ttc = array(); public $multiprices_tva_tx = array(); @@ -184,6 +185,11 @@ class Product extends CommonObject public $prices_by_qty_id = array(); public $prices_by_qty_list = array(); + /** + * @var int price level set after updateprice for trigger + */ + public $level; + //! Array for multilangs public $multilangs = array(); From c99b5210ded5f4f91c40e1f8654c8921b8daad1e Mon Sep 17 00:00:00 2001 From: atm-greg Date: Fri, 8 Sep 2023 10:32:25 +0200 Subject: [PATCH 42/69] use Product instance for dol_banner --- .idea/php.xml | 22 ++++++++++++++++++---- htdocs/product/fournisseurs.php | 4 +++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.idea/php.xml b/.idea/php.xml index 74fc8003a4b..f324872a8ba 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -1,5 +1,19 @@ - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 9996ad26bfe..ed24a1c0abf 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -102,8 +102,10 @@ if (!$sortorder) { $hookmanager->initHooks(array('pricesuppliercard', 'globalcard')); $object = new ProductFournisseur($db); +$prod = new Product($db); if ($id > 0 || $ref) { $object->fetch($id, $ref); + $prod->fetch($id, $ref); } $usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->hasRight('service', 'lire'))); @@ -396,7 +398,7 @@ if ($id > 0 || $ref) { $shownav = 0; } - dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); + dol_banner_tab($prod, 'ref', $linkback, $shownav, 'ref'); print '
'; From 01232b721dc43a5c123a5af60242a35d9d0218f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 8 Sep 2023 11:25:54 +0200 Subject: [PATCH 43/69] do not trunc label but only use css overflowmax --- htdocs/core/class/html.formactions.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index ecedab797ac..2aab803bf17 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -306,7 +306,7 @@ class FormActions print ''; // Label - print ''.$actioncomm->getNomUrl(0, 36).''; + print ''.$actioncomm->getNomUrl(0).''; // Date print ''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel'); From 373424f8ed690d6571059f0cb4d8e2c90f485b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 8 Sep 2023 11:57:11 +0200 Subject: [PATCH 44/69] phpdoc --- htdocs/comm/action/class/actioncomm.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 836562067f8..6e9af651656 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1321,7 +1321,7 @@ class ActionComm extends CommonObject * @param string $sortfield Sort on this field * @param string $sortorder ASC or DESC * @param string $limit Limit number of answers - * @return array|string Error string if KO, array with actions if OK + * @return ActionComm[]|string Error string if KO, array with actions if OK */ public function getActions($socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0) { From 5adf2ccf5b5678a1fac6b2985e896e847327c2c8 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Fri, 8 Sep 2023 12:11:52 +0200 Subject: [PATCH 45/69] fix problem --- htdocs/core/lib/modulebuilder.lib.php | 3 +- htdocs/modulebuilder/index.php | 378 +++++++++++++++----------- 2 files changed, 214 insertions(+), 167 deletions(-) diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 32fd00752b6..0742ad15368 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -1203,7 +1203,7 @@ function createNewDictionnary($modulename, $file, $namedic, $dictionnaires = nul $modulename = strtolower($modulename); if (empty($dictionnaires)) { - $dictionnaires = array('tabname' => array(), 'tablib' => array(), 'tabsql' => array(), 'tabsqlsort' => array(), 'tabfield' => array(), 'tabfieldvalue' => array(), 'tabfieldinsert' => array(), 'tabrowid' => array(), 'tabcond' => array(), 'tabhelp' => array()); + $dictionnaires = array('langs' => '', 'tabname' => array(), 'tablib' => array(), 'tabsql' => array(), 'tabsqlsort' => array(), 'tabfield' => array(), 'tabfieldvalue' => array(), 'tabfieldinsert' => array(), 'tabrowid' => array(), 'tabcond' => array(), 'tabhelp' => array()); } $columns = array( @@ -1243,6 +1243,7 @@ function createNewDictionnary($modulename, $file, $namedic, $dictionnaires = nul } // rewrite dictionnary if + $dictionnaires['langs'] = $modulename.'@'.$modulename; $dictionnaires['tabname'][] = strtolower($namedic); $dictionnaires['tablib'][] = ucfirst(substr($namedic, 2)); $dictionnaires['tabsql'][] = 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.strtolower($namedic).' as f'; diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 668991818b5..f77a82cfd3b 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -1568,11 +1568,19 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { } // Add a dictionary -if ($dirins && $action == 'initdic' && $module && $dicname) { +if ($dirins && $action == 'initdic' && $module && empty($cancel)) { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; $destdir = $dirins.'/'.strtolower($module); $moduledescriptorfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php'; + if (!GETPOST('dicname')) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Table")), null, 'errors'); + } + if (!GETPOST('label')) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Lable")), null, 'errors'); + } if (!$error) { $newdicname = $dicname; if (!preg_match('/^c_/', $newdicname)) { @@ -2051,16 +2059,13 @@ if (($dirins && $action == 'confirm_deletedictionary' && $dicname) || ($dirins & $result = updateDictionaryInFile($module, $moduledescriptorfile, $dicts); if ($result > 0) { setEventMessages($langs->trans("DictionaryDeleted", ucfirst(substr($newdicname, 2))), null); - } elseif (!$result) { - setEventMessages($langs->trans("WarningCommentNotFound", $langs->trans("Dictionaries"), "mod".$module."class.php"), null, 'warnings'); - } else { - if (function_exists('opcache_invalidate')) { - opcache_reset(); // remove the include cache hell ! - } - clearstatcache(true); - header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '')); - exit; } + if (function_exists('opcache_invalidate')) { + opcache_reset(); // remove the include cache hell ! + } + clearstatcache(true); + header("Location: ".DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '')); + exit; } } if ($dirins && $action == 'updatedictionary' && GETPOST('dictionnarykey')) { @@ -3265,7 +3270,7 @@ if ($module == 'initmodule') { $objects = dolGetListOfObjectClasses($destdir); $diroflang = dol_buildpath($modulelowercase, 0)."/langs"; $countLangs = countItemsInDirectory($diroflang, 2); - $countDictionaries = count($moduleobj->dictionaries['tabname']); + $countDictionaries = (!empty($moduleobj->dictionaries) ? count($moduleobj->dictionaries['tabname']) : 0); $countRights = count($moduleobj->rights); $countMenus = count($moduleobj->menu); $countTriggers = countItemsInDirectory(dol_buildpath($modulelowercase, 0)."/core/triggers"); @@ -3274,7 +3279,7 @@ if ($module == 'initmodule') { $countJs = countItemsInDirectory(dol_buildpath($modulelowercase, 0)."/js"); $countCLI = countItemsInDirectory(dol_buildpath($modulelowercase, 0)."/scripts"); $hasDoc = countItemsInDirectory(dol_buildpath($modulelowercase, 0)."/doc"); - + //var_dump($moduleobj->dictionaries);exit; $head2 = array(); $h = 0; @@ -3294,7 +3299,7 @@ if ($module == 'initmodule') { $h++; $head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : ''); - $head2[$h][1] = ($countDictionaries <= 0 ? $langs->trans("Dictionaries") : $langs->trans('Dictionaries')." (".$countDictionaries.")"); + $head2[$h][1] = ($countDictionaries == 0 ? $langs->trans("Dictionaries") : $langs->trans('Dictionaries')." (".$countDictionaries.")"); $head2[$h][2] = 'dictionaries'; $h++; @@ -4519,206 +4524,250 @@ if ($module == 'initmodule') { //$listofobject = dol_dir_list($dir, 'files', 0, '\.class\.php$'); $firstdicname = ''; - if (!empty($dicts['tabname'])) { - foreach ($dicts['tabname'] as $key => $dic) { - $dicname = $dic; - $diclabel = $dicts['tablib'][$key]; + // if (!empty($dicts['tabname'])) { + // foreach ($dicts['tabname'] as $key => $dic) { + // $dicname = $dic; + // $diclabel = $dicts['tablib'][$key]; - if (empty($firstdicname)) { - $firstdicname = $dicname; - } + // if (empty($firstdicname)) { + // $firstdicname = $dicname; + // } - $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabdic='.$dicname; - $head3[$h][1] = $diclabel; - $head3[$h][2] = $dicname; - $h++; - } - } + // $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabdic='.$dicname; + // $head3[$h][1] = $diclabel; + // $head3[$h][2] = $dicname; + // $h++; + // } + // } - if ($h > 1) { - $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabdic=deletedictionary'; - $head3[$h][1] = $langs->trans("DangerZone"); - $head3[$h][2] = 'deletedictionary'; - $h++; - } + // if ($h > 1) { + // $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=dictionaries&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabdic=deletedictionary'; + // $head3[$h][1] = $langs->trans("DangerZone"); + // $head3[$h][2] = 'deletedictionary'; + // $h++; + // } // If tabobj was not defined, then we check if there is one obj. If yes, we force on it, if no, we will show tab to create new objects. - if ($tabdic == 'newdicifnodic') { - if ($firstdicname) { - $tabdic = $firstdicname; - } else { - $tabdic = 'newdictionary'; - } - } + // if ($tabdic == 'newdicifnodic') { + // if ($firstdicname) { + // $tabdic = $firstdicname; + // } else { + // $tabdic = 'newdictionary'; + // } + // } + //print dol_get_fiche_head($head3, $tabdic, '', -1, ''); // Level 3 + $newdict = dolGetButtonTitle($langs->trans('NewDictionary'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/modulebuilder/index.php?tab=dictionaries&module='.urlencode($module).'&tabdic=newdictionary'); print_barre_liste($langs->trans("ListOfDictionariesEntries"), '', $_SERVER["PHP_SELF"], '', '', '', '', '', '', '', 0, $newdict, '', '', 0, 0, 1); - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + if ($tabdic != 'newdictionary') { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - print '
'; - print ''; + print '
'; + print '
'; - print ''; - print_liste_field_titre("#", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'thsticky thstickygrey '); - print_liste_field_titre("Table", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Label", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("SQL", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("SQLSort", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("FieldsView", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("FieldsEdit", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("FieldsInsert", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Rowid", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Condition", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print ''; + print_liste_field_titre("#", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'thsticky thstickygrey '); + print_liste_field_titre("Table", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("Label", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("SQL", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("SQLSort", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("FieldsView", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("FieldsEdit", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("FieldsInsert", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("Rowid", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("Condition", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); - print "\n"; + print "\n"; - if (!empty($dicts) && is_array($dicts) && !empty($dicts['tabname']) && is_array($dicts['tabname'])) { - $i = 0; - $maxi = count($dicts['tabname']); - while ($i < $maxi) { - if ($action == 'editdict' && $i == (int) GETPOST('dictionnarykey', 'int')-1) { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + if (!empty($dicts) && is_array($dicts) && !empty($dicts['tabname']) && is_array($dicts['tabname'])) { + $i = 0; + $maxi = count($dicts['tabname']); + while ($i < $maxi) { + if ($action == 'editdict' && $i == (int) GETPOST('dictionnarykey', 'int')-1) { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; - print ''; - } else { - print ''; + print ''; + print ''; + } else { + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; + } + $i++; } - $i++; + } else { + print ''; } - } else { - print ''; + + print '
'; - print ($i + 1); - print ''; + print ($i + 1); + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print '
'; - print ''; - print '
'; + print ''; + print '
'; + print ''; + print '
'; - print ($i + 1); - print ''; + print ($i + 1); + print ''; - print $dicts['tabname'][$i]; - print ''; + print $dicts['tabname'][$i]; + print ''; - print $dicts['tablib'][$i]; - print ''; + print $dicts['tablib'][$i]; + print ''; - print $dicts['tabsql'][$i]; - print ''; + print $dicts['tabsql'][$i]; + print ''; - print $dicts['tabsqlsort'][$i]; - print ''; + print $dicts['tabsqlsort'][$i]; + print ''; - print $dicts['tabfield'][$i]; - print ''; + print $dicts['tabfield'][$i]; + print ''; - print $dicts['tabfieldvalue'][$i]; - print ''; + print $dicts['tabfieldvalue'][$i]; + print ''; - print $dicts['tabfieldinsert'][$i]; - print ''; + print $dicts['tabfieldinsert'][$i]; + print ''; - print $dicts['tabrowid'][$i]; - print ''; + print $dicts['tabrowid'][$i]; + print ''; - print $dicts['tabcond'][$i]; - print ''; + print $dicts['tabcond'][$i]; + print ''; - print ''.img_edit().''; - print ''.img_delete().''; - print ''; + print ''.img_edit().''; + print ''.img_delete().''; + print '
'.$langs->trans("None").'
'.$langs->trans("None").'
'; + print '
'; + + print ''; } - print ''; - print '
'; - - print ''; - - print dol_get_fiche_head($head3, $tabdic, '', -1, ''); // Level 3 - if ($tabdic == 'newdictionary') { // New dic tab print '
'; print ''; print ''; print ''; + print ''; + print ''; print ''.$langs->trans("EnterNameOfDictionaryDesc").'

'; - print '
'; - // print '
'; - // print '
'; - print ''; + print dol_get_fiche_head(''); + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("Table").'
'.$langs->trans("Label").'
'.$langs->trans("SQL").'
'.$langs->trans("SQLSort").'
'.$langs->trans("FieldsView").'
'.$langs->trans("FieldsEdit").'
'.$langs->trans("FieldsInsert").'
'.$langs->trans("Rowid").'
'; + print ''; + print ''; + print dol_get_fiche_end(); + print '
'; + print ''; + /*print '
'; print '
'; print '
'; @@ -4731,7 +4780,6 @@ if ($module == 'initmodule') { print ''; print '
'; */ - print ''; } elseif ($tabdic == 'deletedictionary') { // Delete dic tab print '
'; @@ -4745,8 +4793,6 @@ if ($module == 'initmodule') { print ''; print ''; print '
'; - } else { - print $langs->trans("FeatureNotYetAvailable"); } print dol_get_fiche_end(); @@ -5138,7 +5184,7 @@ if ($module == 'initmodule') { } }); }); - '; + '; // display permissions for each object } else { From ec71da27be6bef2fc0253cc1bc4da4c9b4e9a144 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:39:20 +0300 Subject: [PATCH 46/69] Update sendings.lang --- htdocs/langs/en_US/sendings.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index 6ed59b35e89..e3696f6c5ac 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -77,7 +77,7 @@ DetailWarehouseFormat= W:%s (Qty: %d) ShipmentDistribution=Shipment distribution -ErrorTooManyCombinationBatchcode=No dispatch for line %s as too many combination warehouse, product, batch code was found (%s). -ErrorNoCombinationBatchcode=No dispatch for line %s as no combination warehouse, product, batch code was found. +ErrorTooManyCombinationBatchcode=No dispatch for line %s as too many combinations of warehouse, product, batch code was found (%s). +ErrorNoCombinationBatchcode=No dispatch for line %s as no combination of warehouse, product, batch code was found. ErrorTooMuchShipped=Quantity shipped should not be greater than quantity ordered for line %s From ea1a1b8bad58a70fc00f04c72d68eaa78baa1110 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:41:59 +0300 Subject: [PATCH 47/69] Update hrm.lang --- htdocs/langs/en_US/hrm.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/hrm.lang b/htdocs/langs/en_US/hrm.lang index 227819b4037..771c5246b56 100644 --- a/htdocs/langs/en_US/hrm.lang +++ b/htdocs/langs/en_US/hrm.lang @@ -92,4 +92,4 @@ JobsExtraFields=Attributs supplémentaires (Job profile) EvaluationsExtraFields=Attributs supplémentaires (Evaluations) NeedBusinessTravels=Need business travels NoDescription=No description -TheJobProfileHasNoSkillsDefinedFixBefore=The evaluated job profile of this employee has not skill defined on it. Please fix this before, then delete and restart the evaluation. \ No newline at end of file +TheJobProfileHasNoSkillsDefinedFixBefore=The evaluated job profile of this employee has no skill defined on it. Please add skill(s), then delete and restart the evaluation. From bd970931c0fc8a321f133c9cdca41157f2efa16a Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:44:25 +0300 Subject: [PATCH 48/69] Update admin.lang --- htdocs/langs/en_US/admin.lang | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5efb9c00aba..0d4abd53335 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1773,15 +1773,15 @@ FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts ##### FCKeditor ##### AdvancedEditor=Advanced editor ActivateFCKeditor=Activate advanced editor for: -FCKeditorForNotePublic=WYSIWIG creation/edition of the field "public notes" of elements -FCKeditorForNotePrivate=WYSIWIG creation/edition of the field "private notes" of elements -FCKeditorForCompany=WYSIWIG creation/edition of the field description of elements (except products/services) -FCKeditorForProductDetails=WYSIWIG creation/edition of products description or lines for objects (lines of proposals, orders, invoices, etc...). +FCKeditorForNotePublic=WYSIWYG creation/edition of the field "public notes" of elements +FCKeditorForNotePrivate=WYSIWYG creation/edition of the field "private notes" of elements +FCKeditorForCompany=WYSIWYG creation/edition of the field description of elements (except products/services) +FCKeditorForProductDetails=WYSIWYG creation/edition of products description or lines for objects (lines of proposals, orders, invoices, etc...). FCKeditorForProductDetails2=Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files. -FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing) -FCKeditorForUserSignature=WYSIWIG creation/edition of user signature -FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) -FCKeditorForTicket=WYSIWIG creation/edition for tickets +FCKeditorForMailing= WYSIWYG creation/edition for mass eMailings (Tools->eMailing) +FCKeditorForUserSignature=WYSIWYG creation/edition of user signature +FCKeditorForMail=WYSIWYG creation/edition for all mail (except Tools->eMailing) +FCKeditorForTicket=WYSIWYG creation/edition for tickets ##### Stock ##### StockSetup=Stock module setup IfYouUsePointOfSaleCheckModule=If you use the Point of Sale module (POS) provided by default or an external module, this setup may be ignored by your POS module. Most POS modules are designed by default to create an invoice immediately and decrease stock irrespective of the options here. So if you need or not to have a stock decrease when registering a sale from your POS, check also your POS module setup. From d153d7778fa5df6404e8a339b4f6c70434db0bc6 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:52:47 +0300 Subject: [PATCH 49/69] Update errors.lang --- htdocs/langs/en_US/errors.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 058dc422b81..02e6c2a27ff 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -4,7 +4,7 @@ NoErrorCommitIsDone=No error, we commit # Errors ErrorButCommitIsDone=Errors found but we validate despite this -ErrorBadEMail=Email %s is incorrect +ErrorBadEMail=Email address %s is incorrect ErrorBadMXDomain=Email %s seems incorrect (domain has no valid MX record) ErrorBadUrl=Url %s is incorrect ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. From 704cbbe26630ff6240cd27201a81b3da2aba560d Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:59:21 +0300 Subject: [PATCH 50/69] Update main.lang --- htdocs/langs/en_US/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index b20aee98e69..c25b445b2d8 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -60,7 +60,7 @@ ErrorFailedToSendMail=Failed to send mail (sender=%s, receiver=%s) ErrorFileNotUploaded=File was not uploaded. Check that size does not exceed maximum allowed, that free space is available on disk and that there is not already a file with same name in this directory. ErrorInternalErrorDetected=Error detected ErrorWrongHostParameter=Wrong host parameter -ErrorYourCountryIsNotDefined=Your country is not defined. Go to Home-Setup-Edit and post the form again. +ErrorYourCountryIsNotDefined=Your country is not defined. Go to Home-Setup-Company/Foundation and post the form again. ErrorRecordIsUsedByChild=Failed to delete this record. This record is used by at least one child record. ErrorWrongValue=Wrong value ErrorWrongValueForParameterX=Wrong value for parameter %s From ea64e69a4108944e66a5d2fa8a01a21027cbb997 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:04:53 +0300 Subject: [PATCH 51/69] Update main.lang --- htdocs/langs/en_US/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index c25b445b2d8..7fc01613941 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -20,7 +20,7 @@ FormatDateShortJava=MM/dd/yyyy FormatDateShortJavaInput=MM/dd/yyyy FormatDateShortJQuery=mm/dd/yy FormatDateShortJQueryInput=mm/dd/yy -FormatHourShortJQuery=HH:MI +FormatHourShortJQuery=HH:MM FormatHourShort=%I:%M %p FormatHourShortDuration=%H:%M FormatDateTextShort=%b %d, %Y From 5b6b18e1158bcf23ab9cd969d505522b530fb749 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:07:17 +0300 Subject: [PATCH 52/69] Update ticket.lang --- htdocs/langs/en_US/ticket.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index ed0e893b97c..a9960cc3deb 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -311,7 +311,7 @@ TicketNewEmailBodyInfosTrackUrlCustomer=You can view the progress of the ticket TicketCloseEmailBodyInfosTrackUrlCustomer=You can consult the history of this ticket by clicking the following link TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this email! Use the link to reply into the interface. TicketPublicInfoCreateTicket=This form allows you to record a support ticket in our management system. -TicketPublicPleaseBeAccuratelyDescribe=Please accurately describe your question. Provide the most information possible to allow us to correctly identify your request. +TicketPublicPleaseBeAccuratelyDescribe=Please accurately describe your request. Provide the most information possible to allow us to correctly identify your request. TicketPublicMsgViewLogIn=Please enter ticket tracking ID TicketTrackId=Public Tracking ID OneOfTicketTrackId=One of your tracking ID From c379420d8695e01f2366ebcdcc4a081538afab2b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 14:12:12 +0200 Subject: [PATCH 53/69] Fix regression in dol_eval --- htdocs/core/lib/functions.lib.php | 4 ++- test/phpunit/SecurityTest.php | 44 ++++++++++++++++++------------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2ae73a96a64..0b2e638d45e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9241,7 +9241,9 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' } } $scheck = preg_replace('/->[a-zA-Z0-9_]+\(/', '->__METHOD__', $s); - $scheck = preg_replace('/\s[a-zA-Z0-9_]+\(/', ' __FUNCTION__', $scheck); + $scheck = preg_replace('/^\(/', '__PARENTHESIS__', $scheck); + $scheck = preg_replace('/\s\(/', '__PARENTHESIS__', $scheck); + $scheck = preg_replace('/(|\s)[a-zA-Z0-9_]+\(/', '$1__FUNCTION__', $scheck); $scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)') //print 'scheck='.$scheck." : ".strpos($scheck, '(')."\n"; if (strpos($scheck, '(') !== false) { diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index cf9e223d737..e22e7c8e2a1 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -940,11 +940,11 @@ class SecurityTest extends PHPUnit\Framework\TestCase $db=$this->savdb; $result=dol_eval('1==1', 1, 0); - print "result = ".$result."\n"; + print "result1 = ".$result."\n"; $this->assertTrue($result); $result=dol_eval('1==2', 1, 0); - print "result = ".$result."\n"; + print "result2 = ".$result."\n"; $this->assertFalse($result); include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -952,44 +952,48 @@ class SecurityTest extends PHPUnit\Framework\TestCase $s = '(($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref : "Parent project not found"'; $result=dol_eval($s, 1, 1, '2'); - print "result = ".$result."\n"; + print "result3 = ".$result."\n"; $this->assertEquals('Parent project not found', $result); $s = '(($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref : \'Parent project not found\''; $result=dol_eval($s, 1, 1, '2'); - print "result = ".$result."\n"; + print "result4 = ".$result."\n"; $this->assertEquals('Parent project not found', $result); $result=dol_eval('$a=function() { }; $a;', 1, 1, '0'); - print "result = ".$result."\n"; + print "result5 = ".$result."\n"; + $this->assertContains('Bad string syntax to evaluate', $result); + + $result=dol_eval('$a=function() { }; $a;', 1, 1, '1'); + print "result6 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval('$a=exec("ls");', 1, 1); - print "result = ".$result."\n"; + print "result7 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval('$a=exec ("ls")', 1, 1); - print "result = ".$result."\n"; + print "result8 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval('$a="test"; $$a;', 1, 0); - print "result = ".$result."\n"; + print "result9 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval('`ls`', 1, 0); - print "result = ".$result."\n"; + print "result10 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval("('ex'.'ec')('echo abc')", 1, 0); - print "result = ".$result."\n"; + print "result11 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval("sprintf(\"%s%s\", \"ex\", \"ec\")('echo abc')", 1, 0); - print "result = ".$result."\n"; + print "result12 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval("90402.38+267678+0", 1, 1, 1); - print "result = ".$result."\n"; + print "result13 = ".$result."\n"; $this->assertEquals('358080.38', $result); global $leftmenu; // Used into strings to eval @@ -1002,32 +1006,36 @@ class SecurityTest extends PHPUnit\Framework\TestCase // Same with a value that does not match $leftmenu = 'XXX'; $result=dol_eval('$conf->currency && preg_match(\'/^(AAA|BBB)/\',$leftmenu)', 1, 1, '1'); - print "result = ".$result."\n"; + print "result14 = ".$result."\n"; $this->assertFalse($result); $leftmenu = 'AAA'; $result=dol_eval('$conf->currency && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); - print "result = ".$result."\n"; + print "result15 = ".$result."\n"; $this->assertTrue($result); $leftmenu = 'XXX'; $result=dol_eval('$conf->currency && isStringVarMatching(\'leftmenu\', \'(AAA|BBB)\')', 1, 1, '1'); - print "result = ".$result."\n"; + print "result16 = ".$result."\n"; $this->assertFalse($result); + $string = '(isModEnabled("agenda") || isModEnabled("resource")) && getDolGlobalInt("MAIN_FEATURES_LEVEL") >= 0 && preg_match(\'/^(admintools|all|XXX)/\', $leftmenu)'; + $result=dol_eval($string, 1, 1, '1'); + print "result17 = ".$result."\n"; + $this->assertTrue($result); // Case with param onlysimplestring = 1 $result=dol_eval('1 && getDolGlobalInt("doesnotexist1") && $conf->global->MAIN_FEATURES_LEVEL', 1, 0); // Should return false and not a 'Bad string syntax to evaluate ...' - print "result = ".$result."\n"; + print "result18 = ".$result."\n"; $this->assertFalse($result); $result=dol_eval("(\$a.'aa')", 1, 0); - print "result = ".$result."\n"; + print "result19 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); $result=dol_eval('$a="abs" && $a(5)', 1, 0); - print "result = a".$result."\n"; + print "result20 = ".$result."\n"; $this->assertContains('Bad string syntax to evaluate', $result); } From f2b72ec15a8356130de60f355ac8fe2ca3908144 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Fri, 8 Sep 2023 14:45:59 +0200 Subject: [PATCH 54/69] NEW functionality add section changeLog to Doc in MB --- htdocs/modulebuilder/index.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 668991818b5..a3d20c1179d 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -818,6 +818,27 @@ if ($dirins && $action == 'initdoc' && !empty($module)) { writeApiUrlsInDoc($apiFile, $destfile); } + // add ChangeLog in Doc + if (file_exists($dirins.'/'.strtolower($module).'/ChangeLog.md')) { + $changeLog = $dirins.'/'.strtolower($module).'/ChangeLog.md'; + $string = file_get_contents($changeLog); + + $replace = explode("\n", $string); + $strreplace = array(); + foreach ($replace as $line) { + if ($line === '') { + continue; + } + if (strpos($line, '##') !== false) { + $strreplace[$line] = str_replace('##', '', $line); + } else { + $strreplace[$line] = $line; + } + } + $stringLog = implode("\n", $strreplace); + dolREplaceInFile($destfile, array('//include::ChangeLog.md[]' => '','__CHANGELOG__' => $stringLog)); + } + // Delete old documentation files $FILENAMEDOC = $modulelowercase.'.html'; $FILENAMEDOCPDF = $modulelowercase.'.pdf'; From 803aca262e74f4a7dcbd3b6d0c2e3f7eaa9cd3dc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Sep 2023 15:25:50 +0200 Subject: [PATCH 55/69] Fix edit colors with html5 component --- htdocs/comm/mailing/card.php | 4 ++-- htdocs/core/class/html.formother.class.php | 7 ++++--- htdocs/core/lib/functions.lib.php | 14 ++++++++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index aaa946fd2fe..27af9dc5149 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -547,7 +547,7 @@ if (empty($reshook)) { $object->title = (string) GETPOST("title"); $object->sujet = (string) GETPOST("sujet"); $object->body = (string) GETPOST("bodyemail", 'restricthtml'); - $object->bgcolor = (string) GETPOST("bgcolor"); + $object->bgcolor = preg_replace('/^#/', '', (string) GETPOST("bgcolor")); $object->bgimage = (string) GETPOST("bgimage"); if (!$object->title) { @@ -641,7 +641,7 @@ if (empty($reshook)) { $mesgs = array(); $object->sujet = (string) GETPOST("sujet"); $object->body = (string) GETPOST("bodyemail", 'restricthtml'); - $object->bgcolor = (string) GETPOST("bgcolor"); + $object->bgcolor = preg_replace('/^#/', '', (string) GETPOST("bgcolor")); $object->bgimage = (string) GETPOST("bgimage"); if (!$object->sujet) { diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 8800d5a59fc..e1356fb5dec 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -825,11 +825,11 @@ class FormOther /** * Output a HTML code to select a color. Field will return an hexa color like '334455'. * - * @param string $set_color Pre-selected color + * @param string $set_color Pre-selected color with format '#......' * @param string $prefix Name of HTML field * @param string $form_name Deprecated. Not used. * @param int $showcolorbox 1=Show color code and color box, 0=Show only color code - * @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') + * @param array $arrayofcolors Array of possible colors to choose in the selector. All colors are possible if empty. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') * @param string $morecss Add css style into input field * @param string $setpropertyonselect Set this property after selecting a color * @param string $default Default color @@ -917,7 +917,8 @@ class FormOther '; $out .= ''; } else { - $out .= ''; + $color = ($set_color !== '' ? $set_color : ($default !== '' ? $default : 'FFFFFF')); + $out .= ''; $out .= '