Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0

This commit is contained in:
florian HENRY 2020-03-10 09:00:59 +01:00
commit 8d2ece83b7
4 changed files with 14 additions and 4 deletions

View File

@ -306,7 +306,7 @@ if (empty($reshook))
if (empty($array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code])) $array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] = 0;
if (empty($array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code])) $array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] = 0;
$array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] += $line->total_ht;
$array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] += $line->multicurrency_subprice;
$array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] += $line->multicurrency_total_ht;
}
//var_dump($array_of_total_ht_per_vat_rate);exit;

View File

@ -163,7 +163,7 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c
$content = str_replace('href="'.DOL_URL_ROOT.'/document.php', 'href="!~!~!~'.DOL_URL_ROOT.'/document.php', $content);
// Replace relative link '/' with dolibarr URL
$content = preg_replace('/(href=")\/\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageid='.$website->fk_default_home.'"', $content, -1, $nbrep);
$content = preg_replace('/(href=")\/(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageid='.$website->fk_default_home.'\2"', $content, -1, $nbrep);
// Replace relative link /xxx.php#aaa or /xxx.php with dolibarr URL (we discard param ?...)
$content = preg_replace('/(href=")\/?([^:\"\!]*)\.php(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageref=\2\3"', $content, -1, $nbrep);
// Replace relative link /xxx.php?a=b&c=d#aaa or /xxx.php?a=b&c=d with dolibarr URL

View File

@ -1061,9 +1061,11 @@ if ($action == 'create')
}
else
{
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
dol_fiche_head('');
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
if (is_object($objectsrc))
{
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';

View File

@ -841,6 +841,13 @@ if ($action == 'addcontainer')
{
$error++;
setEventMessages($object->error, $object->errors, 'errors');
} else {
$filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php';
// Generate the index.php page to be the home page
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
if ($result <= 0) setEventMessages('Failed to write file '.$fileindex, null, 'errors');
}
}
}
@ -1312,8 +1319,9 @@ if ($action == 'setashome')
{
$db->commit();
$filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php';
// Generate the index.php page to be the home page
//-------------------------------------------------
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
if ($result) setEventMessages($langs->trans("Saved"), null, 'mesgs');