mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-18 23:41:28 +01:00
Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts: htdocs/compta/bank/bankentries.php htdocs/core/lib/admin.lib.php htdocs/install/mysql/migration/repair.sql
This commit is contained in:
@@ -134,7 +134,7 @@ class AdherentType extends CommonObject
|
|||||||
$sql.= "note = '".$this->db->escape($this->note)."',";
|
$sql.= "note = '".$this->db->escape($this->note)."',";
|
||||||
$sql.= "vote = '".$this->db->escape($this->vote)."',";
|
$sql.= "vote = '".$this->db->escape($this->vote)."',";
|
||||||
$sql.= "mail_valid = '".$this->db->escape($this->mail_valid)."'";
|
$sql.= "mail_valid = '".$this->db->escape($this->mail_valid)."'";
|
||||||
$sql .= " WHERE rowid =".$this->id;
|
$sql.= " WHERE rowid =".$this->id;
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@@ -252,7 +252,7 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
$sql = "SELECT rowid, libelle";
|
$sql = "SELECT rowid, libelle";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||||
$sql.= " WHERE entity = ".$conf->entity;
|
$sql.= " WHERE entity IN (".getEntity('adherent').")";
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='',$oker
|
|||||||
$buf = fgets($fp, 4096);
|
$buf = fgets($fp, 4096);
|
||||||
|
|
||||||
// Test if request must be ran only for particular database or version (if yes, we must remove the -- comment)
|
// Test if request must be ran only for particular database or version (if yes, we must remove the -- comment)
|
||||||
if (preg_match('/^--\sV(MYSQL|PGSQL|)([0-9\.]+)/i',$buf,$reg))
|
if (preg_match('/^--\sV(MYSQL|PGSQL)([^\s]*)/i',$buf,$reg))
|
||||||
{
|
{
|
||||||
$qualified=1;
|
$qualified=1;
|
||||||
|
|
||||||
@@ -159,20 +159,29 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='',$oker
|
|||||||
// restrict on version
|
// restrict on version
|
||||||
if ($qualified)
|
if ($qualified)
|
||||||
{
|
{
|
||||||
|
if (! empty($reg[2]))
|
||||||
$versionrequest=explode('.',$reg[2]);
|
{
|
||||||
//print var_dump($versionrequest);
|
if (is_numeric($reg[2])) // This is a version
|
||||||
//print var_dump($versionarray);
|
{
|
||||||
if (! count($versionrequest) || ! count($versionarray) || versioncompare($versionrequest,$versionarray) > 0)
|
$versionrequest=explode('.',$reg[2]);
|
||||||
{
|
//print var_dump($versionrequest);
|
||||||
$qualified=0;
|
//print var_dump($versionarray);
|
||||||
}
|
if (! count($versionrequest) || ! count($versionarray) || versioncompare($versionrequest,$versionarray) > 0)
|
||||||
|
{
|
||||||
|
$qualified=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // This is a test on a constant. For example when we have -- VMYSQLUTF8UNICODE, we test constant $conf->global->UTF8UNICODE
|
||||||
|
{
|
||||||
|
if (empty($conf->db->dolibarr_main_db_collation) || ($reg[2] != strtoupper(preg_replace('/_/', '', $conf->db->dolibarr_main_db_collation)))) $qualified=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($qualified)
|
if ($qualified)
|
||||||
{
|
{
|
||||||
// Version qualified, delete SQL comments
|
// Version qualified, delete SQL comments
|
||||||
$buf=preg_replace('/^--\sV(MYSQL|PGSQL|)([0-9\.]+)/i','',$buf);
|
$buf=preg_replace('/^--\sV(MYSQL|PGSQL)([^\s]*)/i','',$buf);
|
||||||
//print "Ligne $i qualifi?e par version: ".$buf.'<br>';
|
//print "Ligne $i qualifi?e par version: ".$buf.'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -451,8 +451,6 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// Description of product line
|
// Description of product line
|
||||||
$curX = $this->posxdesc-1;
|
$curX = $this->posxdesc-1;
|
||||||
|
|
||||||
$showpricebeforepagebreak=1;
|
|
||||||
|
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
|
|||||||
@@ -27,12 +27,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- VMYSQLUTF8UNICODE ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8;
|
||||||
-- VMYSQLUTF8UNICODE ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||||
-- VMYSQLUTF8UNICODE ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||||
-- VMYSQLUTF8UNICODE ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||||
-- VMYSQLUTF8UNICODE ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||||
-- VMYSQLUTF8UNICODE ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||||
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||||
|
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user