Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0
This commit is contained in:
commit
8d2ece83b7
@ -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_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;
|
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_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;
|
//var_dump($array_of_total_ht_per_vat_rate);exit;
|
||||||
|
|||||||
@ -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);
|
$content = str_replace('href="'.DOL_URL_ROOT.'/document.php', 'href="!~!~!~'.DOL_URL_ROOT.'/document.php', $content);
|
||||||
|
|
||||||
// Replace relative link '/' with dolibarr URL
|
// 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 ?...)
|
// 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);
|
$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
|
// Replace relative link /xxx.php?a=b&c=d#aaa or /xxx.php?a=b&c=d with dolibarr URL
|
||||||
|
|||||||
@ -1061,9 +1061,11 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
dol_fiche_head('');
|
dol_fiche_head('');
|
||||||
|
|
||||||
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
|
||||||
if (is_object($objectsrc))
|
if (is_object($objectsrc))
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';
|
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';
|
||||||
|
|||||||
@ -841,6 +841,13 @@ if ($action == 'addcontainer')
|
|||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
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();
|
$db->commit();
|
||||||
|
|
||||||
|
$filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php';
|
||||||
|
|
||||||
// Generate the index.php page to be the home page
|
// Generate the index.php page to be the home page
|
||||||
//-------------------------------------------------
|
|
||||||
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
|
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
|
||||||
|
|
||||||
if ($result) setEventMessages($langs->trans("Saved"), null, 'mesgs');
|
if ($result) setEventMessages($langs->trans("Saved"), null, 'mesgs');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user