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