This commit is contained in:
Maxime Kohlhaas 2017-05-30 14:10:20 +02:00
commit 2f6fe2c65e
8 changed files with 59 additions and 13 deletions

View File

@ -218,6 +218,28 @@ Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful o
feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0. feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
***** ChangeLog for 4.0.6 to 4.0.5 *****
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
FIX: #6636 Complete fix
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
FIX: #6671 Cannot remove thirdparty type with "#" in its name
FIX: #6673 Missing "nature" table header in thirdparty list
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
FIX: #6813
FIX: Correction with author and validator user on orders
FIX: doactions hook missing in invoice model page
FIX: dont get empty "Incoterms : - " string if no incoterm
FIX: dont lose supplier ref if no supplier price in database
FIX: forgotten parameter for right multicompany use
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
FIX: limit+1 dosn't show Total line
FIX: supplier order line were always created with rang = 0
***** ChangeLog for 4.0.5 to 4.0.4 ***** ***** ChangeLog for 4.0.5 to 4.0.4 *****
FIX: #6234 FIX: #6234
FIX: #6259 FIX: #6259

View File

@ -517,6 +517,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;

View File

@ -42,13 +42,30 @@ if ($action == 'setproductionmode')
$status = GETPOST('status','alpha'); $status = GETPOST('status','alpha');
if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', $conf->entity) > 0) if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', $conf->entity) > 0)
{
$error=0;
if ($status == 1)
{ {
$result = dol_mkdir($conf->api->dir_temp); $result = dol_mkdir($conf->api->dir_temp);
if ($result < 0) if ($result < 0)
{ {
setEventMessages($langs->trans("ErrorFaildToCreateDir", $conf->api->dir_temp), null, 'errors'); setEventMessages($langs->trans("ErrorFailedToCreateDir", $conf->api->dir_temp), null, 'errors');
$error++;
}
} }
else else
{
// Delete the cache file otherwise it does not update
$result = dol_delete_file($conf->api->dir_temp.'/routes.php');
if ($result < 0)
{
setEventMessages($langs->trans("ErrorFailedToDeleteFile", $conf->api->dir_temp.'/routes.php'), null, 'errors');
$error++;
}
}
if (!$error)
{ {
header("Location: ".$_SERVER["PHP_SELF"]); header("Location: ".$_SERVER["PHP_SELF"]);
exit; exit;

View File

@ -289,7 +289,7 @@ class AgendaEvents extends DolibarrApi
function _validate($data) function _validate($data)
{ {
$event = array(); $event = array();
foreach (Events::$FIELDS as $field) { foreach (AgendaEvents::$FIELDS as $field) {
if (!isset($data[$field])) if (!isset($data[$field]))
throw new RestException(400, "$field field missing"); throw new RestException(400, "$field field missing");
$event[$field] = $data[$field]; $event[$field] = $data[$field];

View File

@ -233,15 +233,15 @@ class HookManager
if (is_array($parameters) && ! empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) continue; if (is_array($parameters) && ! empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) continue;
//dol_syslog("Call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", hooktype=".$hooktype, LOG_DEBUG); //dol_syslog("Call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", hooktype=".$hooktype, LOG_DEBUG);
$result = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example) $resaction = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
if (! empty($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results); if (! empty($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints; if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
// TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string. we must use $actionclassinstance->resprints to return a string // TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string. we must use $actionclassinstance->resprints to return a string
if (! is_array($result) && ! is_numeric($result)) if (! is_array($resaction) && ! is_numeric($resaction))
{ {
dol_syslog('Error: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_ERR); dol_syslog('Error: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_ERR);
if (empty($actionclassinstance->resprints)) { $this->resPrint.=$result; $result=0; } if (empty($actionclassinstance->resprints)) { $this->resPrint.=$resaction; $resaction=0; }
} }
} }

View File

@ -45,6 +45,7 @@ ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_product (fk
ALTER TABLE llx_facture_rec ADD COLUMN fk_user_modif integer; ALTER TABLE llx_facture_rec ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_expedition ADD COLUMN fk_user_modif integer; ALTER TABLE llx_expedition ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_adherent ADD COLUMN model_pdf varchar(255); ALTER TABLE llx_adherent ADD COLUMN model_pdf varchar(255);

View File

@ -30,6 +30,7 @@ create table llx_projet
title varchar(255) NOT NULL, title varchar(255) NOT NULL,
description text, description text,
fk_user_creat integer NOT NULL, -- createur du projet fk_user_creat integer NOT NULL, -- createur du projet
fk_user_modif integer,
public integer, -- project is public or not public integer, -- project is public or not
fk_statut integer DEFAULT 0 NOT NULL, -- open or close fk_statut integer DEFAULT 0 NOT NULL, -- open or close
fk_opp_status integer DEFAULT NULL, -- if project is used to manage opportunities fk_opp_status integer DEFAULT NULL, -- if project is used to manage opportunities

View File

@ -453,11 +453,11 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
$db->close(); $db->close();
// Actions for all version (not in database) // Actions for all versions (not in database)
migrate_delete_old_files($db, $langs, $conf); migrate_delete_old_files($db, $langs, $conf);
migrate_delete_old_dir($db, $langs, $conf); migrate_delete_old_dir($db, $langs, $conf);
dol_mkdir(DOL_DATA_ROOT.'/bank'); dol_mkdir(DOL_DATA_ROOT.'/bank');
migrate_directories($db, $langs, $conf, '/banque/bordereau', '/bank/checkdeposits'); migrate_directories($db, $langs, $conf, '/banque/bordereau', '/bank/checkdeposits');
} }
@ -3926,7 +3926,11 @@ function migrate_delete_old_files($db,$langs,$conf)
DOL_DOCUMENT_ROOT.'/core/modules/mailings/poire.modules.php', DOL_DOCUMENT_ROOT.'/core/modules/mailings/poire.modules.php',
DOL_DOCUMENT_ROOT.'/core/modules/mailings/kiwi.modules.php', DOL_DOCUMENT_ROOT.'/core/modules/mailings/kiwi.modules.php',
DOL_DOCUMENT_ROOT.'/core/modules/facture/pdf_crabe.modules.php', DOL_DOCUMENT_ROOT.'/core/modules/facture/pdf_crabe.modules.php',
DOL_DOCUMENT_ROOT.'/core/modules/facture/pdf_oursin.modules.php' DOL_DOCUMENT_ROOT.'/core/modules/facture/pdf_oursin.modules.php',
DOL_DOCUMENT_ROOT.'/compta/facture/class/api_invoice.class.php',
DOL_DOCUMENT_ROOT.'/commande/class/api_commande.class.php',
DOL_DOCUMENT_ROOT.'/user/class/api_user.class.php'
); );
foreach ($filetodeletearray as $filetodelete) foreach ($filetodeletearray as $filetodelete)