Merge branch 'Dolibarr:develop' into patch-5
This commit is contained in:
commit
67d6ada23c
@ -933,8 +933,9 @@ class DoliDBMysqli extends DoliDB
|
||||
public function DDLDropField($table, $field_name)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
|
||||
dol_syslog(get_class($this)."::DDLDropField ".$sql, LOG_DEBUG);
|
||||
$tmp_field_name = preg_replace('/[^a-z0-9\.\-\_]/i', '', $field_name);
|
||||
|
||||
$sql = "ALTER TABLE ".$table." DROP COLUMN `".$tmp_field_name."`";
|
||||
if ($this->query($sql)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1240,8 +1240,9 @@ class DoliDBPgsql extends DoliDB
|
||||
public function DDLDropField($table, $field_name)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "ALTER TABLE ".$table." DROP COLUMN ".$field_name;
|
||||
dol_syslog($sql, LOG_DEBUG);
|
||||
$tmp_field_name = preg_replace('/[^a-z0-9\.\-\_]/i', '', $field_name);
|
||||
|
||||
$sql = "ALTER TABLE ".$table." DROP COLUMN ".$tmp_field_name;
|
||||
if (!$this->query($sql)) {
|
||||
$this->error = $this->lasterror();
|
||||
return -1;
|
||||
|
||||
@ -1120,8 +1120,9 @@ class DoliDBSqlite3 extends DoliDB
|
||||
public function DDLDropField($table, $field_name)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
|
||||
dol_syslog(get_class($this)."::DDLDropField ".$sql, LOG_DEBUG);
|
||||
$tmp_field_name = preg_replace('/[^a-z0-9\.\-\_]/i', '', $field_name);
|
||||
|
||||
$sql = "ALTER TABLE ".$table." DROP COLUMN `".$tmp_field_name."`";
|
||||
if (!$this->query($sql)) {
|
||||
$this->error = $this->lasterror();
|
||||
return -1;
|
||||
|
||||
@ -1109,6 +1109,7 @@ $sql = "SELECT rowid, status, entity FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE
|
||||
$sql .= " entity = ".((int) $conf->entity)." AND ";
|
||||
$sql .= " posnumber = ".((int) $_SESSION["takeposterminal"])." AND ";
|
||||
$sql .= " date_creation > '".$db->idate(dol_get_first_hour(dol_now()))."'";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
@ -1321,8 +1321,8 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertEquals(1, price2num('1.000'), 'Test 1.000 give 1 with english language');
|
||||
|
||||
// Text can't be converted
|
||||
$this->assertEquals('12.4$', price2num('12.4$'));
|
||||
$this->assertEquals('12.4$', price2num('12r.4$'));
|
||||
$this->assertEquals('12.4', price2num('12.4$'));
|
||||
$this->assertEquals('12.4', price2num('12r.4$'));
|
||||
|
||||
// For spanish language
|
||||
$newlangs2 = new Translate('', $conf);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user