Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
761565cabb
21 changed files with 34 additions and 12 deletions
|
|
@ -467,8 +467,8 @@ script:
|
|||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set +e
|
||||
# Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ $execmethod = getDolGlobalInt('MAIN_EXEC_USE_POPEN', 1);
|
|||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
print load_fiche_titre($langs->trans("Security"), '', 'title_setup');
|
||||
|
|
@ -169,6 +171,12 @@ if (in_array($functiontokeep, $arrayoffunctionsdisabled)) {
|
|||
print '<span class="opacitymedium">'.$functiontokeep.'</span>';
|
||||
print '<br>';
|
||||
|
||||
$arrayofstreams = stream_get_wrappers();
|
||||
if (!empty($arrayofstreams)) {
|
||||
sort($arrayofstreams);
|
||||
print "<strong>PHP streams</strong> = ".(join(',', $arrayofstreams)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", 'file,http,https,php').')</span>'."<br>\n";
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
// XDebug
|
||||
|
|
@ -669,7 +677,7 @@ print '<br>';
|
|||
print '<strong>WEBSITE_MAIN_SECURITY_FORCESTS</strong> = '.getDolGlobalString('>WEBSITE_MAIN_SECURITY_FORCESTS', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"max-age=31536000; includeSubDomains\")</span><br>";
|
||||
print '<br>';
|
||||
|
||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCEPP</strong> = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCEPP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"camera: 'none'; microphone: 'none';\")</span><br>";
|
||||
print '<strong>WEBSITE_MAIN_SECURITY_FORCEPP</strong> = '.getDolGlobalString('WEBSITE_MAIN_SECURITY_FORCEPP', '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>').' <span class="opacitymedium">('.$langs->trans("Example").": \"camera: (); microphone: ();\")</span><br>";
|
||||
print '<br>';
|
||||
|
||||
print '<br>';
|
||||
|
|
@ -678,7 +686,7 @@ print '<br>';
|
|||
print load_fiche_titre($langs->trans("LimitsAndMitigation"), '', 'folder');
|
||||
|
||||
print '<span class="opacitymedium">';
|
||||
print 'For a higher security, we also recommend to implement limits and mitigation on number of endpoints per minutes for the following URL'."<br>";
|
||||
print $langs->trans("RecommendMitigationOnURL").'<br>';
|
||||
print '</span>';
|
||||
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ class AssetAccountancyCodes extends CommonObject
|
|||
$this->accountancy_codes[$mode_key][$field_key] = $accountancy_code;
|
||||
}
|
||||
}
|
||||
return $this->accountancy_codes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1214,6 +1214,7 @@ class FactureRec extends CommonInvoice
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class LignePrelevement
|
|||
*
|
||||
* @param int $status Id status
|
||||
* @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
|
||||
* @return string Label
|
||||
* @return null|string Label
|
||||
*/
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
|
|
@ -160,7 +160,6 @@ class LignePrelevement
|
|||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut8', 'class="valignmiddle"');
|
||||
}
|
||||
}
|
||||
|
||||
//return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -501,6 +501,7 @@ class Cchargesociales
|
|||
return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5');
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -730,8 +730,10 @@ class ChargeSociales extends CommonObject
|
|||
}
|
||||
|
||||
$this->db->free($result);
|
||||
return 1;
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ function dol_convertToWord($num, $langs, $currency = '', $centimes = false)
|
|||
* @param float $numero Number to convert
|
||||
* @param Translate $langs Language
|
||||
* @param string $numorcurrency 'number' or 'amount'
|
||||
* @return string Text of the number or -1 in case TOO LONG (more than 1000000000000.99)
|
||||
* @return string|int Text of the number or -1 in case TOO LONG (more than 1000000000000.99)
|
||||
*/
|
||||
function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ class CommActionRapport
|
|||
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -388,6 +388,6 @@ class pdf_ban extends ModeleBankAccountDoc
|
|||
global $conf;
|
||||
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
//return pdf_pagefoot($pdf,$outputlangs,'BANK_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1109,6 +1109,7 @@ class pdf_standard extends ModeleExpenseReport
|
|||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class mod_facture_mars extends ModeleNumRefFactures
|
|||
* @param Societe $objsoc Object third party
|
||||
* @param Facture $invoice Object invoice
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Value if OK, 0 if KO
|
||||
* @return string|int Value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $invoice, $mode = 'next')
|
||||
{
|
||||
|
|
@ -233,6 +233,7 @@ class mod_facture_mars extends ModeleNumRefFactures
|
|||
return $prefix.$yymm."-".$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -308,5 +308,6 @@ class mailing_advthirdparties extends MailingTargets
|
|||
$contactstatic->fetch($id);
|
||||
return $contactstatic->getNomUrl(0, '', 0, '', -1, 1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1057,6 +1057,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
|
|
|||
|
|
@ -546,6 +546,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||
// Date
|
||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy);
|
||||
$pdf->MultiCell(150, 4, date("d").' '.$outputlangs->transnoentitiesnoconv(date("F")).' '.date("Y"), 0, 'L', 1);
|
||||
return $posy;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||
* @param Societe $objsoc Object third party
|
||||
* @param Facture $invoice Object invoice
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Next ref value or last ref if $mode is 'last'
|
||||
* @return string|int Next ref value or last ref if $mode is 'last'
|
||||
*/
|
||||
public function getNextValue($objsoc = null, $invoice = null, $mode = 'next')
|
||||
{
|
||||
|
|
@ -198,6 +198,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||
return $this->prefix.$pos_source.'-'.$yymm.'-'.$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2100,6 +2100,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine
|
|||
return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut8');
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Dolibarr language file - Source file is en_US - main
|
||||
DIRECTION=litros
|
||||
FONTFORPDF=helvética
|
||||
FONTFORPDF=helvetica
|
||||
FONTSIZEFORPDF=10
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
|
|
|
|||
|
|
@ -2397,3 +2397,4 @@ DefaultForTypeDesc=Modèle utilisé par défaut lors de la création d'un nouvel
|
|||
OptionXShouldBeEnabledInModuleY=L'option "<b>%s</b>" doit être activée dans le module <b>%s</b>
|
||||
OptionXIsCorrectlyEnabledInModuleY=L'option "<b>%s</b>" doit être activée dans le module <b>%s</b>
|
||||
AtBottomOfPage=En bas de page
|
||||
RecommendMitigationOnURL=For a higher security, we also recommend to implement limits and mitigation on number of endpoints per minutes for the following URL
|
||||
|
|
@ -10,7 +10,7 @@ DIRECTION=ltr
|
|||
# DejaVuSans is for some Eastern languages, some Asian languages and some Arabic languages
|
||||
# freemono is for ru_RU or uk_UA, uz_UZ
|
||||
# freeserif is for Tamil
|
||||
FONTFORPDF=helvetica
|
||||
FONTFORPDF=msungstdlight
|
||||
FONTSIZEFORPDF=10
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
|
|
|
|||
Loading…
Reference in a new issue