| '.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").') | '.DOL_VERSION;
// If current version differs from last upgrade
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE))
@@ -139,7 +139,7 @@ print ' ';
// Session
print '';
print ' ';
-print '| '.$langs->trans("Session").' | '.$langs->trans("Value").' | '."\n";
+print '| '.$langs->trans("Session").' | '.$langs->trans("Value").' | '."\n";
print '| '.$langs->trans("SessionSavePath").' | '.session_save_path().' | '."\n";
print '| '.$langs->trans("SessionName").' | '.session_name().' | '."\n";
print '| '.$langs->trans("SessionId").' | '.session_id().' | '."\n";
@@ -180,7 +180,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
print '';
print ' ';
print '';
- print '| '.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").' | ';
+ print ''.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").' | ';
print ''.$langs->trans("NbOfEntries").' | ';
print ''.$langs->trans("Address").' | ';
print ' '."\n";
@@ -202,7 +202,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
// Localisation
print '';
print ' ';
-print '| '.$langs->trans("LocalisationDolibarrParameters").' | '.$langs->trans("Value").' | '."\n";
+print '| '.$langs->trans("LocalisationDolibarrParameters").' | '.$langs->trans("Value").' | '."\n";
print '| '.$langs->trans("LanguageBrowserParameter", "HTTP_ACCEPT_LANGUAGE").' | '.$_SERVER["HTTP_ACCEPT_LANGUAGE"].' | '."\n";
print '| '.$langs->trans("CurrentUserLanguage").' | '.$langs->getDefaultLang().' | '."\n";
// Thousands
@@ -342,7 +342,7 @@ $configfileparameters = array(
print '';
print ' ';
print '';
-print '| '.$langs->trans("Parameters").' ';
+print ' | '.$langs->trans("Parameters").' ';
print $langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')';
print ' | ';
print ''.$langs->trans("Parameter").' | ';
diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index 388b61c75cf..766869902fb 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -93,13 +93,13 @@ if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2)
print '';
-print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | ';
+print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | ';
$ErrorPicturePath = "../../theme/eldy/img/error.png";
$WarningPicturePath = "../../theme/eldy/img/warning.png";
$OkayPicturePath = "../../theme/eldy/img/tick.png";
-print '| '.$langs->trans("Version").' | ';
+print ' | | '.$langs->trans("Version").' | ';
$arrayphpminversionerror = array(5, 5, 0);
$arrayphpminversionwarning = array(5, 6, 0);
@@ -153,11 +153,8 @@ $loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
print '';
print '';
-print '| '.$langs->trans("Extension").' | ';
-//print ''.$langs->trans("EnabledInSetup").' | ';
-print ''.$langs->trans("Loaded").' | ';
-print ''.$langs->trans("FunctionTest").' | ';
-print ''.$langs->trans("Result").' | ';
+print ''.$langs->trans("Extension").' | ';
+print ''.$langs->trans("Test").' | ';
print ' ';
$functions = ["mb_check_encoding"];
@@ -165,9 +162,6 @@ $name = "MBString";
print "";
print "| ".$name." | ";
-//print getTableColumn($name, $activatedExtensions);
-print getTableColumn($name, $loadedExtensions);
-print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print " ";
@@ -176,9 +170,6 @@ $name = "JSON";
print "";
print "| ".$name." | ";
-//print getTableColumn($name, $activatedExtensions);
-print getTableColumn($name, $loadedExtensions);
-print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print " ";
@@ -187,8 +178,6 @@ $name = "GD";
print "";
print "| ".$name." | ";
-print getTableColumn($name, $loadedExtensions);
-print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print " ";
@@ -197,8 +186,6 @@ $name = "Curl";
print "";
print "| ".$name." | ";
-print getTableColumn($name, $loadedExtensions);
-print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print " ";
@@ -209,8 +196,6 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
print "";
print "| ".$name." | ";
- print getTableColumn($name, $loadedExtensions);
- print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print " ";
}
@@ -220,8 +205,6 @@ $name = "IMAP";
print "";
print "| ".$name." | ";
-print getTableColumn($name, $loadedExtensions);
-print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print " ";
@@ -230,8 +213,6 @@ $name = "xDebug";
print "";
print "| ".$name." | ";
-print getTableColumn($name, $loadedExtensions);
-print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print " ";
@@ -246,7 +227,7 @@ foreach ($phparray as $key => $value)
print '';
print ' ';
print '';
- print '| '.$key.' | ';
+ print ''.$key.' | ';
print ''.$langs->trans("Value").' | ';
print " \n";
@@ -293,69 +274,6 @@ llxFooter();
$db->close();
-/**
- * Return a table column with a indicator (okay or warning), based on the given name and list
- *
- * @param string $name The name to check inside the given list
- * @param array $list A list that should contains the given name
- *
- * @return string
- */
-function getTableColumn($name, array $list)
-{
- global $langs;
-
- $name = strtolower($name);
- $html = "";
-
- if (in_array($name, $list))
- {
- if ($name == 'xdebug') $html .= ' ';
- else $html .= ' ';
- } else {
- if ($name == 'xdebug') $html .= yn(0);
- else $html .= ' ';
- }
-
- $html .= " | ";
-
- return $html;
-}
-
-/**
- * Return a table column with a indicator (okay or warning), based on the given functions to check
- *
- * @param array $functions A list with functions to check
- *
- * @return string
- */
-function getTableColumnFunction(array $functions)
-{
- if (count($functions) < 1)
- {
- return "- | ";
- }
-
- $result = true;
- $html = "";
-
- foreach ($functions as $function)
- {
- $result = $result && function_exists($function);
- }
-
- if ($result)
- {
- $html .= ' ';
- } else {
- $html .= ' ';
- }
-
- $html .= " | ";
-
- return $html;
-}
-
/**
* Return a result column with a translated result text
*
@@ -363,7 +281,6 @@ function getTableColumnFunction(array $functions)
* @param array $activated A list with all activated PHP extensions. Deprecated.
* @param array $loaded A list with all loaded PHP extensions
* @param array $functions A list with all PHP functions to check
- *
* @return string
*/
function getResultColumn($name, array $activated, array $loaded, array $functions)
@@ -371,6 +288,7 @@ function getResultColumn($name, array $activated, array $loaded, array $function
global $langs;
$result = true;
+
//$result = $result && in_array(strtolower($name), $activated);
$result = $result && in_array(strtolower($name), $loaded);
@@ -380,7 +298,29 @@ function getResultColumn($name, array $activated, array $loaded, array $function
}
$html = "";
- $html .= $result ? $langs->trans("PHPSupport", $name) : $langs->trans("ErrorPHPDoesNotSupport", $name);
+ if ($result) {
+ if (strtolower($name) == 'xdebug') $html .= img_warning($langs->trans("ModuleActivated", "xdebug"));
+ else $html .= img_picto($langs->trans("Ok"), 'tick');
+ if (in_array(strtolower($name), $loaded)) {
+ $html .= ' '.$langs->trans("Loaded").' - ';
+ } else {
+ //$html .= ' '.$langs->trans("NotLoaded").' - ';
+ }
+ if (strtolower($name) == 'xdebug') {
+ $html .= ' '.$langs->trans("ModuleActivated", "xdebug");
+ } else {
+ $html .= ' '.$langs->trans("PHPSupport", $name);
+ }
+ } else {
+ if (strtolower($name) == 'xdebug') $html .= yn(0);
+ else $html .= img_warning($langs->trans("ModuleActivated", "xdebug"));
+ if (in_array(strtolower($name), $loaded)) {
+ $html .= ' '.$langs->trans("Loaded").' - ';
+ } else {
+ //$html .= ' '.$langs->trans("NotLoaded").' - ';
+ }
+ $html .= ' '.$langs->trans("ErrorPHPDoesNotSupport", $name);
+ }
$html .= " | ";
return $html;
diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php
index f978c0dcd81..f0ada86a393 100644
--- a/htdocs/admin/system/security.php
+++ b/htdocs/admin/system/security.php
@@ -43,9 +43,6 @@ if (GETPOST('action', 'aZ09') == 'donothing')
* View
*/
-$form = new Form($db);
-$nowstring = dol_print_date(dol_now(), 'dayhourlog');
-
llxHeader();
print load_fiche_titre($langs->trans("Security"), '', 'title_setup');
@@ -78,7 +75,7 @@ else {
print ' ';
print ' ';
-print load_fiche_titre($langs->trans("ConfigFile"), '', 'folder');
+print load_fiche_titre($langs->trans("ConfigurationFile"), '', 'folder');
print ''.$langs->trans("dolibarr_main_prod").': '.$dolibarr_main_prod;
if (empty($dolibarr_main_prod)) {
@@ -90,7 +87,12 @@ print ''.$langs->trans("dolibarr_nocsrfcheck").': '.$dolibarr_n
if (!empty($dolibarr_nocsrfcheck)) {
print img_picto('', 'warning').' '.$langs->trans("IfYouAreOnAProductionSetThis", 0);
}
+print ' ';
+print ''.$langs->trans("dolibarr_main_restrict_ip").': '.$dolibarr_main_restrict_ip;
+/*if (empty($dolibarr_main_restrict_ip)) {
+ print ' '.img_picto('', 'warning').' '.$langs->trans("IfYouAreOnAProductionSetThis", 1);
+}*/
print ' ';
print ' ';
@@ -102,9 +104,17 @@ print ''.$langs->trans("PermissionsOnFilesInWebRoot").': ';
print 'TODO';
print ' ';
-print ''.$langs->trans("PermissionsOnFile", 'conf.php').': ';
-// TODO Check permission on file conf.php (read only for the web user)
-print 'TODO';
+print ''.$langs->trans("PermissionsOnFile", $conffile).': '; // $conffile is defined into filefunc.inc.php
+$perms = fileperms($dolibarr_main_document_root.'/'.$conffile);
+if ($perms) {
+ if (($perms & 0x0004) || ($perms & 0x0002)) {
+ print img_warning().' '.$langs->trans("ConfFileIsReadableOrWritableByAnyUsers");
+ } else {
+ print img_picto('', 'tick');
+ }
+} else {
+ print img_warning().' '.$langs->trans("FailedToReadFile", $conffile);
+}
print ' ';
print ' ';
@@ -137,14 +147,15 @@ print ' ';
print load_fiche_titre($langs->trans("Menu").' '.$langs->trans("SecuritySetup"), '', 'folder');
//print ''.$langs->trans("PasswordEncryption").': ';
-print 'MAIN_SECURITY_HASH_ALGO = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? 'unset' : '')." ";
+print 'MAIN_SECURITY_HASH_ALGO = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? $langs->trans("Undefined") : '')." ";
print ' If unset: \'md5\' ';
print ' - Recommanded value: \'password_hash\' ';
-print 'MAIN_SECURITY_SALT = '.$conf->global->MAIN_SECURITY_SALT.' ';
+print 'MAIN_SECURITY_SALT = '.(empty($conf->global->MAIN_SECURITY_SALT) ? $langs->trans("Undefined") : '').' ';
print ' ';
// TODO
print ''.$langs->trans("AntivirusEnabledOnUpload").': ';
+print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? '' : img_picto('', 'tick').' ';
print yn($conf->global->MAIN_ANTIVIRUS_COMMAND ? 1 : 0);
if (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) {
print ' - '.$conf->global->MAIN_ANTIVIRUS_COMMAND;
diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php
index 9c936c1d943..0d91eb38e7d 100644
--- a/htdocs/compta/bank/various_payment/list.php
+++ b/htdocs/compta/bank/various_payment/list.php
@@ -424,6 +424,10 @@ if ($result)
{
$obj = $db->fetch_object($result);
+ $variousstatic->id = $obj->rowid;
+ $variousstatic->ref = $obj->rowid;
+ $variousstatic->label = $obj->label;
+
print '';
// No
@@ -433,15 +437,13 @@ if ($result)
// Ref
if ($arrayfields['ref']['checked']) {
- $variousstatic->id = $obj->rowid;
- $variousstatic->ref = $obj->rowid;
- print "| ".$variousstatic->getNomUrl(1)." | ";
+ print ''.$variousstatic->getNomUrl(1)." | ";
if (!$i) $totalarray['nbfield']++;
}
// Label payment
if ($arrayfields['label']['checked']) {
- print "".dol_trunc($obj->label, 40)." | ";
+ print ''.$variousstatic->label." | ";
if (!$i) $totalarray['nbfield']++;
}
@@ -460,7 +462,13 @@ if ($result)
// Type
if ($arrayfields['type']['checked']) {
- print ''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.' | ';
+ print '';
+ if ($obj->payment_code) {
+ print $langs->trans("PaymentTypeShort".$obj->payment_code);
+ print ' ';
+ }
+ print $obj->num_payment;
+ print ' | ';
if (!$i) $totalarray['nbfield']++;
}
diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php
index 08233ff754c..b47f948f4ca 100644
--- a/htdocs/core/boxes/box_factures_imp.php
+++ b/htdocs/core/boxes/box_factures_imp.php
@@ -110,7 +110,8 @@ class box_factures_imp extends ModeleBoxes
$sql .= " AND fk_statut = 1";
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
- $sql .= " GROUP BY s.nom, s.rowid, s.email, s.code_client, s.logo, f.ref, f.date_lim_reglement,";
+ $sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.logo, s.email, s.entity, s.tva_intra, s.siren, s.siret, s.ape, s.idprof4, s.idprof5, s.idprof6,";
+ $sql .= " f.ref, f.date_lim_reglement,";
$sql .= " f.type, f.datef, f.total, f.tva, f.total_ttc, f.paye, f.fk_statut, f.rowid";
//$sql.= " ORDER BY f.datef DESC, f.ref DESC ";
$sql .= " ORDER BY datelimite ASC, f.ref ASC ";
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 69fe8fee515..f2051aebba5 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1927,7 +1927,7 @@ class Form
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_list
*
* @param int $selected Preselected products
- * @param string $htmlname Name of HTML select field (must be unique in page)
+ * @param string $htmlname Name of HTML select field (must be unique in page).
* @param int $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param int $limit Limit on number of returned lines
* @param int $price_level Level of price to show
@@ -1949,7 +1949,7 @@ class Form
* @param string $nooutput No print, return the output into a string
* @return void|string
*/
- public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array(), $nooutput = 0)
+ public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = null, $nooutput = 0)
{
// phpcs:enable
global $langs, $conf;
@@ -1997,10 +1997,13 @@ class Form
}
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions);
- if (!empty($conf->variants->enabled)) {
+ if (!empty($conf->variants->enabled) && is_array($selected_combinations)) {
+ // Code to automatically insert with javascript the select of attributes under the select of product
+ // when a parent of variant has been selected.
$out .= '
+
';
diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php
index dc532457965..3effbb4b9cb 100644
--- a/htdocs/stripe/class/stripe.class.php
+++ b/htdocs/stripe/class/stripe.class.php
@@ -317,7 +317,7 @@ class Stripe extends CommonObject
* @param int $mode automatic=automatic confirmation/payment when conditions are ok, manual=need to call confirm() on intent
* @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok)
* @param string $payment_method 'pm_....' (if known)
- * @param string $off_session If we use an already known payment method to pay off line.
+ * @param string $off_session If we use an already known payment method to pay when customer is not available during the checkout flow.
* @param string $noidempotency_key Do not use the idempotency_key when creating the PaymentIntent
* @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found and failed to create
*/
diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php
index 24da596f3c2..933d379e48a 100644
--- a/htdocs/variants/combinations.php
+++ b/htdocs/variants/combinations.php
@@ -107,7 +107,9 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST(
$features = $_SESSION['addvariant_'.$object->id];
if (!$features) {
- setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors');
+ if ($action == 'create') {
+ setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors');
+ }
} else {
$reference = trim($reference);
if (empty($reference)) {
@@ -763,11 +765,11 @@ if (!empty($id) || !empty($ref))
print ' ';
| |