diff --git a/ChangeLog b/ChangeLog
index 262cf2b42cf..746893edb58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -153,6 +153,37 @@ content by doing a print into function, sometimes by returning content into "res
hook specifications so you must return output into "resprint".
+***** ChangeLog for 5.0.5 compared to 5.0.4 *****
+FIX: #7075 : bad path for document
+FIX: #7156
+FIX: #7173
+FIX: #7224
+FIX: #7226
+FIX: #7239
+FIX: add supplierproposaldet without price (new product)
+FIX: amount overlap other amount when a pagebreak is done due to an image at the bottom of page.
+FIX: Bad tax calculation with expense report
+FIX: Best buy price calculation
+FIX: Buying prices must always be in positive value.
+FIX: calculate correct remain to pay for planned bank transactions
+FIX: delete linked element on facture rec
+FIX: edit sociale was emptying label
+FIX: Error when updating thirdparty not returned
+FIX: holidays with postgresql like on rowid integer
+FIX: id of user not saved when making a payment of expense report
+FIX: invoice page list
+FIX: invoice situation VAT total rounding into PDF crabe
+FIX: PgSQL compatibility.
+FIX: remove order rights on invoice page
+FIX: status were wrong on product referent list
+FIX: supplier id was not passed to hooks
+FIX: Support of vat code when using price per customer
+FIX: User id correction on holiday request
+FIX: value of user id filled to 0 in llx_bank_url when recording an expense report.
+FIX: we have to check if contact doesn't already exist on add_contact() function
+FIX: We should be able to insert data with value '0' into const
+FIX: install process with DoliWamp
+
***** ChangeLog for 5.0.4 compared to 5.0.3 *****
FIX: #5640 Prices of a predefined product/service were incorrect under certain circumstances
FIX: #6541 since 4.0.4 to 5.0.0 autofill zip/town not working
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index d33968b4fb2..c2dbdd46ed6 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -577,6 +577,11 @@ if ($action == 'mupdate')
}
+// Actions to delete doc
+$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
+$permissioncreate = ($user->rights->agenda->allactions->delete || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->delete));
+include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
+
/*
* View
@@ -1212,7 +1217,6 @@ if ($id > 0)
$out.=''.$langs->trans("ViewDay").'';
$linkback.=$out;
-
$morehtmlref='
';
// Thirdparty
//$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
@@ -1477,7 +1481,7 @@ if ($id > 0)
*/
$filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id;
- $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id;
+ $urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$user->rights->agenda->myactions->create;
$delallowed=$user->rights->agenda->myactions->delete;
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index d3250263a6f..581c324674a 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -376,7 +376,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie'); // Test on entity only (Objects with no link to company)
$checksoc = array('societe'); // Test for societe object
- $checkother = array('contact'); // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...).
+ $checkother = array('contact','agenda'); // Test on entity and link to third party. Allowed if link is empty (Ex: contacts...).
$checkproject = array('projet','project'); // Test for project object
$checktask = array('projet_task');
$nocheck = array('barcode','stock','fournisseur'); // No test
diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php
index bf2caf1b255..14695f914cb 100644
--- a/htdocs/install/step1.php
+++ b/htdocs/install/step1.php
@@ -532,7 +532,7 @@ if (! $error && $db->connected && $action == "set")
print '
 | ';
// Si creation utilisateur admin demandee, on le cree
- if (isset($db_create_user) && $db_create_user == "on") {
+ if (isset($db_create_user) && ($db_create_user == "1" || $db_create_user == "on")) {
dolibarr_install_syslog("step1: create database user: " . $dolibarr_main_db_user);
//print $conf->db->host." , ".$conf->db->name." , ".$conf->db->user." , ".$conf->db->port;
@@ -636,7 +636,7 @@ if (! $error && $db->connected && $action == "set")
// If database creation is asked, we create it
- if (!$error && (isset($db_create_database) && $db_create_database == "on")) {
+ if (!$error && (isset($db_create_database) && ($db_create_database == "1" || $db_create_database == "on"))) {
dolibarr_install_syslog("step1: create database: " . $dolibarr_main_db_name . " " . $dolibarr_main_db_character_set . " " . $dolibarr_main_db_collation . " " . $dolibarr_main_db_user);
$newdb=getDoliDBInstance($conf->db->type,$conf->db->host,$userroot,$passroot,'',$conf->db->port);
//print 'eee'.$conf->db->type." ".$conf->db->host." ".$userroot." ".$passroot." ".$conf->db->port." ".$newdb->connected." ".$newdb->forcecharset;exit;