Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
This commit is contained in:
Laurent Destailleur 2018-04-23 23:09:53 +02:00
commit fb8ad77378
8 changed files with 26 additions and 14 deletions

View File

@ -1155,7 +1155,7 @@ class CMailFile
$out.= "Content-Disposition: attachment; filename=\"".$filename_list[$i]."\"".$this->eol;
$out.= "Content-Type: " . $mimetype_list[$i] . "; name=\"".$filename_list[$i]."\"".$this->eol;
$out.= "Content-Transfer-Encoding: base64".$this->eol;
$out.= "Content-Description: File Attachment".$this->eol;
$out.= "Content-Description: ".$filename_list[$i].$this->eol;
$out.= $this->eol;
$out.= $encoded;
$out.= $this->eol;

View File

@ -6004,9 +6004,9 @@ abstract class CommonObject
} else {
$value = $this->array_options["options_" . $key]; // No GET, no POST, no default value, so we take value of object.
}
//var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value);
break;
}
//var_dump($value);
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate')
{
@ -6041,12 +6041,12 @@ abstract class CommonObject
// Convert date into timestamp format (value in memory must be a timestamp)
if (in_array($extrafields->attributes[$this->table_element]['type'][$key],array('date','datetime')))
{
$value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min",'int',3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year",'int',3)):$this->db->jdate($this->array_options['options_'.$key]);
$value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min",'int',3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day",'int',3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year",'int',3)):$this->db->jdate($this->array_options['options_'.$key]);
}
// Convert float submited string into real php numeric (value in memory must be a php numeric)
if (in_array($extrafields->attributes[$this->table_element]['type'][$key],array('price','double')))
{
$value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix,'int',3)):$this->array_options['options_'.$key];
$value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)):$this->array_options['options_'.$key];
}
$labeltoshow = $langs->trans($label);

View File

@ -1846,13 +1846,14 @@ class ExtraFields
}
else if (in_array($key_type,array('price','double')))
{
$value_arr=GETPOST("options_".$key);
$value_arr=GETPOST("options_".$key, 'alpha');
$value_key=price2num($value_arr);
}
else
{
$value_key=GETPOST("options_".$key);
}
$object->array_options["options_".$key]=$value_key;
}

View File

@ -1410,7 +1410,7 @@ class SMTPs
$content = 'Content-Type: ' . $_msgData['mimeType'] . '; charset="' . $this->getCharSet() . '"' . "\r\n"
. 'Content-Transfer-Encoding: ' . $this->getTransEncodeType() . "\r\n"
. 'Content-Disposition: inline' . "\r\n"
. 'Content-Description: message' . "\r\n";
. 'Content-Description: Message' . "\r\n";
if ( $this->getMD5flag() )
$content .= 'Content-MD5: ' . $_msgData['md5'] . "\r\n";
@ -1459,7 +1459,7 @@ class SMTPs
. 'Content-Disposition: attachment; filename="' . $_data['fileName'] . '"' . "\r\n"
. 'Content-Type: ' . $_data['mimeType'] . '; name="' . $_data['fileName'] . '"' . "\r\n"
. 'Content-Transfer-Encoding: base64' . "\r\n"
. 'Content-Description: File Attachment' . "\r\n";
. 'Content-Description: ' . $_data['fileName'] ."\r\n";
if ( $this->getMD5flag() )
$content .= 'Content-MD5: ' . $_data['md5'] . "\r\n";

View File

@ -710,6 +710,10 @@ ALTER TABLE llx_facture_rec_extrafields ADD INDEX idx_facture_rec_extrafields (f
-- VMYSQL4.1 ALTER TABLE llx_product_association ADD COLUMN rowid integer AUTO_INCREMENT PRIMARY KEY;
-- drop very old table (bad name)
DROP TABLE llx_c_accountancy_category;
UPDATE llx_cronjob set entity = 1 where entity = 0 and label in ('RecurringInvoices', 'SendEmailsReminders');
UPDATE llx_cronjob set entity = 0 where entity = 1 and label in ('PurgeDeleteTemporaryFilesShort', 'MakeLocalDatabaseDumpShort');

View File

@ -40,6 +40,7 @@ ALTER TABLE llx_website_page ADD COLUMN fk_user_create integer;
ALTER TABLE llx_website_page ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_website_page ADD COLUMN type_container varchar(16) NOT NULL DEFAULT 'page';
-- drop very old table (bad name)
DROP TABLE llx_c_accountancy_category;
DROP TABLE llx_c_accountingaccount;

View File

@ -274,12 +274,11 @@ elseif ($action == 'updateoptions')
$conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
}
}
}
else if ($action == "linkOtherCompany")
{
$projectToSelect = GETPOST('projectToSelect');
dolibarr_set_const($db, 'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect, 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value
if (GETPOST('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY'))
{
$projectToSelect = GETPOST('projectToSelect','alpha');
dolibarr_set_const($db, 'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect, 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value
}
}

View File

@ -82,6 +82,13 @@ if (empty($conf->cron->enabled))
exit(-1);
}
// Check module cron is activated
if (empty($conf->cron->enabled))
{
print "Error: module Scheduled jobs (cron) not activated\n";
exit(-1);
}
// Check security key
if ($key != $conf->global->CRON_KEY)
{