diff --git a/.gitignore b/.gitignore
index 371c8be2f5e..e4790fe7b4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,3 +55,4 @@ yarn.lock
package-lock.json
doc/install.lock
+/factory/
diff --git a/ChangeLog b/ChangeLog
index 7f3d6a03151..b8f5e21a782 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -473,7 +473,8 @@ Following changes may create regressions for some external modules, but were nec
* Removed deprecated substitution key __REFCLIENT__ (replaced with __REF_CLIENT__)
* Removed constant MAIN_COUNTRIES_IN_EEC. You can now set if country is in Europe or not from the dictionary of countries.
* v14 seems to work correctly on PHP v8 but it generates a lot of verbose warnings. Currently, v14 i snot yet officialy supported with PHP 8.
-
+* To execute shell or command line command, your code must never use method like exec, shell_exec, popen, .. but must use the built-in
+ method executeCLI() available into core/class/utils.class.php
***** ChangeLog for 13.0.5 compared to 13.0.4 *****
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index 5e7a229fee3..546ef1d57a6 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -284,7 +284,8 @@ class Dolistore
$download_link .= '
';
}
- //checking versions
+ // Set and check version
+ $version = '';
if ($this->version_compare($product->dolibarr_min, DOL_VERSION) <= 0) {
if ($this->version_compare($product->dolibarr_max, DOL_VERSION) >= 0) {
//compatible
@@ -319,14 +320,21 @@ class Dolistore
//.'
//output template
- $html .= '
| '.$title.' | |||||||
| '.img_picto('', 'recurring', 'class="pictofixedwidth"').$title.' | |||||||
| '; diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index d099bfd57bc..8c46f8df59a 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -131,7 +131,7 @@ $arrayfields = array( 'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>1), 'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0), 'f.fk_cond_reglement'=>array('label'=>"PaymentTerm", 'checked'=>0), - 'recurring'=>array('label'=>"RecurringInvoiceTemplate", 'checked'=>1), + 'recurring'=>array('label'=>"RecurringInvoice", 'checked'=>1), 'f.frequency'=>array('label'=>"Frequency", 'checked'=>1), 'f.unit_frequency'=>array('label'=>"FrequencyUnit", 'checked'=>1), 'f.nb_gen_done'=>array('label'=>"NbOfGenerationDoneShort", 'checked'=>1), @@ -329,7 +329,11 @@ if ($search_status != '' && $search_status >= -1) { $sql .= dolSqlDateFilter('f.date_last_gen', $search_day, $search_month, $search_year); $sql .= dolSqlDateFilter('f.date_when', $search_day_date_when, $search_month_date_when, $search_year_date_when); -$sql .= $db->order($sortfield, $sortorder); +$tmpsortfield = $sortfield; +if ($tmpsortfield == 'recurring') { + $tmpsortfield = 'f.frequency'; +} +$sql .= $db->order($tmpsortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { @@ -723,8 +727,9 @@ if ($resql) { $totalarray['nbfield']++; } } + // Is it a recurring invoice if (!empty($arrayfields['recurring']['checked'])) { - print ' | '.yn($objp->frequency ? 1 : 0).' | '; + print ''.($objp->frequency ? img_picto($langs->trans("Frequency").': '.$objp->frequency.' '.$objp->unit_frequency, 'recurring', 'class="opacitymedium"').' ' : '').yn($objp->frequency ? 1 : 0).' | '; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index dc8c77d0e1e..695d4ead3cc 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -76,7 +76,7 @@ $search_phone_mobile = GETPOST("search_phone_mobile", 'alpha'); $search_fax = GETPOST("search_fax", 'alpha'); $search_email = GETPOST("search_email", 'alpha'); if (!empty($conf->mailing->enabled)) { - $search_no_email = GETPOST("search_no_email", 'int'); + $search_no_email = GETPOSTISSET("search_no_email") ? GETPOST("search_no_email", 'int') : -1; } else { $search_no_email = -1; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 888d9f66114..85987c8a3cf 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -860,7 +860,7 @@ abstract class CommonObject if (!empty($conf->socialnetworks->enabled)) { $outsocialnetwork = ''; - if (!empty($this->socialnetworks) && is_countable($this->socialnetworks) && count($this->socialnetworks) > 0) { + if (!empty($this->socialnetworks) && is_array($this->socialnetworks) && count($this->socialnetworks) > 0) { $socialnetworksdict = getArrayOfSocialNetworks(); foreach ($this->socialnetworks as $key => $value) { if ($value) { @@ -7522,7 +7522,7 @@ abstract class CommonObject if ($display_type == 'card') { $out .= '|||||
| '; } $out .= ' | global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) { // If only minimal initial modules enabled)
- $head[$h][1] = $form->textwithpicto($langs->trans("AvailableModules"), $desc);
- $head[$h][1] .= img_warning($langs->trans("YouMustEnableOneModule"));
+ //$head[$h][1] = $form->textwithpicto($langs->trans("AvailableModules"), $desc);
+ $head[$h][1] = $langs->trans("AvailableModules");
+ $head[$h][1] .= $form->textwithpicto('', $langs->trans("YouMustEnableOneModule").'. '.$desc.'', 1, warning); } else { //$head[$h][1] = $langs->trans("AvailableModules").$form->textwithpicto(''.$nbofactivatedmodules.' / '.$nboftotalmodules.'', $desc, 1, 'help', '', 1, 3); $head[$h][1] = $langs->trans("AvailableModules").''.$nbofactivatedmodules.' / '.$nboftotalmodules.''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 869aa2343bc..03366e9bae1 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3604,7 +3604,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'salary', 'shipment', 'state', 'supplier_invoice', 'supplier_invoicea', 'supplier_invoicer', 'supplier_invoiced', 'technic', 'ticket', 'error', 'warning', - 'recent', 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'resource', + 'recent', 'reception', 'recruitmentcandidature', 'recruitmentjobposition', 'resource', 'recurring', 'shapes', 'supplier', 'supplier_proposal', 'supplier_order', 'supplier_invoice', 'timespent', 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda', 'uncheck', 'user-cog', 'website', 'workstation', @@ -3650,7 +3650,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'partnership'=>'handshake', 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', 'recent' => 'question', 'reception'=>'dolly', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge', 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', - 'refresh'=>'redo', 'region'=>'map-marked', 'resource'=>'laptop-house', + 'refresh'=>'redo', 'region'=>'map-marked', 'resource'=>'laptop-house', 'recurring'=>'history', 'state'=>'map-marked-alt', 'security'=>'key', 'salary'=>'wallet', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'stripe'=>'stripe-s', 'supplier'=>'building', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', 'timespent'=>'clock', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 1300c1b771f..94884ea302d 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -93,7 +93,7 @@ function dol_setcache($memoryid, $data, $expire = 0) $dolmemcache->add($memoryid, $data, $expire); // This fails if key already exists $rescode = $dolmemcache->getResultCode(); if ($rescode == 0) { - return is_countable($data) ? count($data) : 0; + return is_array($data) ? count($data) : (is_scalar($data) ? strlen($data) : 0); } else { return -$rescode; } @@ -113,7 +113,7 @@ function dol_setcache($memoryid, $data, $expire = 0) //$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false); $result = $dolmemcache->add($memoryid, $data, false, $expire); // This fails if key already exists if ($result) { - return is_countable($data) ? count($data) : 0; + return is_array($data) ? count($data) : (is_scalar($data) ? strlen($data) : 0); } else { return -1; } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 20dfd81f277..64f0e00d6f8 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2014-2015 Marcos García ';
+ print ' | ';
print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"');
print $objp->mid;
- print ' | '; // This is primary not movement id
+ print ''; // This is primary key not movement ref
}
if (!empty($arrayfields['m.datem']['checked'])) {
// Date
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 9e27f026c9d..3c0fbecc7b0 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -729,7 +729,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print '';
print '';
- print '
| ||||