Merge pull request #942 from FHenry/3.4
Remove warning if FetchObjectLinked call
This commit is contained in:
commit
273fbdfa0e
@ -1858,7 +1858,7 @@ else
|
|||||||
// Convert date into timestamp format
|
// Convert date into timestamp format
|
||||||
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
||||||
{
|
{
|
||||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key];
|
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
if ($action == 'edit_extras' && $user->rights->propal->creer)
|
||||||
|
|||||||
@ -2158,7 +2158,7 @@ else
|
|||||||
// Convert date into timestamp format
|
// Convert date into timestamp format
|
||||||
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
||||||
{
|
{
|
||||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key];
|
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->commande->creer)
|
if ($action == 'edit_extras' && $user->rights->commande->creer)
|
||||||
|
|||||||
@ -3304,7 +3304,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
// Convert date into timestamp format
|
// Convert date into timestamp format
|
||||||
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
||||||
{
|
{
|
||||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key];
|
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'edit_extras' && $user->rights->facture->creer)
|
if ($action == 'edit_extras' && $user->rights->facture->creer)
|
||||||
|
|||||||
@ -44,6 +44,9 @@ abstract class CommonObject
|
|||||||
public $civility_id;
|
public $civility_id;
|
||||||
|
|
||||||
public $array_options=array();
|
public $array_options=array();
|
||||||
|
|
||||||
|
public $linkedObjectsIds;
|
||||||
|
public $linkedObjects;
|
||||||
|
|
||||||
// No constructor as it is an abstract class
|
// No constructor as it is an abstract class
|
||||||
|
|
||||||
@ -1649,7 +1652,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch array of objects linked to current object. Links are loaded into this->linked_object array.
|
* Fetch array of objects linked to current object. Links are loaded into this->linkedObjects array.
|
||||||
*
|
*
|
||||||
* @param int $sourceid Object source id
|
* @param int $sourceid Object source id
|
||||||
* @param string $sourcetype Object source type
|
* @param string $sourcetype Object source type
|
||||||
@ -1708,6 +1711,7 @@ abstract class CommonObject
|
|||||||
$sql.= "(fk_source = '".$sourceid."' AND sourcetype = '".$sourcetype."')";
|
$sql.= "(fk_source = '".$sourceid."' AND sourcetype = '".$sourcetype."')";
|
||||||
$sql.= " ".$clause." (fk_target = '".$targetid."' AND targettype = '".$targettype."')";
|
$sql.= " ".$clause." (fk_target = '".$targetid."' AND targettype = '".$targettype."')";
|
||||||
}
|
}
|
||||||
|
$sql .= ' ORDER BY sourcetype';
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetchObjectLink sql=".$sql);
|
dol_syslog(get_class($this)."::fetchObjectLink sql=".$sql);
|
||||||
@ -2236,7 +2240,7 @@ abstract class CommonObject
|
|||||||
// Convert date into timestamp format
|
// Convert date into timestamp format
|
||||||
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
if (in_array($extrafields->attribute_type[$key],array('date','datetime')))
|
||||||
{
|
{
|
||||||
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->array_options['options_'.$key];
|
$value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->db->jdate($this->array_options['options_'.$key]);
|
||||||
}
|
}
|
||||||
$out .= '<td>'.$label.'</td>';
|
$out .= '<td>'.$label.'</td>';
|
||||||
$out .='<td colspan="'.$colspan.'">';
|
$out .='<td colspan="'.$colspan.'">';
|
||||||
|
|||||||
@ -825,7 +825,7 @@ class ExtraFields
|
|||||||
|
|
||||||
$sql = 'SELECT '.$InfoFieldList[1];
|
$sql = 'SELECT '.$InfoFieldList[1];
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
|
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
|
||||||
$sql.= ' WHERE '.$keyList.'="'.$this->db->escape($value).'"';
|
$sql.= ' WHERE '.$keyList.'=\''.$this->db->escape($value).'\'';
|
||||||
//$sql.= ' AND entity = '.$conf->entity;
|
//$sql.= ' AND entity = '.$conf->entity;
|
||||||
dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql);
|
dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|||||||
@ -372,7 +372,7 @@ class Fichinter extends CommonObject
|
|||||||
// Define new ref
|
// Define new ref
|
||||||
if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref)))
|
if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref)))
|
||||||
{
|
{
|
||||||
$num = $this->getNextNumRef($soc);
|
$num = $this->getNextNumRef($this->thirdparty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,10 +25,6 @@
|
|||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
|
||||||
ini_set('display_errors', true);
|
|
||||||
ini_set('html_errors', false);
|
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user