diff --git a/COPYRIGHT b/COPYRIGHT
index fb2d6159e06..0bb5937497d 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -28,7 +28,7 @@ Escpos-php 3.0 MIT License Yes
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
-NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
+NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.7.4 MIT License Yes Markdown parser
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
diff --git a/ChangeLog b/ChangeLog
index a5d8b7c967e..0458780eeab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -254,6 +254,44 @@ The following changes may create regressions for some external modules, but were
* A very high number of class properties (with old name in french) are now deprecated in favor of the property name in english.
+***** ChangeLog for 18.0.4 compared to 18.0.3 *****
+FIX: $this->newref already exists and could have been modified by trigger but we still use a local variable for the filesystem-based renaming
+FIX: 16.0 only, backport fix for SQL error on global search product
+FIX: #25399 (#26694)
+FIX: #25458 intervention localizations (backport v17) (#26757)
+FIX: #26518
+FIX: #26536 Accountancy - Balance - Not divided lines by label & account, only by account (#26547)
+FIX: #26553 Supplier invoice - Do not display the delete button for reconciled payment (#26554)
+FIX: #26735
+FIX: #26994
+FIX: Accountancy - Possibility to write in bookkeeping expense report operation with some line not bound (#26545)
+FIX: add display of an error when attempting to delete a committed transaction (#26573)
+FIX: avoid warning : Cannot use a scalar value as an array (#26437)
+FIX: backport SQL error on global search product
+FIX: # Bug Estimated Stock at date value in V14 (#26479)
+FIX: commande context (#26497)
+FIX: delivery note disappear after generation
+FIX: double hook and paging search param in product list (#26767)
+FIX: Email reminder template must not be visible when option is off
+FIX: escape HTML tags in return value of getFullName() (#26735)
+FIX: Fix set private note (#26610)
+FIX: Fix when options FAC_FORCE_DATE_VALIDATION and INVOICE_CHECK_POSTERIOR_DATE enabled. The date is forced after the test and not before
+FIX: menu auguria
+FIX: pagination parameters on save and cancel buttons (#26605)
+FIX: pdf cornas page head multicell width (backport v17)
+FIX: php8 fatal on edit supplier order when multicurrency is activated (#26758)
+FIX: possible inconsistency between llx_ecm_files and file system when BILL_SUPPLIER_VALIDATES changes ref
+FIX: regression on planned bank entries (#26556)
+FIX: Social contribution - Payment list - Wrong information in type column (#26561)
+FIX: special_code update line keep old value. (#26819)
+FIX: substitute project variables in invoice documents (#26445)
+FIX: Test on permission for holiday tooltips
+FIX: v17: Param $notrigger in $societe->create() causes method to return true regardless of actual result of database functions (#26499)
+FIX: v18 SQL error in llx_c_forme_juridique.sql when installing
+FIX: Warehouse Global Amounts not displayed (#26478)
+FIX: warning param $lineID getSpecialCode is negatif (#26826)
+FIX: warning php8.2 undefined_array_key (#26830)
+
***** ChangeLog for 18.0.3 compared to 18.0.2 *****
FIX: #25793 Cannot add time spent (#26405)
FIX: #26100 Ticket - On edit, list of closed project must be excluded (#26223)
diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index 8305dbefbd9..e8af4cd420d 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -44,23 +44,22 @@ With
NUSOAP:
-------
-* In file nusoap.php, to avoid a warning,
-Replace
- if (isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
-By
- if (! is_array($this->methodreturn) && isset($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
+* Line 1257 of file nusoap.php. Add:
-* In file nusoap.php, to avoid a warning,
-Replace call to serialize_val with no bugged value
+ libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
+
+
+* Line 4346 of file nusoap.php
-* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct
+ $rev = array();
+ preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
+ $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
-* Line 4222 of file nusoap.php
-
- $rev = array();
- preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
- $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
+* Line 6566 of file nusoap.php, replace
+ if (count($attrs) > 0) {
+ with
+ if (is_array($attrs) && count($attrs) > 0) {
diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php
index d75c9fae8b2..442d991a453 100755
--- a/dev/initdata/purge-data.php
+++ b/dev/initdata/purge-data.php
@@ -148,8 +148,8 @@ $sqls=array(
"DELETE FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'",
),
'project'=>array(
- // TODO set fk_project to null on object that refer to project
- "DELETE FROM ".MAIN_DB_PREFIX."projet_task_time WHERE fk_task IN (select rowid FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'))",
+ // TODO set fk_project to null on all objects/tables that refer to project
+ "DELETE FROM ".MAIN_DB_PREFIX."element_time WHERE elementtype = 'task' AND fk_element IN (select rowid FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'))",
"DELETE FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'",
),
diff --git a/dev/tools/rector/src/Renaming/GlobalToFunction.php b/dev/tools/rector/src/Renaming/GlobalToFunction.php
index 656a7d4ff59..f81f2ee34c1 100644
--- a/dev/tools/rector/src/Renaming/GlobalToFunction.php
+++ b/dev/tools/rector/src/Renaming/GlobalToFunction.php
@@ -103,6 +103,7 @@ class GlobalToFunction extends AbstractRector
if ($node instanceof FuncCall) {
$tmpfunctionname = $this->getName($node);
+ // If function is ok(we must avoid a lot of cases like isset, empty)
if (in_array($tmpfunctionname, array('dol_escape_htmltag', 'make_substitutions', 'min', 'max', 'explode'))) {
$args = $node->getArgs();
$nbofparam = count($args);
diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index 29cb1300f4c..5a2b7aa5e21 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -125,18 +125,10 @@ $tabfieldinsert[31] = "pcg_version,label,fk_country";
$tabrowid = array();
$tabrowid[31] = "";
-// Condition to show dictionary in setup page
-$tabcond = array();
-$tabcond[31] = isModEnabled('accounting');
-
// List of help for fields
$tabhelp = array();
$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
-// List of check for fields (NOT USED YET)
-$tabfieldcheck = array();
-$tabfieldcheck[31] = array();
-
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
$elementList = array();
@@ -173,9 +165,12 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
if ($fieldnamekey == 'pcg_version') {
$fieldnamekey = 'Pcg_version';
}
- if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) {
+ if ($fieldnamekey == 'label') {
$fieldnamekey = 'Label';
}
+ if ($fieldnamekey == 'country') {
+ $fieldnamekey = "Country";
+ }
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
}
@@ -453,6 +448,7 @@ if ($id) {
print '
';
// Form to add a new line
+
if ($tabname[$id]) {
$fieldlist = explode(',', $tabfield[$id]);
@@ -467,8 +463,9 @@ if ($id) {
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
}
- if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
+ if ($fieldlist[$field] == 'label') {
$valuetoshow = $langs->trans("Label");
+ $class = 'minwidth300';
}
if ($fieldlist[$field] == 'country') {
if (in_array('region_id', $fieldlist)) {
@@ -483,6 +480,7 @@ if ($id) {
if ($fieldlist[$field] == 'pcg_version' || $fieldlist[$field] == 'fk_pcg_version') {
$valuetoshow = $langs->trans("Pcg_version");
}
+ //var_dump($value);
if ($valuetoshow != '') {
print '';
@@ -625,8 +623,10 @@ if ($id) {
fieldListAccountModel($fieldlist, $obj, $tabname[$id], 'edit');
}
- print ' ';
- print ' ';
+ print '';
+ print ' ';
+ print ' ';
+ print ' ';
} else {
$tmpaction = 'view';
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
@@ -711,6 +711,8 @@ if ($id) {
$i++;
}
+ } else {
+ print ''.$langs->trans("NoRecordFound").' ';
}
} else {
dol_print_error($db);
@@ -740,9 +742,8 @@ $db->close();
*/
function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '')
{
- global $conf, $langs, $db;
+ global $langs, $db;
global $form;
- global $region_id;
global $elementList, $sourceList;
$formadmin = new FormAdmin($db);
@@ -784,21 +785,14 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context =
print ' ';
} else {
print '';
- $size = '';
$class = '';
- if ($fieldlist[$field] == 'code') {
- $size = 'size="8" ';
+ if ($fieldlist[$field] == 'pcg_version') {
+ $class = 'width150';
}
- if ($fieldlist[$field] == 'position') {
- $size = 'size="4" ';
+ if ($fieldlist[$field] == 'label') {
+ $class = 'width300';
}
- if ($fieldlist[$field] == 'libelle') {
- $size = 'centpercent';
- }
- if ($fieldlist[$field] == 'sortorder' || $fieldlist[$field] == 'sens' || $fieldlist[$field] == 'category_type') {
- $size = 'size="2" ';
- }
- print ' ';
+ print ' ';
print ' ';
}
}
diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php
index 95714b0ce87..35126c5d464 100644
--- a/htdocs/accountancy/admin/categories_list.php
+++ b/htdocs/accountancy/admin/categories_list.php
@@ -507,6 +507,7 @@ if ($tabname[$id]) {
}
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
+ $class = 'width75';
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
$valuetoshow = $langs->trans("Label");
@@ -869,9 +870,12 @@ if ($resql) {
$key = $langs->trans("Country".strtoupper($obj->country_code));
$valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country);
}
- } elseif (in_array($fieldlist[$field], array('label', 'range_account', 'formula'))) {
+ } elseif (in_array($fieldlist[$field], array('label', 'formula'))) {
$class = "tdoverflowmax250";
$title = $valuetoshow;
+ } elseif (in_array($fieldlist[$field], array('range_account'))) {
+ $class = "tdoverflowmax250 small";
+ $title = $valuetoshow;
} elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') {
$showfield = 0;
}
@@ -994,8 +998,11 @@ function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $co
} else {
print '';
$class = '';
- if (in_array($fieldlist[$field], array('code', 'range_account', 'label', 'formula'))) {
- $class = 'maxwidth100';
+ if (in_array($fieldlist[$field], array('code', 'formula'))) {
+ $class = 'maxwidth75';
+ }
+ if (in_array($fieldlist[$field], array('label', 'range_account'))) {
+ $class = 'maxwidth150';
}
if ($fieldlist[$field] == 'position') {
$class = 'maxwidth50';
diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php
index 363fd2ecbb5..acff0845286 100644
--- a/htdocs/accountancy/admin/index.php
+++ b/htdocs/accountancy/admin/index.php
@@ -267,6 +267,7 @@ if ($action == 'setenablevatreversecharge') {
}
}
+
/*
* View
*/
@@ -274,12 +275,16 @@ if ($action == 'setenablevatreversecharge') {
$form = new Form($db);
$title = $langs->trans('ConfigAccountingExpert');
+
llxHeader('', $title);
+
$linkback = '';
//$linkback = '' . $langs->trans("BackToModuleList") . ' ';
print load_fiche_titre($title, $linkback, 'accountancy');
+print ' ';
+
// Show message if accountancy hidden options are activated to help to resolve some problems
if (!$user->admin) {
if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
@@ -304,6 +309,7 @@ print ' ';
print ' ';
// Params
+print '';
print '
';
print '';
print ''.$langs->trans('Options').' ';
@@ -387,9 +393,12 @@ foreach ($list as $key) {
print ' ';
}
print '
';
+print '
';
+
print ' ';
// Binding params
+print '';
print '
';
print '';
print ''.$langs->trans('BindingOptions').' ';
@@ -403,12 +412,12 @@ foreach ($list_binding as $key) {
$label = $langs->trans($key);
print ''.$label.' ';
// Value
- print '';
+ print ' ';
if ($key == 'ACCOUNTING_DATE_START_BINDING') {
print $form->selectDate((getDolGlobalInt($key) ? (int) getDolGlobalInt($key) : -1), $key, 0, 0, 1);
} elseif ($key == 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') {
$array = array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear"));
- print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage');
+ print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200');
} else {
print ' ';
}
@@ -457,7 +466,8 @@ if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS')) {
print ' ';
print '
';
-print '
';
+print '
';
+
// Show advanced options
@@ -465,6 +475,7 @@ print ' ';
// Advanced params
+print '';
print '
';
print '';
print '' . $langs->trans('OptionsAdvanced') . ' ';
@@ -533,6 +544,7 @@ if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) {
print ' ';
print '
';
+print '
';
print '
';
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 580ea4287d1..4efa16fcbde 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -1198,7 +1198,7 @@ while ($i < min($num, $limit)) {
$labeltoshowalt .= $line->doc_ref;
}
- print ' ';
+ print ' ';
print $labeltoshow;
print " \n";
if (!$i) {
diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php
index a6999195470..8143cee2434 100644
--- a/htdocs/accountancy/bookkeeping/listbyaccount.php
+++ b/htdocs/accountancy/bookkeeping/listbyaccount.php
@@ -1200,12 +1200,9 @@ while ($i < min($num, $limit)) {
// Other type
}
- print '';
+ print ' ';
- print '';
// Picto + Ref
- print '';
-
if ($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report') {
print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
print $documentlink;
@@ -1216,7 +1213,6 @@ while ($i < min($num, $limit)) {
} else {
print $line->doc_ref;
}
- print '
';
print " \n";
if (!$i) {
@@ -1228,7 +1224,11 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['t.label_operation']['checked'])) {
// Affiche un lien vers la facture client/fournisseur
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
- print strlen(length_accounta($line->subledger_account)) == 0 ? ''.$line->label_operation.' ' : ''.$line->label_operation.'('.length_accounta($line->subledger_account).') ';
+ if (strlen(length_accounta($line->subledger_account)) == 0) {
+ print ''.dol_escape_htmltag($line->label_operation).' ';
+ } else {
+ print '('.length_accounta($line->subledger_account).')').'">'.dol_escape_htmltag($line->label_operation).($line->label_operation?' ':'').'('.dol_escape_htmltag(length_accounta($line->subledger_account)).') ';
+ }
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1236,7 +1236,7 @@ while ($i < min($num, $limit)) {
// Lettering code
if (!empty($arrayfields['t.lettering_code']['checked'])) {
- print ''.$line->lettering_code.' ';
+ print ''.dol_escape_htmltag($line->lettering_code).' ';
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1295,7 +1295,7 @@ while ($i < min($num, $limit)) {
}
if (!empty($arrayfields['t.import_key']['checked'])) {
- print ''.$line->import_key." \n";
+ print ''.dol_escape_htmltag($line->import_key)." \n";
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php
index 8456732a2a1..1d475b67527 100644
--- a/htdocs/accountancy/class/accountingjournal.class.php
+++ b/htdocs/accountancy/class/accountingjournal.class.php
@@ -533,8 +533,6 @@ class AccountingJournal extends CommonObject
$element_link = $element_static->getNomUrl(1, 'with_label');
$element_name_formatted_0 = dol_trunc($element_static->label, 16);
- $element_name_formatted_1 = utf8_decode(dol_trunc($element_static->label, 32));
- $element_name_formatted_2 = utf8_decode(dol_trunc($element_static->label, 16));
$label_operation = $element_static->getNomUrl(0, 'label', 16);
$element = array(
diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php
index d8c49b639f4..4dcc41d38f1 100644
--- a/htdocs/accountancy/index.php
+++ b/htdocs/accountancy/index.php
@@ -40,14 +40,6 @@ $hookmanager->initHooks(array('accountancyindex'));
if ($user->socid > 0) {
accessforbidden();
}
-/*
-if (!isModEnabled('accounting')) {
- accessforbidden();
-}
-if (!$user->hasRight('accounting', 'mouvements', 'lire')) {
- accessforbidden();
-}
-*/
if (!isModEnabled('comptabilite') && !isModEnabled('accounting') && !isModEnabled('asset') && !isModEnabled('intracommreport')) {
accessforbidden();
}
@@ -55,6 +47,8 @@ if (!$user->hasRight('compta', 'resultat', 'lire') && !$user->hasRight('accounti
accessforbidden();
}
+$pcgver = getDolGlobalInt('CHARTOFACCOUNTS');
+
/*
* Actions
@@ -127,18 +121,38 @@ if (isModEnabled('accounting')) {
// STEPS
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '{s}');
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").' ', $s);
print $s;
print " \n";
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '{s}');
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").' ', $s);
print $s;
print " \n";
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '{s}');
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").' ', $s);
print $s;
+ if ($pcgver > 0) {
+ $pcgversion = '';
+ $pcglabel = '';
+
+ $sql = "SELECT a.rowid, a.pcg_version, a.label, a.active";
+ $sql .= " FROM ".MAIN_DB_PREFIX."accounting_system as a";
+ $sql .= " WHERE a.rowid = ".((int) $pcgver);
+
+ $resqlchart = $db->query($sql);
+ if ($resqlchart) {
+ $obj = $db->fetch_object($resqlchart);
+ if ($obj) {
+ $pcgversion = $obj->pcg_version;
+ $pcglabel = $obj->label;
+ }
+ } else {
+ dol_print_error($db);
+ }
+ print ' ('.$langs->trans("CurrentChartOfAccount").': '.$pcgversion.') ';
+ }
print " \n";
print " \n";
@@ -149,32 +163,32 @@ if (isModEnabled('accounting')) {
if (getDolGlobalString('ACCOUNTANCY_FISCAL_PERIOD_MODE') != 'blockedonclosed') {
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescFiscalPeriod", $step, '{s}');
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("FiscalPeriod").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("FiscalPeriod").' ', $s);
print $s;
print " \n";
}
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '{s}');
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").' ', $s);
print $s;
print " \n";
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '{s}')."\n";
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").' ', $s);
print $s;
print " \n";
$step++;
- $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").' ';
+ $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").' ';
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, '{s}');
$s = str_replace('{s}', $textlink, $s);
print $s;
print " \n";
if (isModEnabled('tax')) {
- $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").' ';
+ $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").' ';
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, '{s}');
$s = str_replace('{s}', $textlink, $s);
@@ -191,7 +205,7 @@ if (isModEnabled('accounting')) {
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '{s}');
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").' ', $s);
print $s;
print " \n";
@@ -210,20 +224,20 @@ if (isModEnabled('accounting')) {
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), '{s}')."\n";
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").' ', $s);
print $s;
print " \n";
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), '{s}')."\n";
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").' ', $s);
print $s;
print " \n";
if (isModEnabled('expensereport') || isModEnabled('deplacement')) {
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), '{s}')."\n";
- $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").' ', $s);
+ $s = str_replace('{s}', ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").' ', $s);
print $s;
print " \n";
}
@@ -236,8 +250,14 @@ if (isModEnabled('accounting')) {
$step++;
$s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64 + $step))." \n";
print $s;
+
+ $step++;
+ $s = img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescClosePeriod", chr(64 + $step))." \n";
+ print $s;
+
print " \n";
+
print ' ';
print '';
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index c92d0032176..87639008243 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -75,8 +75,13 @@ if ($reshook < 0) {
if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|| ($action == 'updateedit')) {
- $tmparray = getCountry(GETPOST('country_id', 'int'), 'all', $db, $langs, 0);
+ $tmparray = getCountry(GETPOSTINT('country_id'), 'all', $db, $langs, 0);
if (!empty($tmparray['id'])) {
+ if ($tmparray['code'] == 'FR' && $tmparray['id'] != $mysoc->country_id) {
+ // For FR, default value of option to show profid SIREN is on by default
+ $res = dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", 1, 'chaine', 0, '', $conf->entity);
+ }
+
$mysoc->country_id = $tmparray['id'];
$mysoc->country_code = $tmparray['code'];
$mysoc->country_label = $tmparray['label'];
diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
index f71ddb0ca60..80da9f12971 100644
--- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
+++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
@@ -232,6 +232,8 @@ class PrestaShopWebservice
if ($response != '') {
libxml_clear_errors();
libxml_use_internal_errors(true);
+ libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only if LIBXML_VERSION < 20900
+
if (!function_exists('simplexml_load_string')) {
throw new PrestaShopWebserviceException('Method simplexml_load_string not available. Your PHP does not support xml.');
}
diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php
index 4b9ccda6b09..658543e68c3 100644
--- a/htdocs/bom/class/api_boms.class.php
+++ b/htdocs/bom/class/api_boms.class.php
@@ -559,7 +559,7 @@ class Boms extends DolibarrApi
*
* @return void
*/
- private function checkRefNumbering(): void
+ private function checkRefNumbering()
{
$ref = substr($this->bom->ref, 1, 4);
if ($this->bom->status > 0 && $ref == 'PROV') {
diff --git a/htdocs/bom/tpl/linkedobjectblock.tpl.php b/htdocs/bom/tpl/linkedobjectblock.tpl.php
index d00340a1322..082936be50a 100644
--- a/htdocs/bom/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/bom/tpl/linkedobjectblock.tpl.php
@@ -62,7 +62,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
$product_static->getNomUrl(1);
}
print '';
- echo ''.dol_print_date($objectlink->date_creation, 'day').' ';
+ echo ''.dol_print_date($objectlink->date_creation, 'day').' ';
echo '';
if ($user->hasRight('commande', 'lire')) {
$total = $total + $objectlink->total_ht;
diff --git a/htdocs/bookcal/bookcalindex.php b/htdocs/bookcal/bookcalindex.php
index c236815a040..c2116980254 100644
--- a/htdocs/bookcal/bookcalindex.php
+++ b/htdocs/bookcal/bookcalindex.php
@@ -138,7 +138,7 @@ print '';
$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT
// Last modified myobject
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index f586cbca79a..21222ad3853 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -7,7 +7,7 @@
* Copyright (C) 2013 Florian Henry
* Copyright (C) 2014 Cedric GROSS
* Copyright (C) 2015 Alexandre Spangaro
- * Copyright (C) 2018-2021 Frédéric France
+ * Copyright (C) 2018-2023 Frédéric France
* Copyright (C) 2019 Ferran Marcet
*
* This program is free software; you can redistribute it and/or modify
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 652f60552ff..5e403dff7a8 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -575,6 +575,7 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
/* The fast and low memory method to get and count full list converts the sql into a sql count */
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
+
$resql = $db->query($sqlforcount);
if ($resql) {
$objforcount = $db->fetch_object($resql);
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 44a7565e9be..da07b9f9dd6 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -64,7 +64,7 @@ if (isset($user->socid) && $user->socid > 0) {
}
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
$maxofloop = (!getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
$now = dol_now();
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 791f67fcd56..0209622bd21 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -206,11 +206,18 @@ if (empty($reshook)) {
} elseif ($action == 'reopen' && $usercancreate) {
// Reopen a closed order
if ($object->statut == Commande::STATUS_CANCELED || $object->statut == Commande::STATUS_CLOSED) {
- $result = $object->set_reopen($user);
- if ($result > 0) {
- setEventMessages($langs->trans('OrderReopened', $object->ref), null);
+ if (dolGetGlobalInt('ORDER_REOPEN_TO_DRAFT')) {
+ $result = $object->setDraft($user, $idwarehouse);
+ if ($result < 0) {
+ setEventMessages($object->error, $object->errors, 'errors');
+ }
} else {
- setEventMessages($object->error, $object->errors, 'errors');
+ $result = $object->set_reopen($user);
+ if ($result > 0) {
+ setEventMessages($langs->trans('OrderReopened', $object->ref), null);
+ } else {
+ setEventMessages($object->error, $object->errors, 'errors');
+ }
}
}
} elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) {
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 7958762e720..cf30a608387 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -56,7 +56,7 @@ if ($user->socid > 0) {
$socid = $user->socid;
}
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
// Maximum elements of the tables
$maxDraftCount = !getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD;
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 5b10b742d87..4ac22405287 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -701,6 +701,15 @@ class Account extends CommonObject
}
// Load librairies to check BAN
+ $balance = $this->balance;
+ if (empty($balance) && !empty($this->solde)) {
+ $balance = $this->solde;
+ }
+ if (empty($balance)) {
+ $balance = 0;
+ }
+
+ // Load the library to validate/check a BAN account
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
$now = dol_now();
@@ -779,7 +788,7 @@ class Account extends CommonObject
$accline = new AccountLine($this->db);
$accline->datec = $now;
$accline->label = '('.$langs->trans("InitialBankBalance").')';
- $accline->amount = price2num($this->solde);
+ $accline->amount = price2num($balance);
$accline->fk_user_author = $user->id;
$accline->fk_account = $this->id;
$accline->datev = $this->date_solde;
diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php
index 36d118672e1..fe614a7d2dc 100644
--- a/htdocs/compta/facture/index.php
+++ b/htdocs/compta/facture/index.php
@@ -41,7 +41,7 @@ if (isset($user->socid) && $user->socid > 0) {
$socid = $user->socid;
}
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
// Maximum elements of the tables
$maxDraftCount = !getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? $max : $conf->global->MAIN_MAXLIST_OVERLOAD;
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index d58a1cf15d4..f66b13dca46 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -925,6 +925,7 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
/* The fast and low memory method to get and count full list converts the sql into a sql count */
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
+
$resql = $db->query($sqlforcount);
if ($resql) {
$objforcount = $db->fetch_object($resql);
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index ec46ef0af3c..14aa6143769 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -67,7 +67,7 @@ if ($user->socid > 0) {
$socid = $user->socid;
}
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
// Maximum elements of the tables
$maxDraftCount = !getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD;
diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php
index 257f351cfca..63cb9b68257 100644
--- a/htdocs/core/boxes/box_funnel_of_prospection.php
+++ b/htdocs/core/boxes/box_funnel_of_prospection.php
@@ -102,6 +102,7 @@ class box_funnel_of_prospection extends ModeleBoxes
$sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls";
$sql .= " WHERE active=1";
$sql .= " AND cls.code <> 'LOST'";
+ $sql .= " AND cls.code <> 'WON'";
$sql .= $this->db->order('cls.rowid', 'ASC');
$resql = $this->db->query($sql);
if ($resql) {
@@ -126,9 +127,6 @@ class box_funnel_of_prospection extends ModeleBoxes
case 'NEGO':
$colorseriesstat[$objp->rowid] = $badgeStatus4;
break;
- case 'WON':
- $colorseriesstat[$objp->rowid] = $badgeStatus6;
- break;
default:
break;
}
@@ -152,7 +150,7 @@ class box_funnel_of_prospection extends ModeleBoxes
$sql .= " WHERE p.entity IN (".getEntity('project').")";
$sql .= " AND p.fk_opp_status = cls.rowid";
$sql .= " AND p.fk_statut = 1"; // Opend projects only
- $sql .= " AND cls.code NOT IN ('LOST')";
+ $sql .= " AND cls.code NOT IN ('LOST', 'WON')";
$sql .= " GROUP BY p.fk_opp_status, cls.code";
$resql = $this->db->query($sql);
@@ -236,6 +234,7 @@ class box_funnel_of_prospection extends ModeleBoxes
$dolgraph->setShowPercent(1);
$dolgraph->setMirrorGraphValues(true);
$dolgraph->setBorderWidth(2);
+ $dolgraph->setBorderSkip('false');
$dolgraph->SetType(array('horizontalbars'));
$dolgraph->SetHeight('200');
$dolgraph->SetWidth('600');
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index ef31fb50485..e65226b13d1 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -167,8 +167,9 @@ abstract class CommonObject
* @var CommonObject To store a cloned copy of object before to edit it and keep track of old properties
*/
public $oldcopy;
+
/**
- * @var CommonObject To store old value of a modified ref
+ * @var string To store old value of a modified ref
*/
public $oldref;
diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php
index 63987d29b9a..606ad2719af 100644
--- a/htdocs/core/class/dolgraph.class.php
+++ b/htdocs/core/class/dolgraph.class.php
@@ -94,6 +94,7 @@ class DolGraph
public $bgcolorgrid = array(255, 255, 255); // array(R,G,B)
public $datacolor; // array(array(R,G,B),...)
public $borderwidth = 1;
+ public $borderskip = 'start';
private $stringtoshow; // To store string to output graph into HTML page
@@ -311,6 +312,18 @@ class DolGraph
$this->borderwidth = $borderwidth;
}
+ /**
+ * Set border skip
+ *
+ * @param int $borderskip Can be 'start' to skip start border, 'end' to skip end border, 'middle' to skip middle border,
+ * 'false' to not skip any border, 'true' to skip all border
+ * @return void
+ */
+ public function setBorderSkip($borderskip)
+ {
+ $this->borderskip = $borderskip;
+ }
+
/**
* Set tooltips labels of the graph
*
@@ -1483,6 +1496,7 @@ class DolGraph
$this->stringtoshow .= 'borderWidth: \''.$this->borderwidth.'\', ';
}
$this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', ';
+ $this->stringtoshow .= 'borderSkipped: \'' . $this->borderskip . '\', ';
$this->stringtoshow .= 'backgroundColor: \'' . $color . '\', ';
if (!empty($arrayofgroupslegend) && !empty($arrayofgroupslegend[$i])) {
$this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a81f40ebc2f..c656a42a3ea 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -9908,7 +9908,7 @@ class Form
if (isModEnabled('gravatar') && $email && empty($noexternsourceoverwrite)) {
// see https://gravatar.com/site/implement/images/php/
$ret .= '';
- $ret .= ' '; // gravatar need md5 hash
+ $ret .= ' '; // gravatar need md5 hash
} else {
if ($nophoto == 'company') {
$ret .= '' . img_picto('', 'company') . '
';
diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php
index 6895969f2cb..90b17804022 100644
--- a/htdocs/core/class/html.formaccounting.class.php
+++ b/htdocs/core/class/html.formaccounting.class.php
@@ -292,7 +292,8 @@ class FormAccounting extends Form
if ($obj->rowid == $selected) {
$out .= ' selected';
}
- $out .= ' data-html="'.dol_escape_htmltag(dol_string_onlythesehtmltags($titletoshowhtml, 1, 1, 0, 0, array('span'))).'"';
+ //$out .= ' data-html="'.dol_escape_htmltag(dol_string_onlythesehtmltags($titletoshowhtml, 1, 0, 0, 0, array('span'))).'"';
+ $out .= ' data-html="'.dolPrintHTMLForAttribute($titletoshowhtml).'"';
$out .= '>';
$out .= dol_escape_htmltag($titletoshow);
$out .= '';
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index fe0f6c71e1f..0112d617ac4 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -1532,7 +1532,7 @@ class FormTicket
$ticketstat->socid = $ticketstat->fk_soc;
$ticketstat->fetch_thirdparty();
- if (is_array($ticketstat->thirdparty->email) && !in_array($ticketstat->thirdparty->email, $sendto)) {
+ if (!empty($ticketstat->thirdparty->email) && !in_array($ticketstat->thirdparty->email, $sendto)) {
$sendto[] = $ticketstat->thirdparty->email.' ('.$langs->trans('Customer').') ';
}
}
diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php
index a58ba5fe186..6df394cc8a3 100644
--- a/htdocs/core/class/rssparser.class.php
+++ b/htdocs/core/class/rssparser.class.php
@@ -260,6 +260,8 @@ class RssParser
if (getDolGlobalString('EXTERNALRSS_USE_SIMPLEXML')) {
//print 'xx'.LIBXML_NOCDATA;
libxml_use_internal_errors(false);
+ libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only if LIBXML_VERSION < 20900
+
$rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA|LIBXML_NOCDATA);
} else {
if (!function_exists('xml_parser_create')) {
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index cacfa0f4495..d899c86a22f 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -1584,7 +1584,7 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprin
* @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket... to list events linked to an object
* @param Contact $objcon Filter on object contact to filter events on a contact
* @param int $noprint Return string but does not output it
- * @param string $actioncode Filter on actioncode
+ * @param string|string[] $actioncode Filter on actioncode
* @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all).
* @param array $filters Filter on other fields
* @param string $sortfield Sort field
@@ -1810,13 +1810,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$sql .= ' AND (';
foreach ($actioncode as $key => $code) {
if ($key != 0) {
- $sql .= "OR (";
+ $sql .= " OR ";
}
if (!empty($code)) {
- addEventTypeSQL($sql, $code);
- }
- if ($key != 0) {
- $sql .= ")";
+ addEventTypeSQL($sql, $code, "");
}
}
$sql .= ')';
@@ -2284,7 +2281,7 @@ function show_subsidiaries($conf, $langs, $db, $object)
$socstatic->name_alias = $obj->name_alias;
$socstatic->email = $obj->email;
$socstatic->code_client = $obj->code_client;
- $socstatic->code_fournisseur = $obj->code_client;
+ $socstatic->code_fournisseur = $obj->code_fournisseur;
$socstatic->code_compta = $obj->code_compta;
$socstatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
$socstatic->email = $obj->email;
@@ -2334,19 +2331,19 @@ function addEventTypeSQL(&$sql, $actioncode, $sqlANDOR = "AND")
if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
if ($actioncode == 'AC_NON_AUTO') {
- $sql .= " $sqlANDOR c.type != 'systemauto'";
+ $sql .= " $sqlANDOR c.type <> 'systemauto'";
} elseif ($actioncode == 'AC_ALL_AUTO') {
$sql .= " $sqlANDOR c.type = 'systemauto'";
} else {
if ($actioncode == 'AC_OTH') {
- $sql .= " $sqlANDOR c.type != 'systemauto'";
+ $sql .= " $sqlANDOR c.type <> 'systemauto'";
} elseif ($actioncode == 'AC_OTH_AUTO') {
$sql .= " $sqlANDOR c.type = 'systemauto'";
}
}
} else {
if ($actioncode == 'AC_NON_AUTO') {
- $sql .= " $sqlANDOR c.type != 'systemauto'";
+ $sql .= " $sqlANDOR c.type <> 'systemauto'";
} elseif ($actioncode == 'AC_ALL_AUTO') {
$sql .= " $sqlANDOR c.type = 'systemauto'";
} else {
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index a87884fbad9..19d6f425acd 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1651,7 +1651,7 @@ function dolPrintHTML($s, $allowiframe = 0)
}
/**
- * Return a string ready to be output on an HTML attribute (alt, title, ...)
+ * Return a string ready to be output on an HTML attribute (alt, title, data-html, ...)
*
* @param string $s String to print
* @return string String ready for HTML output
@@ -1660,7 +1660,7 @@ function dolPrintHTMLForAttribute($s)
{
// The dol_htmlentitiesbr will convert simple text into html
// The dol_escape_htmltag will escape html chars.
- return dol_escape_htmltag(dol_htmlentitiesbr($s), 1, -1);
+ return dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'span')), 1, -1, '', 0, 1);
}
/**
@@ -7617,6 +7617,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
if (!empty($out) && getDolGlobalString('MAIN_RESTRICTHTML_ONLY_VALID_HTML') && $check != 'restricthtmlallowunvalid') {
try {
libxml_use_internal_errors(false); // Avoid to fill memory with xml errors
+ libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only if LIBXML_VERSION < 20900
$dom = new DOMDocument();
// Add a trick to solve pb with text without parent tag
@@ -9781,8 +9782,15 @@ function picto_from_langcode($codelang, $moreatt = '', $notitlealt = 0)
$flagImage = empty($tmparray[1]) ? $tmparray[0] : $tmparray[1];
}
+ $morecss = '';
+ $reg = array();
+ if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) {
+ $morecss = $reg[1];
+ $moreatt = "";
+ }
+
// return img_picto_common($codelang, 'flags/'.strtolower($flagImage).'.png', $moreatt, 0, $notitlealt);
- return ' ';
+ return ' ';
}
/**
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index 3c5e697f91e..3ff44d56866 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -134,65 +134,6 @@ function dol_getDefaultFormat(Translate $outputlangs = null)
return $selected;
}
-/**
- * Output content of a file $filename in version of current language (otherwise may use an alternate language)
- *
- * @param Translate $langs Object language to use for output
- * @param string $filename Relative filename to output
- * @param int $searchalt 1=Search also in alternative languages
- * @return boolean true if OK, false if KO
- */
-function dol_print_file($langs, $filename, $searchalt = 0)
-{
- global $conf;
-
- // Test if file is in lang directory
- foreach ($langs->dir as $searchdir) {
- $formfile = ($searchdir."/langs/".$langs->defaultlang."/".$filename);
- dol_syslog('functions2::dol_print_file search file '.$formfile, LOG_DEBUG);
- if (is_readable($formfile)) {
- $content = file_get_contents($formfile);
- $isutf8 = utf8_check($content);
- if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') {
- print mb_convert_encoding($content, 'UTF-8', 'ISO-8859-1');
- } elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') {
- print mb_convert_encoding($content, 'ISO-8859-1');
- } else {
- print $content;
- }
- return true;
- } else {
- dol_syslog('functions2::dol_print_file not found', LOG_DEBUG);
- }
-
- if ($searchalt) {
- // Test si fichier dans repertoire de la langue alternative
- if ($langs->defaultlang != "en_US") {
- $formfilealt = $searchdir."/langs/en_US/".$filename;
- } else {
- $formfilealt = $searchdir."/langs/fr_FR/".$filename;
- }
- dol_syslog('functions2::dol_print_file search alt file '.$formfilealt, LOG_DEBUG);
- //print 'getcwd='.getcwd().' htmlfilealt='.$formfilealt.' X '.file_exists(getcwd().'/'.$formfilealt);
- if (is_readable($formfilealt)) {
- $content = file_get_contents($formfilealt);
- $isutf8 = utf8_check($content);
- if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') {
- print mb_convert_encoding($content, 'UTF-8', 'ISO-8859-1');
- } elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') {
- print mb_convert_encoding($content, 'ISO-8859-1', 'UTF-8');
- } else {
- print $content;
- }
- return true;
- } else {
- dol_syslog('functions2::dol_print_file not found', LOG_DEBUG);
- }
- }
- }
-
- return false;
-}
/**
* Show informations on an object
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 34d8b40f939..7eb552fac92 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -229,10 +229,11 @@ function dolDecrypt($chain, $key = '')
* @param string $chain String to hash
* @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4': for OpenLdap, '5':sha256, '6':password_hash).
* Use 'md5' if hash is not needed for security purpose. For security need, prefer 'auto'.
+ * @param string $nosalt Do not include any salt
* @return string Hash of string
* @see getRandomPassword(), dol_verifyHash()
*/
-function dol_hash($chain, $type = '0')
+function dol_hash($chain, $type = '0', $nosalt = 0)
{
// No need to add salt for password_hash
if (($type == '0' || $type == 'auto') && getDolGlobalString('MAIN_SECURITY_HASH_ALGO') && getDolGlobalString('MAIN_SECURITY_HASH_ALGO') == 'password_hash' && function_exists('password_hash')) {
@@ -240,7 +241,7 @@ function dol_hash($chain, $type = '0')
}
// Salt value
- if (getDolGlobalString('MAIN_SECURITY_SALT') && $type != '4' && $type !== 'openldap') {
+ if (getDolGlobalString('MAIN_SECURITY_SALT') && $type != '4' && $type !== 'openldap' && empty($nosalt)) {
$chain = getDolGlobalString('MAIN_SECURITY_SALT') . $chain;
}
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index b6b36bcab09..4aa247e49d1 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1488,10 +1488,10 @@ function get_left_menu_billing($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen
$newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment');
- if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) {
- $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid');
+ if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION') && preg_match('/customers_bills_payment/', $leftmenu)) {
+ $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_payment_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_tovalid');
}
- if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu)) {
+ if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills_payment/', $leftmenu)) {
$newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report');
}
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index 9e45515a15e..940a4f09a6d 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -6,6 +6,7 @@
* Copyright (C) 2015 Marcos García
* Copyright (C) 2017 Ferran Marcet
* Copyright (C) 2018-2022 Frédéric France
+ * Copyright (C) 2023 William Mead
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1197,9 +1198,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
- $w = 100;
+ $w = 110;
- $posx = $this->page_largeur - $this->marge_droite - 100;
+ $posx = $this->page_largeur - $this->marge_droite - $w;
$posy = $this->marge_haute;
$pdf->SetXY($this->marge_gauche, $posy);
diff --git a/htdocs/eventorganization/eventorganizationindex.php b/htdocs/eventorganization/eventorganizationindex.php
index 60f5beefd70..7a2be5096ca 100644
--- a/htdocs/eventorganization/eventorganizationindex.php
+++ b/htdocs/eventorganization/eventorganizationindex.php
@@ -148,7 +148,7 @@ print ' ';
$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT
// Last modified myobject
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index 6394000d007..5426fc1a8ac 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -638,7 +638,7 @@ if (empty($reshook)) {
$emailTo = $destinataire->email;
// CC
- $emailCC = $conf->global->NDF_CC_EMAILS;
+ $emailCC = getDolGlobalString('NDF_CC_EMAILS');
if (empty($emailTo)) {
$emailTo = $emailCC;
}
@@ -646,7 +646,7 @@ if (empty($reshook)) {
// FROM
$expediteur = new User($db);
$expediteur->fetch($object->fk_user_approve > 0 ? $object->fk_user_approve : $object->fk_user_validator);
- $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM;
+ $emailFrom = getDolGlobalString('MAIN_MAIL_EMAIL_FROM');
if ($emailFrom && $emailTo) {
$filename = array();
@@ -654,9 +654,9 @@ if (empty($reshook)) {
$mimetype = array();
// SUBJECT
- $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM;
+ $societeName = getDolGlobalString('MAIN_INFO_SOCIETE_NOM');
if (getDolGlobalString('MAIN_APPLICATION_TITLE')) {
- $societeName = $conf->global->MAIN_APPLICATION_TITLE;
+ $societeName = getDolGlobalString('MAIN_APPLICATION_TITLE');
}
$subject = $societeName." - ".$langs->transnoentities("ExpenseReportApproved");
diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php
index b590bbfdc20..c838b7033cf 100644
--- a/htdocs/fichinter/class/fichinter.class.php
+++ b/htdocs/fichinter/class/fichinter.class.php
@@ -1361,7 +1361,7 @@ class Fichinter extends CommonObject
* @param array $array_options Array option
* @return int >0 if ok, <0 if ko
*/
- public function addline($user, $fichinterid, $desc, $date_intervention, $duration, $array_options = '')
+ public function addline($user, $fichinterid, $desc, $date_intervention, $duration, $array_options = [])
{
dol_syslog(get_class($this)."::addline $fichinterid, $desc, $date_intervention, $duration");
diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php
index 98f5c15c5ce..87127b34010 100644
--- a/htdocs/fourn/class/api_supplier_invoices.class.php
+++ b/htdocs/fourn/class/api_supplier_invoices.class.php
@@ -235,7 +235,7 @@ class SupplierInvoices extends DolibarrApi
}
if ($this->invoice->create(DolibarrApiAccess::$user) < 0) {
- throw new RestException(500, "Error creating order", array_merge(array($this->invoice->error), $this->invoice->errors));
+ throw new RestException(500, "Error creating invoice ", array_merge(array($this->invoice->error), $this->invoice->errors));
}
return $this->invoice->id;
}
diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php
index cec0ab88d12..17c852f449d 100644
--- a/htdocs/fourn/class/fournisseur.facture-rec.class.php
+++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php
@@ -1426,7 +1426,7 @@ class FactureFournisseurRec extends CommonInvoice
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
- public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = '', $save_lastsearch_value = -1)
+ public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1)
{
global $langs, $hookmanager;
@@ -2029,7 +2029,7 @@ class FactureFournisseurLigneRec extends CommonObjectLine
* @param int $notrigger Disable triggers
* @return int Return integer <0 if KO, >0 if OK
*/
- public function delete(User $user, $notrigger = false)
+ public function delete(User $user, $notrigger = 0)
{
$error = 0;
$this->db->begin();
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 05f91cdb6af..65a00f8affc 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -1916,19 +1916,18 @@ class FactureFournisseur extends CommonInvoice
// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
$oldref = dol_sanitizeFileName($this->ref);
- $newref = dol_sanitizeFileName($num);
$dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$oldref;
- $dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref;
+ $dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->newref;
if (!$error && file_exists($dirsource)) {
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
if (@rename($dirsource, $dirdest)) {
dol_syslog("Rename ok");
- // Rename docs starting with $oldref with $newref
- $listoffiles = dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
+ // Rename docs starting with $oldref with $this->newref
+ $listoffiles = dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->newref, 'files', 1, '^'.preg_quote($oldref, '/'));
foreach ($listoffiles as $fileentry) {
$dirsource = $fileentry['name'];
- $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource);
+ $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $this->newref, $dirsource);
$dirsource = $fileentry['path'].'/'.$dirsource;
$dirdest = $fileentry['path'].'/'.$dirdest;
@rename($dirsource, $dirdest);
diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php
index 37e937bbca0..4ca0db593c5 100644
--- a/htdocs/fourn/class/paiementfourn.class.php
+++ b/htdocs/fourn/class/paiementfourn.class.php
@@ -98,7 +98,7 @@ class PaiementFourn extends Paiement
* @param int $fk_bank Id of bank line associated to payment
* @return int Return integer <0 if KO, -2 if not found, >0 if OK
*/
- public function fetch($id, $ref = '', $fk_bank = '')
+ public function fetch($id, $ref = '', $fk_bank = 0)
{
$error = 0;
diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php
index f3b9be0cced..8e0b6457e6f 100644
--- a/htdocs/fourn/facture/index.php
+++ b/htdocs/fourn/facture/index.php
@@ -38,7 +38,7 @@ if (isset($user->socid) && $user->socid > 0) {
$socid = $user->socid;
}
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
// Maximum elements of the tables
$maxDraftCount = !getDolGlobalString('MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD;
diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php
index 486e47f8b38..bc9998adf82 100644
--- a/htdocs/hrm/class/skill.class.php
+++ b/htdocs/hrm/class/skill.class.php
@@ -20,7 +20,7 @@
*/
/**
- * \file class/skill.class.php
+ * \file htdocs/hrm/class/skill.class.php
* \ingroup hrm
* \brief This file is a CRUD class file for Skill (Create/Read/Update/Delete)
*/
@@ -244,14 +244,14 @@ class Skill extends CommonObject
* createSkills
*
* @param int $i Rank from which we want to create skilldets (level $i to HRM_MAXRANK wil be created)
- * @return null
+ * @return int Return integer <0 if KO, Id of created object if OK
*/
public function createSkills($i = 1)
{
global $conf, $user, $langs;
- $MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : self::DEFAULT_MAX_RANK_PER_SKILL;
- $defaultSkillDesc = getDolGlobalString('HRM_DEFAULT_SKILL_DESCRIPTION') ? $conf->global->HRM_DEFAULT_SKILL_DESCRIPTION : $langs->trans("NoDescription");
+ $MaxNumberSkill = getDolGlobalInt('HRM_MAXRANK', self::DEFAULT_MAX_RANK_PER_SKILL);
+ $defaultSkillDesc = getDolGlobalString('HRM_DEFAULT_SKILL_DESCRIPTION', $langs->trans("NoDescription"));
$error = 0;
diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php
index fe8b86c78b6..dbcca1b50d4 100644
--- a/htdocs/hrm/index.php
+++ b/htdocs/hrm/index.php
@@ -72,7 +72,7 @@ if (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') || !getDolGlobalString('MAIN_IN
$setupcompanynotcomplete = 1;
}
-$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
+$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
/*
@@ -90,6 +90,8 @@ if (isModEnabled('holiday') && !empty($setupcompanynotcomplete)) {
* View
*/
+$listofsearchfields = array();
+
$childids = $user->getAllChildIds();
$childids[] = $user->id;
@@ -187,7 +189,7 @@ print '
';
-// Latest leave requests
+// Latest modified leave requests
if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.statut as user_status,";
$sql .= " x.rowid, x.ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status";
@@ -271,7 +273,7 @@ if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
}
-// Latest expense report
+// Latest modified expense report
if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) {
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo,";
$sql .= " x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status";
@@ -406,7 +408,7 @@ if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjo
$db->free($resql);
} else {
- print '
'.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
}
print "
";
print "";
diff --git a/htdocs/includes/nusoap/lib/README.md b/htdocs/includes/nusoap/lib/README.md
new file mode 100644
index 00000000000..9845d852c11
--- /dev/null
+++ b/htdocs/includes/nusoap/lib/README.md
@@ -0,0 +1,62 @@
+
+NuSOAP is a rewrite of SOAPx4, provided by NuSphere and Dietrich Ayala. It is a set of PHP classes - no PHP extensions required - that allow developers to create and consume web services based on SOAP 1.1, WSDL 1.1 and HTTP 1.0/1.1.
+
+
+