Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8a88b66c9d
@ -58,6 +58,11 @@ class Form
|
|||||||
*/
|
*/
|
||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] Array of error strings
|
||||||
|
*/
|
||||||
|
public $errors = array();
|
||||||
|
|
||||||
public $num;
|
public $num;
|
||||||
|
|
||||||
// Cache arrays
|
// Cache arrays
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015-2017 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015-2017 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015-2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2015-2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -44,7 +45,28 @@ class FormMail extends Form
|
|||||||
|
|
||||||
public $fromname;
|
public $fromname;
|
||||||
public $frommail;
|
public $frommail;
|
||||||
public $replytoname;
|
|
||||||
|
/**
|
||||||
|
* @var string user, company, robot
|
||||||
|
*/
|
||||||
|
public $fromtype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $fromid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string thirdparty etc
|
||||||
|
*/
|
||||||
|
public $totype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $toid;
|
||||||
|
|
||||||
|
public $replytoname;
|
||||||
public $replytomail;
|
public $replytomail;
|
||||||
public $toname;
|
public $toname;
|
||||||
public $tomail;
|
public $tomail;
|
||||||
@ -91,11 +113,6 @@ class FormMail extends Form
|
|||||||
public $withtouser=array();
|
public $withtouser=array();
|
||||||
public $withtoccuser=array();
|
public $withtoccuser=array();
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string Error code (or message)
|
|
||||||
*/
|
|
||||||
public $error='';
|
|
||||||
|
|
||||||
public $lines_model;
|
public $lines_model;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest)
|
|||||||
$openid = new SimpleOpenID();
|
$openid = new SimpleOpenID();
|
||||||
$openid->SetIdentity($_GET['openid_identity']);
|
$openid->SetIdentity($_GET['openid_identity']);
|
||||||
$openid_validation_result = $openid->ValidateWithServer();
|
$openid_validation_result = $openid->ValidateWithServer();
|
||||||
if ($openid_validation_result == true)
|
if ($openid_validation_result === true)
|
||||||
{
|
{
|
||||||
// OK HERE KEY IS VALID
|
// OK HERE KEY IS VALID
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($openid->IsError() == true)
|
else if($openid->IsError() === true)
|
||||||
{
|
{
|
||||||
// ON THE WAY, WE GOT SOME ERROR
|
// ON THE WAY, WE GOT SOME ERROR
|
||||||
$error = $openid->GetError();
|
$error = $openid->GetError();
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) ---Put here your own copyright and developer email---
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -115,19 +115,19 @@ class Productlot extends CommonObject
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
|
|
||||||
if (isset($this->entity)) {
|
if (isset($this->entity)) {
|
||||||
$this->entity = trim($this->entity);
|
$this->entity = (int) $this->entity;
|
||||||
}
|
}
|
||||||
if (isset($this->fk_product)) {
|
if (isset($this->fk_product)) {
|
||||||
$this->fk_product = trim($this->fk_product);
|
$this->fk_product = (int) $this->fk_product;
|
||||||
}
|
}
|
||||||
if (isset($this->batch)) {
|
if (isset($this->batch)) {
|
||||||
$this->batch = trim($this->batch);
|
$this->batch = trim($this->batch);
|
||||||
}
|
}
|
||||||
if (isset($this->fk_user_creat)) {
|
if (isset($this->fk_user_creat)) {
|
||||||
$this->fk_user_creat = trim($this->fk_user_creat);
|
$this->fk_user_creat = (int) $this->fk_user_creat;
|
||||||
}
|
}
|
||||||
if (isset($this->fk_user_modif)) {
|
if (isset($this->fk_user_modif)) {
|
||||||
$this->fk_user_modif = trim($this->fk_user_modif);
|
$this->fk_user_modif = (int) $this->fk_user_modif;
|
||||||
}
|
}
|
||||||
if (isset($this->import_key)) {
|
if (isset($this->import_key)) {
|
||||||
$this->import_key = trim($this->import_key);
|
$this->import_key = trim($this->import_key);
|
||||||
@ -296,19 +296,19 @@ class Productlot extends CommonObject
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
|
|
||||||
if (isset($this->entity)) {
|
if (isset($this->entity)) {
|
||||||
$this->entity = trim($this->entity);
|
$this->entity = (int) $this->entity;
|
||||||
}
|
}
|
||||||
if (isset($this->fk_product)) {
|
if (isset($this->fk_product)) {
|
||||||
$this->fk_product = trim($this->fk_product);
|
$this->fk_product = (int) $this->fk_product;
|
||||||
}
|
}
|
||||||
if (isset($this->batch)) {
|
if (isset($this->batch)) {
|
||||||
$this->batch = trim($this->batch);
|
$this->batch = trim($this->batch);
|
||||||
}
|
}
|
||||||
if (isset($this->fk_user_creat)) {
|
if (isset($this->fk_user_creat)) {
|
||||||
$this->fk_user_creat = trim($this->fk_user_creat);
|
$this->fk_user_creat = (int) $this->fk_user_creat;
|
||||||
}
|
}
|
||||||
if (isset($this->fk_user_modif)) {
|
if (isset($this->fk_user_modif)) {
|
||||||
$this->fk_user_modif = trim($this->fk_user_modif);
|
$this->fk_user_modif = (int) $this->fk_user_modif;
|
||||||
}
|
}
|
||||||
if (isset($this->import_key)) {
|
if (isset($this->import_key)) {
|
||||||
$this->import_key = trim($this->import_key);
|
$this->import_key = trim($this->import_key);
|
||||||
@ -358,9 +358,6 @@ class Productlot extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && !$notrigger) {
|
if (!$error && !$notrigger) {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
|
||||||
// want this action calls a trigger.
|
|
||||||
|
|
||||||
// Call triggers
|
// Call triggers
|
||||||
$result=$this->call_trigger('PRODUCTLOT_MODIFY',$user);
|
$result=$this->call_trigger('PRODUCTLOT_MODIFY',$user);
|
||||||
if ($result < 0) { $error++; }
|
if ($result < 0) { $error++; }
|
||||||
@ -395,8 +392,8 @@ class Productlot extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (!$error) {
|
//if (!$error) {
|
||||||
if (!$notrigger) {
|
//if (!$notrigger) {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// want this action calls a trigger.
|
||||||
|
|
||||||
@ -404,8 +401,8 @@ class Productlot extends CommonObject
|
|||||||
//$result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
//$result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
//// End call triggers
|
||||||
}
|
//}
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element;
|
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element;
|
||||||
@ -587,15 +584,15 @@ class Productlot extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->id = 0;
|
$this->id = 0;
|
||||||
|
|
||||||
$this->entity = '';
|
$this->entity = null;
|
||||||
$this->fk_product = '';
|
$this->fk_product = null;
|
||||||
$this->batch = '';
|
$this->batch = '';
|
||||||
$this->eatby = '';
|
$this->eatby = '';
|
||||||
$this->sellby = '';
|
$this->sellby = '';
|
||||||
$this->datec = '';
|
$this->datec = '';
|
||||||
$this->tms = '';
|
$this->tms = '';
|
||||||
$this->fk_user_creat = '';
|
$this->fk_user_creat = null;
|
||||||
$this->fk_user_modif = '';
|
$this->fk_user_modif = null;
|
||||||
$this->import_key = '';
|
$this->import_key = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,7 +115,7 @@ if ($action=="deleteline"){
|
|||||||
$row = $db->fetch_array ($resql);
|
$row = $db->fetch_array ($resql);
|
||||||
$deletelineid=$row[0];
|
$deletelineid=$row[0];
|
||||||
$invoice->deleteline($deletelineid);
|
$invoice->deleteline($deletelineid);
|
||||||
$invoice->fetch($deletelineid);
|
$invoice->fetch($placeid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user