commit
665f4ac83a
@ -611,6 +611,7 @@ class ActionComm extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->nbtodo++;
|
$this->nbtodo++;
|
||||||
@ -933,6 +934,7 @@ class ActionComm extends CommonObject
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
// Note: Output of sql request is encoded in $conf->file->character_set_client
|
// Note: Output of sql request is encoded in $conf->file->character_set_client
|
||||||
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$qualified=true;
|
$qualified=true;
|
||||||
|
|||||||
@ -78,14 +78,14 @@ class CActionComm
|
|||||||
$this->libelle = $obj->libelle;
|
$this->libelle = $obj->libelle;
|
||||||
$this->active = $obj->active;
|
$this->active = $obj->active;
|
||||||
|
|
||||||
|
$this->db->free($resql);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->db->free($resql);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->free($resql);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -270,7 +270,7 @@ class ICal
|
|||||||
* Return Unix time from ical date time fomrat (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS)
|
* Return Unix time from ical date time fomrat (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS)
|
||||||
*
|
*
|
||||||
* @param string $ical_date String date
|
* @param string $ical_date String date
|
||||||
* @return timestamp
|
* @return int
|
||||||
*/
|
*/
|
||||||
function ical_date_to_unix($ical_date)
|
function ical_date_to_unix($ical_date)
|
||||||
{
|
{
|
||||||
@ -395,4 +395,4 @@ class ICal
|
|||||||
return $this->cal;
|
return $this->cal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -167,7 +167,8 @@ if ($action == 'add_action')
|
|||||||
$actioncomm->datep = $datep;
|
$actioncomm->datep = $datep;
|
||||||
$actioncomm->datef = $datef;
|
$actioncomm->datef = $datef;
|
||||||
$actioncomm->percentage = $percentage;
|
$actioncomm->percentage = $percentage;
|
||||||
$actioncomm->duree=((GETPOST('dureehour') * 60) + GETPOST('dureemin')) * 60;
|
$actioncomm->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) *
|
||||||
|
60;
|
||||||
|
|
||||||
$usertodo=new User($db);
|
$usertodo=new User($db);
|
||||||
if ($_POST["affectedto"] > 0)
|
if ($_POST["affectedto"] > 0)
|
||||||
@ -518,7 +519,7 @@ if ($action == 'create')
|
|||||||
if (GETPOST("afaire") == 1) $percent=0;
|
if (GETPOST("afaire") == 1) $percent=0;
|
||||||
else if (GETPOST("afaire") == 2) $percent=100;
|
else if (GETPOST("afaire") == 2) $percent=100;
|
||||||
}
|
}
|
||||||
print $htmlactions->form_select_status_action('formaction',$percent,1,'complete');
|
$htmlactions->form_select_status_action('formaction',$percent,1,'complete');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Location
|
// Location
|
||||||
@ -774,7 +775,7 @@ if ($id > 0)
|
|||||||
// Status
|
// Status
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
|
||||||
$percent=GETPOST("percentage")?GETPOST("percentage"):$act->percentage;
|
$percent=GETPOST("percentage")?GETPOST("percentage"):$act->percentage;
|
||||||
print $htmlactions->form_select_status_action('formaction',$percent,1);
|
$htmlactions->form_select_status_action('formaction',$percent,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Location
|
// Location
|
||||||
|
|||||||
@ -296,7 +296,7 @@ class Propal extends CommonObject
|
|||||||
* @param int $fk_product Id du produit/service predefini
|
* @param int $fk_product Id du produit/service predefini
|
||||||
* @param double $remise_percent Pourcentage de remise de la ligne
|
* @param double $remise_percent Pourcentage de remise de la ligne
|
||||||
* @param string $price_base_type HT or TTC
|
* @param string $price_base_type HT or TTC
|
||||||
* @param dobule $pu_ttc Prix unitaire TTC
|
* @param double $pu_ttc Prix unitaire TTC
|
||||||
* @param int $info_bits Bits de type de lignes
|
* @param int $info_bits Bits de type de lignes
|
||||||
* @param int $type Type of line (product, service)
|
* @param int $type Type of line (product, service)
|
||||||
* @param int $rang Position of line
|
* @param int $rang Position of line
|
||||||
@ -305,8 +305,8 @@ class Propal extends CommonObject
|
|||||||
* @param int $fk_fournprice Id supplier price
|
* @param int $fk_fournprice Id supplier price
|
||||||
* @param int $pa_ht Buying price without tax
|
* @param int $pa_ht Buying price without tax
|
||||||
* @param string $label ???
|
* @param string $label ???
|
||||||
* @param timestamp $date_start Start date of the line
|
* @param int $date_start Start date of the line
|
||||||
* @param timestamp $date_end End date of the line
|
* @param int $date_end End date of the line
|
||||||
* @param array $array_option extrafields array
|
* @param array $array_option extrafields array
|
||||||
* @return int >0 if OK, <0 if KO
|
* @return int >0 if OK, <0 if KO
|
||||||
*
|
*
|
||||||
@ -479,8 +479,8 @@ class Propal extends CommonObject
|
|||||||
* @param int $pa_ht Price (without tax) of product when it was bought
|
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||||
* @param string $label ???
|
* @param string $label ???
|
||||||
* @param int $type 0/1=Product/service
|
* @param int $type 0/1=Product/service
|
||||||
* @param timestamp $date_start Start date of the line
|
* @param int $date_start Start date of the line
|
||||||
* @param timestamp $date_end End date of the line
|
* @param int $date_end End date of the line
|
||||||
* @param array $array_option extrafields array
|
* @param array $array_option extrafields array
|
||||||
* @return int 0 if OK, <0 if KO
|
* @return int 0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
@ -1370,7 +1370,7 @@ class Propal extends CommonObject
|
|||||||
* Define proposal date
|
* Define proposal date
|
||||||
*
|
*
|
||||||
* @param User $user Object user that modify
|
* @param User $user Object user that modify
|
||||||
* @param timestamp $date Date
|
* @param int $date Date
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function set_date($user, $date)
|
function set_date($user, $date)
|
||||||
@ -1407,7 +1407,7 @@ class Propal extends CommonObject
|
|||||||
* Define end validity date
|
* Define end validity date
|
||||||
*
|
*
|
||||||
* @param User $user Object user that modify
|
* @param User $user Object user that modify
|
||||||
* @param timestamp $date_fin_validite End of validity date
|
* @param int $date_fin_validite End of validity date
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function set_echeance($user, $date_fin_validite)
|
function set_echeance($user, $date_fin_validite)
|
||||||
@ -1434,7 +1434,7 @@ class Propal extends CommonObject
|
|||||||
* Set delivery date
|
* Set delivery date
|
||||||
*
|
*
|
||||||
* @param User $user Object user that modify
|
* @param User $user Object user that modify
|
||||||
* @param timestamp $date_livraison Delivery date
|
* @param int $date_livraison Delivery date
|
||||||
* @return int <0 if ko, >0 if ok
|
* @return int <0 if ko, >0 if ok
|
||||||
*/
|
*/
|
||||||
function set_date_livraison($user, $date_livraison)
|
function set_date_livraison($user, $date_livraison)
|
||||||
@ -1625,7 +1625,7 @@ class Propal extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param User $user Object user that close
|
* @param User $user Object user that close
|
||||||
* @param int $statut Statut
|
* @param int $statut Statut
|
||||||
* @param text $note Comment
|
* @param string $note Comment
|
||||||
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
@ -1688,7 +1688,7 @@ class Propal extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param User $user Object user that close
|
* @param User $user Object user that close
|
||||||
* @param int $statut Statut
|
* @param int $statut Statut
|
||||||
* @param text $note Comment
|
* @param string $note Comment
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function cloture($user, $statut, $note)
|
function cloture($user, $statut, $note)
|
||||||
@ -2368,6 +2368,7 @@ class Propal extends CommonObject
|
|||||||
if ($mode == 'opened') $delay_warning=$conf->propal->cloture->warning_delay;
|
if ($mode == 'opened') $delay_warning=$conf->propal->cloture->warning_delay;
|
||||||
if ($mode == 'signed') $delay_warning=$conf->propal->facturation->warning_delay;
|
if ($mode == 'signed') $delay_warning=$conf->propal->facturation->warning_delay;
|
||||||
|
|
||||||
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->nbtodo++;
|
$this->nbtodo++;
|
||||||
@ -2506,6 +2507,7 @@ class Propal extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->nb["proposals"]=$obj->nb;
|
$this->nb["proposals"]=$obj->nb;
|
||||||
|
|||||||
@ -2135,7 +2135,7 @@ abstract class CommonObject
|
|||||||
* Add/Update all extra fields values for the current object.
|
* Add/Update all extra fields values for the current object.
|
||||||
* All data to describe values to insert are stored into $this->array_options=array('keyextrafield'=>'valueextrafieldtoadd')
|
* All data to describe values to insert are stored into $this->array_options=array('keyextrafield'=>'valueextrafieldtoadd')
|
||||||
*
|
*
|
||||||
* @return void
|
* @return int -1=error, O=did nothing, 1=OK
|
||||||
*/
|
*/
|
||||||
function insertExtraFields()
|
function insertExtraFields()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3942,7 +3942,7 @@ class Form
|
|||||||
* Return a HTML area with the reference of object and a navigation bar for a business object
|
* Return a HTML area with the reference of object and a navigation bar for a business object
|
||||||
* To add a particular filter on select, you must set $object->next_prev_filter to SQL criteria.
|
* To add a particular filter on select, you must set $object->next_prev_filter to SQL criteria.
|
||||||
*
|
*
|
||||||
* @param Object $object Object to show
|
* @param object $object Object to show
|
||||||
* @param string $paramid Name of parameter to use to name the id into the URL link
|
* @param string $paramid Name of parameter to use to name the id into the URL link
|
||||||
* @param string $morehtml More html content to output just before the nav bar
|
* @param string $morehtml More html content to output just before the nav bar
|
||||||
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
||||||
|
|||||||
@ -503,13 +503,13 @@ class FormCompany
|
|||||||
/**
|
/**
|
||||||
* Return list of third parties
|
* Return list of third parties
|
||||||
*
|
*
|
||||||
* @param Object $object Object we try to find contacts
|
* @param object $object Object we try to find contacts
|
||||||
* @param string $var_id Name of id field
|
* @param string $var_id Name of id field
|
||||||
* @param string $selected Pre-selected third party
|
* @param string $selected Pre-selected third party
|
||||||
* @param string $htmlname Name of HTML form
|
* @param string $htmlname Name of HTML form
|
||||||
* @param array $limitto Disable answers that are not id in this array list
|
* @param array $limitto Disable answers that are not id in this array list
|
||||||
* @param int $forceid This is to force another object id than object->id
|
* @param int $forceid This is to force another object id than object->id
|
||||||
* @return void
|
* @return int The selected third party ID
|
||||||
* TODO obsolete ?
|
* TODO obsolete ?
|
||||||
* cette fonction doit utiliser du javascript quoi qu'il en soit !
|
* cette fonction doit utiliser du javascript quoi qu'il en soit !
|
||||||
* autant utiliser le système combobox sans rechargement de page non ?
|
* autant utiliser le système combobox sans rechargement de page non ?
|
||||||
@ -616,7 +616,7 @@ class FormCompany
|
|||||||
/**
|
/**
|
||||||
* Return a select list with types of contacts
|
* Return a select list with types of contacts
|
||||||
*
|
*
|
||||||
* @param Object $object Object to use to find type of contact
|
* @param object $object Object to use to find type of contact
|
||||||
* @param string $selected Default selected value
|
* @param string $selected Default selected value
|
||||||
* @param string $htmlname HTML select name
|
* @param string $htmlname HTML select name
|
||||||
* @param string $source Source ('internal' or 'external')
|
* @param string $source Source ('internal' or 'external')
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class Interfaces
|
|||||||
* This function call all qualified triggers.
|
* This function call all qualified triggers.
|
||||||
*
|
*
|
||||||
* @param string $action Trigger event code
|
* @param string $action Trigger event code
|
||||||
* @param Object $object Objet concern
|
* @param object $object Objet concern
|
||||||
* @param User $user Objet user
|
* @param User $user Objet user
|
||||||
* @param Lang $langs Objet lang
|
* @param Lang $langs Objet lang
|
||||||
* @param Conf $conf Objet conf
|
* @param Conf $conf Objet conf
|
||||||
|
|||||||
@ -214,7 +214,7 @@ function getTop(theitem){
|
|||||||
offsetTrail = offsetTrail.offsetParent;
|
offsetTrail = offsetTrail.offsetParent;
|
||||||
}
|
}
|
||||||
if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined")
|
if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined")
|
||||||
offsetLeft += document.body.TopMargin;
|
offsetTop += document.body.TopMargin;
|
||||||
return offsetTop;
|
return offsetTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -404,7 +404,7 @@ function agenda_prepare_head()
|
|||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @param Object $object Object related to tabs
|
* @param object $object Object related to tabs
|
||||||
* @return array Array of tabs to shoc
|
* @return array Array of tabs to shoc
|
||||||
*/
|
*/
|
||||||
function actions_prepare_head($object)
|
function actions_prepare_head($object)
|
||||||
|
|||||||
@ -166,10 +166,10 @@ function getParentCompanyTimeZoneInt($refgmtdate='now')
|
|||||||
/**
|
/**
|
||||||
* Add a delay to a date
|
* Add a delay to a date
|
||||||
*
|
*
|
||||||
* @param timestamp $time Date timestamp (or string with format YYYY-MM-DD)
|
* @param int $time Date timestamp (or string with format YYYY-MM-DD)
|
||||||
* @param int $duration_value Value of delay to add
|
* @param int $duration_value Value of delay to add
|
||||||
* @param int $duration_unit Unit of added delay (d, m, y, w)
|
* @param int $duration_unit Unit of added delay (d, m, y, w)
|
||||||
* @return timestamp New timestamp
|
* @return int New timestamp
|
||||||
*/
|
*/
|
||||||
function dol_time_plus_duree($time,$duration_value,$duration_unit)
|
function dol_time_plus_duree($time,$duration_value,$duration_unit)
|
||||||
{
|
{
|
||||||
@ -317,7 +317,7 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt
|
|||||||
* DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore)
|
* DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore)
|
||||||
* @param int $gm 1 =Input date is GM date,
|
* @param int $gm 1 =Input date is GM date,
|
||||||
* 0 =Input date is local date using PHP server timezone
|
* 0 =Input date is local date using PHP server timezone
|
||||||
* @return date Date
|
* @return int Date as a timestamp
|
||||||
* 19700101020000 -> 7200 with gm=1
|
* 19700101020000 -> 7200 with gm=1
|
||||||
*
|
*
|
||||||
* @see dol_print_date, dol_mktime, dol_getdate
|
* @see dol_print_date, dol_mktime, dol_getdate
|
||||||
@ -812,4 +812,4 @@ function monthArray($outputlangs)
|
|||||||
return $montharray;
|
return $montharray;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @param Object $object Object related to tabs
|
* @param object $object Object related to tabs
|
||||||
* @return array Array of tabs to shoc
|
* @return array Array of tabs to shoc
|
||||||
*/
|
*/
|
||||||
function ecm_prepare_head($object)
|
function ecm_prepare_head($object)
|
||||||
@ -66,7 +66,7 @@ function ecm_file_prepare_head($object)
|
|||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @param Object $object Object related to tabs
|
* @param object $object Object related to tabs
|
||||||
* @return array Array of tabs to shoc
|
* @return array Array of tabs to shoc
|
||||||
*/
|
*/
|
||||||
function ecm_prepare_head_fm($object)
|
function ecm_prepare_head_fm($object)
|
||||||
|
|||||||
@ -398,16 +398,17 @@ function dol_dir_is_emtpy($folder)
|
|||||||
if (is_dir($newfolder))
|
if (is_dir($newfolder))
|
||||||
{
|
{
|
||||||
$handle = opendir($newfolder);
|
$handle = opendir($newfolder);
|
||||||
|
$folder_content = '';
|
||||||
while ((gettype($name = readdir($handle)) != "boolean"))
|
while ((gettype($name = readdir($handle)) != "boolean"))
|
||||||
{
|
{
|
||||||
$name_array[] = $name;
|
$name_array[] = $name;
|
||||||
}
|
}
|
||||||
foreach($name_array as $temp) $folder_content .= $temp;
|
foreach($name_array as $temp) $folder_content .= $temp;
|
||||||
|
|
||||||
|
closedir($handle);
|
||||||
|
|
||||||
if ($folder_content == "...") return true;
|
if ($folder_content == "...") return true;
|
||||||
else return false;
|
else return false;
|
||||||
|
|
||||||
closedir($handle);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true; // Dir does not exists
|
return true; // Dir does not exists
|
||||||
@ -448,7 +449,7 @@ function dol_count_nb_of_line($file)
|
|||||||
/**
|
/**
|
||||||
* Return size of a file
|
* Return size of a file
|
||||||
*
|
*
|
||||||
* @param tring $pathoffile Path of file
|
* @param string $pathoffile Path of file
|
||||||
* @return string File size
|
* @return string File size
|
||||||
*/
|
*/
|
||||||
function dol_filesize($pathoffile)
|
function dol_filesize($pathoffile)
|
||||||
@ -461,7 +462,7 @@ function dol_filesize($pathoffile)
|
|||||||
* Return time of a file
|
* Return time of a file
|
||||||
*
|
*
|
||||||
* @param string $pathoffile Path of file
|
* @param string $pathoffile Path of file
|
||||||
* @return timestamp Time of file
|
* @return int Time of file
|
||||||
*/
|
*/
|
||||||
function dol_filemtime($pathoffile)
|
function dol_filemtime($pathoffile)
|
||||||
{
|
{
|
||||||
@ -830,7 +831,7 @@ function dol_delete_dir_recursive($dir,$count=0,$nophperrors=0)
|
|||||||
/**
|
/**
|
||||||
* Delete all preview files linked to object instance
|
* Delete all preview files linked to object instance
|
||||||
*
|
*
|
||||||
* @param Object $object Object to clean
|
* @param object $object Object to clean
|
||||||
* @return int 0 if error, 1 if OK
|
* @return int 0 if error, 1 if OK
|
||||||
*/
|
*/
|
||||||
function dol_delete_preview($object)
|
function dol_delete_preview($object)
|
||||||
|
|||||||
@ -45,7 +45,7 @@ if (! function_exists('json_encode'))
|
|||||||
*
|
*
|
||||||
* @param string $class Class name
|
* @param string $class Class name
|
||||||
* @param string $member Name of property
|
* @param string $member Name of property
|
||||||
* @return string Return value of static property.
|
* @return mixed Return value of static property
|
||||||
*/
|
*/
|
||||||
function getStaticMember($class, $member)
|
function getStaticMember($class, $member)
|
||||||
{
|
{
|
||||||
@ -776,7 +776,7 @@ function dol_strftime($fmt, $ts=false, $is_gmt=false)
|
|||||||
* Output date in a string format according to outputlangs (or langs if not defined).
|
* Output date in a string format according to outputlangs (or langs if not defined).
|
||||||
* Return charset is always UTF-8, except if encodetoouput is defined. In this case charset is output charset
|
* Return charset is always UTF-8, except if encodetoouput is defined. In this case charset is output charset
|
||||||
*
|
*
|
||||||
* @param timestamp $time GM Timestamps date
|
* @param int $time GM Timestamps date
|
||||||
* @param string $format Output date format
|
* @param string $format Output date format
|
||||||
* "%d %b %Y",
|
* "%d %b %Y",
|
||||||
* "%d/%m/%Y %H:%M",
|
* "%d/%m/%Y %H:%M",
|
||||||
@ -932,7 +932,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
|||||||
* WARNING: This function always use PHP server timezone to return locale informations.
|
* WARNING: This function always use PHP server timezone to return locale informations.
|
||||||
* Usage must be avoid.
|
* Usage must be avoid.
|
||||||
*
|
*
|
||||||
* @param timestamp $timestamp Timestamp
|
* @param int $timestamp Timestamp
|
||||||
* @param boolean $fast Fast mode
|
* @param boolean $fast Fast mode
|
||||||
* @return array Array of informations
|
* @return array Array of informations
|
||||||
* If no fast mode:
|
* If no fast mode:
|
||||||
@ -989,7 +989,7 @@ function dol_getdate($timestamp,$fast=false)
|
|||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
* @param int $gm 1=Input informations are GMT values, otherwise local to server TZ
|
* @param int $gm 1=Input informations are GMT values, otherwise local to server TZ
|
||||||
* @param int $check 0=No check on parameters (Can use day 32, etc...)
|
* @param int $check 0=No check on parameters (Can use day 32, etc...)
|
||||||
* @return timestamp Date as a timestamp, '' if error
|
* @return int Date as a timestamp, '' if error
|
||||||
* @see dol_print_date, dol_stringtotime, dol_getdate
|
* @see dol_print_date, dol_stringtotime, dol_getdate
|
||||||
*/
|
*/
|
||||||
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||||
@ -1048,7 +1048,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
|||||||
* 'tzserver' => we add the PHP server timezone
|
* 'tzserver' => we add the PHP server timezone
|
||||||
* 'tzref' => we add the company timezone
|
* 'tzref' => we add the company timezone
|
||||||
* 'tzuser' => we add the user timezone
|
* 'tzuser' => we add the user timezone
|
||||||
* @return timestamp $date Timestamp
|
* @return int $date Timestamp
|
||||||
*/
|
*/
|
||||||
function dol_now($mode='gmt')
|
function dol_now($mode='gmt')
|
||||||
{
|
{
|
||||||
@ -2920,7 +2920,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
|||||||
* Instead this function must be called when adding a line to get (array of localtax and type) and
|
* Instead this function must be called when adding a line to get (array of localtax and type) and
|
||||||
* provide it to the function calcul_price_total.
|
* provide it to the function calcul_price_total.
|
||||||
*
|
*
|
||||||
* @param real $vatrate VAT Rate
|
* @param float $vatrate VAT Rate
|
||||||
* @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2)
|
* @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2)
|
||||||
* @param int $thirdparty Company object
|
* @param int $thirdparty Company object
|
||||||
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
|
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
|
||||||
|
|||||||
@ -178,7 +178,7 @@ function dol_print_file($langs,$filename,$searchalt=0)
|
|||||||
* Show informations on an object
|
* Show informations on an object
|
||||||
* TODO Move this into html.formother
|
* TODO Move this into html.formother
|
||||||
*
|
*
|
||||||
* @param Object $object Objet to show
|
* @param object $object Objet to show
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function dol_print_object_info($object)
|
function dol_print_object_info($object)
|
||||||
|
|||||||
@ -1512,7 +1512,7 @@ function pdf_getTotalQty($object,$type,$outputlangs)
|
|||||||
*
|
*
|
||||||
* @param object $object Object
|
* @param object $object Object
|
||||||
* @param Translate $outputlangs Object lang for output
|
* @param Translate $outputlangs Object lang for output
|
||||||
* @return void
|
* @return array Linked objects
|
||||||
*/
|
*/
|
||||||
function pdf_getLinkedObjects($object,$outputlangs)
|
function pdf_getLinkedObjects($object,$outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @param Object $object Object related to tabs
|
* @param object $object Object related to tabs
|
||||||
* @return array Array of tabs to shoc
|
* @return array Array of tabs to shoc
|
||||||
*/
|
*/
|
||||||
function propal_prepare_head($object)
|
function propal_prepare_head($object)
|
||||||
@ -147,4 +147,4 @@ function propal_admin_prepare_head($object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -147,7 +147,7 @@ abstract class ModeleNumRefPropales
|
|||||||
* Create a document onto disk according to template module.
|
* Create a document onto disk according to template module.
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param Object $object Object proposal
|
* @param object $object Object proposal
|
||||||
* @param string $modele Force model to use ('' to not force)
|
* @param string $modele Force model to use ('' to not force)
|
||||||
* @param Translate $outputlangs Object langs to use for output
|
* @param Translate $outputlangs Object langs to use for output
|
||||||
* @param int $hidedetails Hide details of lines
|
* @param int $hidedetails Hide details of lines
|
||||||
|
|||||||
@ -39,12 +39,20 @@ class EcmDirectory // extends CommonObject
|
|||||||
var $cachenbofdoc=-1; // By default cache initialized with value 'not calculated'
|
var $cachenbofdoc=-1; // By default cache initialized with value 'not calculated'
|
||||||
var $date_c;
|
var $date_c;
|
||||||
var $date_m;
|
var $date_m;
|
||||||
|
public $fk_user_m;
|
||||||
|
public $fk_user_c;
|
||||||
|
public $ref;
|
||||||
|
|
||||||
var $cats=array();
|
var $cats=array();
|
||||||
var $motherof=array();
|
var $motherof=array();
|
||||||
|
|
||||||
var $forbiddenchars = array('<','>',':','/','\\','?','*','|','"');
|
var $forbiddenchars = array('<','>',':','/','\\','?','*','|','"');
|
||||||
|
|
||||||
|
public $full_arbo_loaded;
|
||||||
|
|
||||||
|
public $error;
|
||||||
|
public $errors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -490,7 +498,8 @@ class EcmDirectory // extends CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
while ($obj= $this->db->fetch_object($resql))
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->motherof[$obj->id_son]=$obj->id_parent;
|
$this->motherof[$obj->id_son]=$obj->id_parent;
|
||||||
}
|
}
|
||||||
@ -555,6 +564,7 @@ class EcmDirectory // extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->cats = array();
|
$this->cats = array();
|
||||||
$i=0;
|
$i=0;
|
||||||
|
// This assignment in condition is not a bug. It allows walking the results.
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->cats[$obj->rowid]['id'] = $obj->rowid;
|
$this->cats[$obj->rowid]['id'] = $obj->rowid;
|
||||||
@ -642,8 +652,6 @@ class EcmDirectory // extends CommonObject
|
|||||||
$this->build_path_from_id_categ($val,$protection);
|
$this->build_path_from_id_categ($val,$protection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -71,7 +71,7 @@ $ftp_user=$conf->global->$s_ftp_user;
|
|||||||
$ftp_password=$conf->global->$s_ftp_password;
|
$ftp_password=$conf->global->$s_ftp_password;
|
||||||
$ftp_passive=$conf->global->$s_ftp_passive;
|
$ftp_passive=$conf->global->$s_ftp_passive;
|
||||||
|
|
||||||
$conn_id=0; // FTP connection ID
|
$conn_id=null; // FTP connection ID
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user