Fix: Removing chekstyle warning helps me to find real bugs
This commit is contained in:
parent
498ac04ad1
commit
8a77ffe58f
@ -211,7 +211,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
|
|||||||
$body=make_substitutions($body,$substitutionarrayfortest);
|
$body=make_substitutions($body,$substitutionarrayfortest);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
|
||||||
$mailfile = new CMailFile(
|
$mailfile = new CMailFile(
|
||||||
$subject,
|
$subject,
|
||||||
$sendto,
|
$sendto,
|
||||||
$email_from,
|
$email_from,
|
||||||
@ -224,7 +224,7 @@ if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_P
|
|||||||
$deliveryreceipt,
|
$deliveryreceipt,
|
||||||
$msgishtml,
|
$msgishtml,
|
||||||
$errors_to
|
$errors_to
|
||||||
);
|
);
|
||||||
|
|
||||||
$result=$mailfile->sendfile();
|
$result=$mailfile->sendfile();
|
||||||
|
|
||||||
|
|||||||
@ -60,11 +60,11 @@ $substitutionarray=array(
|
|||||||
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
$substitutionarray=array_merge(
|
$substitutionarray=array_merge(
|
||||||
$substitutionarray,
|
$substitutionarray,
|
||||||
array(
|
array(
|
||||||
'__CHECK_READ__' => 'CheckMail',
|
'__CHECK_READ__' => 'CheckMail',
|
||||||
'__UNSUBSCRIBE__' => 'Unsubscribe'
|
'__UNSUBSCRIBE__' => 'Unsubscribe'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,13 +83,13 @@ $substitutionarrayfortest=array(
|
|||||||
);
|
);
|
||||||
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||||
{
|
{
|
||||||
$substitutionarrayfortest=array_merge(
|
$substitutionarrayfortest=array_merge(
|
||||||
$substitutionarrayfortest,
|
$substitutionarrayfortest,
|
||||||
array(
|
array(
|
||||||
'__CHECK_READ__' => 'TESTCheckMail',
|
'__CHECK_READ__' => 'TESTCheckMail',
|
||||||
'__UNSUBSCRIBE__' => 'TESTUnsubscribe'
|
'__UNSUBSCRIBE__' => 'TESTUnsubscribe'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action clone object
|
// Action clone object
|
||||||
|
|||||||
@ -684,7 +684,7 @@ class Commande extends CommonObject
|
|||||||
$this->lines[$i]->remise_percent,
|
$this->lines[$i]->remise_percent,
|
||||||
$this->lines[$i]->info_bits,
|
$this->lines[$i]->info_bits,
|
||||||
$this->lines[$i]->fk_remise_except,
|
$this->lines[$i]->fk_remise_except,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$this->lines[$i]->date_start,
|
$this->lines[$i]->date_start,
|
||||||
$this->lines[$i]->date_end,
|
$this->lines[$i]->date_end,
|
||||||
@ -2110,7 +2110,7 @@ class Commande extends CommonObject
|
|||||||
* @param int $skip_update_total Skip update of total
|
* @param int $skip_update_total Skip update of total
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent=0, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0)
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ class CommandeStats extends Stats
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $DB Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param int $socid Id third party for filter
|
* @param int $socid Id third party for filter
|
||||||
* @param string $mode Option
|
* @param string $mode Option
|
||||||
* @param int $userid Id user for filter
|
* @param int $userid Id user for filter
|
||||||
|
|||||||
@ -146,20 +146,20 @@ class FactureRec extends Facture
|
|||||||
for ($i = 0; $i < $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
$result_insert = $this->addline(
|
$result_insert = $this->addline(
|
||||||
$this->id,
|
$this->id,
|
||||||
$facsrc->lines[$i]->desc,
|
$facsrc->lines[$i]->desc,
|
||||||
$facsrc->lines[$i]->subprice,
|
$facsrc->lines[$i]->subprice,
|
||||||
$facsrc->lines[$i]->qty,
|
$facsrc->lines[$i]->qty,
|
||||||
$facsrc->lines[$i]->tva_tx,
|
$facsrc->lines[$i]->tva_tx,
|
||||||
$facsrc->lines[$i]->fk_product,
|
$facsrc->lines[$i]->fk_product,
|
||||||
$facsrc->lines[$i]->remise_percent,
|
$facsrc->lines[$i]->remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
$facsrc->lines[$i]->product_type,
|
$facsrc->lines[$i]->product_type,
|
||||||
$facsrc->lines[$i]->rang,
|
$facsrc->lines[$i]->rang,
|
||||||
$facsrc->lines[$i]->special_code
|
$facsrc->lines[$i]->special_code
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result_insert < 0)
|
if ($result_insert < 0)
|
||||||
|
|||||||
@ -349,7 +349,7 @@ class Facture extends CommonObject
|
|||||||
$this->lines[$i]->fk_code_ventilation,
|
$this->lines[$i]->fk_code_ventilation,
|
||||||
$this->lines[$i]->info_bits,
|
$this->lines[$i]->info_bits,
|
||||||
$this->lines[$i]->fk_remise_except,
|
$this->lines[$i]->fk_remise_except,
|
||||||
'HT',
|
'HT',
|
||||||
0,
|
0,
|
||||||
$this->lines[$i]->product_type,
|
$this->lines[$i]->product_type,
|
||||||
$this->lines[$i]->rang,
|
$this->lines[$i]->rang,
|
||||||
@ -400,7 +400,13 @@ class Facture extends CommonObject
|
|||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$_facrec->lines[$i]->fk_product,
|
$_facrec->lines[$i]->fk_product,
|
||||||
$_facrec->lines[$i]->remise_percent,
|
$_facrec->lines[$i]->remise_percent,
|
||||||
'','',0,0,'','HT',0,
|
'',
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
'',
|
||||||
|
'HT',
|
||||||
|
0,
|
||||||
$_facrec->lines[$i]->product_type,
|
$_facrec->lines[$i]->product_type,
|
||||||
$_facrec->lines[$i]->rang,
|
$_facrec->lines[$i]->rang,
|
||||||
$_facrec->lines[$i]->special_code
|
$_facrec->lines[$i]->special_code
|
||||||
@ -1264,7 +1270,7 @@ class Facture extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,10 +34,10 @@ class FileUpload
|
|||||||
protected $_options;
|
protected $_options;
|
||||||
protected $_fk_element;
|
protected $_fk_element;
|
||||||
protected $_element;
|
protected $_element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param array $options Options array
|
* @param array $options Options array
|
||||||
* @param int $fk_element fk_element
|
* @param int $fk_element fk_element
|
||||||
* @param string $element element
|
* @param string $element element
|
||||||
@ -46,17 +46,17 @@ class FileUpload
|
|||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
global $object;
|
global $object;
|
||||||
|
|
||||||
$this->_fk_element=$fk_element;
|
$this->_fk_element=$fk_element;
|
||||||
$this->_element=$element;
|
$this->_element=$element;
|
||||||
|
|
||||||
$pathname=$filename=$element;
|
$pathname=$filename=$element;
|
||||||
if (preg_match('/^([^_]+)_([^_]+)/i',$element,$regs))
|
if (preg_match('/^([^_]+)_([^_]+)/i',$element,$regs))
|
||||||
{
|
{
|
||||||
$pathname = $regs[1];
|
$pathname = $regs[1];
|
||||||
$filename = $regs[2];
|
$filename = $regs[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
// For compatibility
|
// For compatibility
|
||||||
if ($element == 'propal') {
|
if ($element == 'propal') {
|
||||||
$pathname = 'comm/propal';
|
$pathname = 'comm/propal';
|
||||||
@ -82,18 +82,18 @@ class FileUpload
|
|||||||
}
|
}
|
||||||
|
|
||||||
dol_include_once('/'.$pathname.'/class/'.$filename.'.class.php');
|
dol_include_once('/'.$pathname.'/class/'.$filename.'.class.php');
|
||||||
|
|
||||||
$classname = ucfirst($filename);
|
$classname = ucfirst($filename);
|
||||||
|
|
||||||
if ($element == 'order_supplier') {
|
if ($element == 'order_supplier') {
|
||||||
$classname = 'CommandeFournisseur';
|
$classname = 'CommandeFournisseur';
|
||||||
}
|
}
|
||||||
|
|
||||||
$object = new $classname($db);
|
$object = new $classname($db);
|
||||||
|
|
||||||
$object->fetch($fk_element);
|
$object->fetch($fk_element);
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$this->_options = array(
|
$this->_options = array(
|
||||||
'script_url' => $_SERVER['PHP_SELF'],
|
'script_url' => $_SERVER['PHP_SELF'],
|
||||||
'upload_dir' => $dir_output . '/' . $object->ref . '/',
|
'upload_dir' => $dir_output . '/' . $object->ref . '/',
|
||||||
@ -141,11 +141,14 @@ class FileUpload
|
|||||||
$this->_options = array_replace_recursive($this->_options, $options);
|
$this->_options = array_replace_recursive($this->_options, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* getFullUrl
|
||||||
|
*
|
||||||
|
* @return string Full url
|
||||||
*/
|
*/
|
||||||
protected function getFullUrl() {
|
protected function getFullUrl()
|
||||||
|
{
|
||||||
$https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
|
$https = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
|
||||||
return
|
return
|
||||||
($https ? 'https://' : 'http://').
|
($https ? 'https://' : 'http://').
|
||||||
@ -155,13 +158,15 @@ class FileUpload
|
|||||||
$_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
|
$_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
|
||||||
substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
|
substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set delete url
|
* Set delete url
|
||||||
*
|
*
|
||||||
* @param unknown_type $file
|
* @param string $file File
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function set_file_delete_url($file) {
|
protected function set_file_delete_url($file)
|
||||||
|
{
|
||||||
$file->delete_url = $this->_options['script_url']
|
$file->delete_url = $this->_options['script_url']
|
||||||
.'?file='.rawurlencode($file->name).'&fk_element='.$this->_fk_element.'&element='.$this->_element;
|
.'?file='.rawurlencode($file->name).'&fk_element='.$this->_fk_element.'&element='.$this->_element;
|
||||||
$file->delete_type = $this->_options['delete_type'];
|
$file->delete_type = $this->_options['delete_type'];
|
||||||
@ -169,7 +174,7 @@ class FileUpload
|
|||||||
$file->delete_url .= '&_method=DELETE';
|
$file->delete_url .= '&_method=DELETE';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
@ -218,7 +223,7 @@ class FileUpload
|
|||||||
protected function create_scaled_image($file_name, $options)
|
protected function create_scaled_image($file_name, $options)
|
||||||
{
|
{
|
||||||
global $maxwidthmini, $maxheightmini;
|
global $maxwidthmini, $maxheightmini;
|
||||||
|
|
||||||
$file_path = $this->_options['upload_dir'].$file_name;
|
$file_path = $this->_options['upload_dir'].$file_name;
|
||||||
$new_file_path = $options['upload_dir'].$file_name;
|
$new_file_path = $options['upload_dir'].$file_name;
|
||||||
|
|
||||||
@ -302,10 +307,10 @@ class FileUpload
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $matches
|
* @param unknown_type $matches
|
||||||
*/
|
*/
|
||||||
protected function upcount_name_callback($matches) {
|
protected function upcount_name_callback($matches) {
|
||||||
@ -313,10 +318,10 @@ class FileUpload
|
|||||||
$ext = isset($matches[2]) ? $matches[2] : '';
|
$ext = isset($matches[2]) ? $matches[2] : '';
|
||||||
return ' ('.$index.')'.$ext;
|
return ' ('.$index.')'.$ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $name
|
* @param unknown_type $name
|
||||||
*/
|
*/
|
||||||
protected function upcount_name($name) {
|
protected function upcount_name($name) {
|
||||||
@ -327,13 +332,14 @@ class FileUpload
|
|||||||
1
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $name
|
* @param string $name
|
||||||
* @param unknown_type $type
|
* @param string $type
|
||||||
* @param unknown_type $index
|
* @param string $index
|
||||||
|
* @return string Trimed string
|
||||||
*/
|
*/
|
||||||
protected function trim_file_name($name, $type, $index) {
|
protected function trim_file_name($name, $type, $index) {
|
||||||
// Remove path information and dots around the filename, to prevent uploading
|
// Remove path information and dots around the filename, to prevent uploading
|
||||||
@ -352,20 +358,20 @@ class FileUpload
|
|||||||
}
|
}
|
||||||
return $file_name;
|
return $file_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $file
|
* @param unknown_type $file
|
||||||
* @param unknown_type $index
|
* @param unknown_type $index
|
||||||
*/
|
*/
|
||||||
protected function handle_form_data($file, $index) {
|
protected function handle_form_data($file, $index) {
|
||||||
// Handle form data, e.g. $_REQUEST['description'][$index]
|
// Handle form data, e.g. $_REQUEST['description'][$index]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $file_path
|
* @param unknown_type $file_path
|
||||||
*/
|
*/
|
||||||
protected function orient_image($file_path) {
|
protected function orient_image($file_path) {
|
||||||
|
|||||||
@ -56,7 +56,6 @@ class HookManager
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Init array this->hooks with instantiated action controlers.
|
* Init array this->hooks with instantiated action controlers.
|
||||||
*
|
|
||||||
* First, a hook is declared by a module by adding a constant MAIN_MODULE_MYMODULENAME_HOOKS
|
* First, a hook is declared by a module by adding a constant MAIN_MODULE_MYMODULENAME_HOOKS
|
||||||
* with value 'nameofcontext1:nameofcontext2:...' into $this->const of module descriptor file.
|
* with value 'nameofcontext1:nameofcontext2:...' into $this->const of module descriptor file.
|
||||||
* This make conf->hooks_modules loaded with an entry ('modulename'=>array(nameofcontext1,nameofcontext2,...))
|
* This make conf->hooks_modules loaded with an entry ('modulename'=>array(nameofcontext1,nameofcontext2,...))
|
||||||
|
|||||||
@ -1013,7 +1013,7 @@ class Ldap
|
|||||||
* Required by Active Directory
|
* Required by Active Directory
|
||||||
*
|
*
|
||||||
* @param string $hex Hex value
|
* @param string $hex Hex value
|
||||||
* @return string Little endian
|
* @return string Little endian
|
||||||
*/
|
*/
|
||||||
function littleEndian($hex)
|
function littleEndian($hex)
|
||||||
{
|
{
|
||||||
@ -1028,7 +1028,7 @@ class Ldap
|
|||||||
* Recupere le SID de l'utilisateur
|
* Recupere le SID de l'utilisateur
|
||||||
* Required by Active Directory
|
* Required by Active Directory
|
||||||
*
|
*
|
||||||
* @param string $ldapuser Login de l'utilisateur
|
* @param string $ldapUser Login de l'utilisateur
|
||||||
* @return string Sid
|
* @return string Sid
|
||||||
*/
|
*/
|
||||||
function getObjectSid($ldapUser)
|
function getObjectSid($ldapUser)
|
||||||
|
|||||||
@ -203,16 +203,16 @@ class Notify
|
|||||||
|
|
||||||
$mailfile = new CMailFile(
|
$mailfile = new CMailFile(
|
||||||
$subject,
|
$subject,
|
||||||
$sendto,
|
$sendto,
|
||||||
$replyto,
|
$replyto,
|
||||||
$message,
|
$message,
|
||||||
array($file),
|
array($file),
|
||||||
array($mimefile),
|
array($mimefile),
|
||||||
array($filename[count($filename)-1]),
|
array($filename[count($filename)-1]),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
$msgishtml
|
$msgishtml
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($mailfile->sendfile())
|
if ($mailfile->sendfile())
|
||||||
|
|||||||
@ -644,7 +644,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
|
|||||||
date("m", $date_paques),
|
date("m", $date_paques),
|
||||||
date("d", $date_paques) + 38,
|
date("d", $date_paques) + 38,
|
||||||
date("Y", $date_paques)
|
date("Y", $date_paques)
|
||||||
);
|
);
|
||||||
$jour_ascension = date("d", $date_ascension);
|
$jour_ascension = date("d", $date_ascension);
|
||||||
$mois_ascension = date("m", $date_ascension);
|
$mois_ascension = date("m", $date_ascension);
|
||||||
if($jour_ascension == $jour && $mois_ascension == $mois) $ferie=true;
|
if($jour_ascension == $jour && $mois_ascension == $mois) $ferie=true;
|
||||||
@ -652,12 +652,12 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR')
|
|||||||
|
|
||||||
// Calcul de Pentecote (11 jours apres Paques)
|
// Calcul de Pentecote (11 jours apres Paques)
|
||||||
$date_pentecote = mktime(
|
$date_pentecote = mktime(
|
||||||
date("H", $date_ascension),
|
date("H", $date_ascension),
|
||||||
date("i", $date_ascension),
|
date("i", $date_ascension),
|
||||||
date("s", $date_ascension),
|
date("s", $date_ascension),
|
||||||
date("m", $date_ascension),
|
date("m", $date_ascension),
|
||||||
date("d", $date_ascension) + 11,
|
date("d", $date_ascension) + 11,
|
||||||
date("Y", $date_ascension)
|
date("Y", $date_ascension)
|
||||||
);
|
);
|
||||||
$jour_pentecote = date("d", $date_pentecote);
|
$jour_pentecote = date("d", $date_pentecote);
|
||||||
$mois_pentecote = date("m", $date_pentecote);
|
$mois_pentecote = date("m", $date_pentecote);
|
||||||
|
|||||||
@ -490,6 +490,7 @@ function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1)
|
|||||||
* Before= Capture d\'écran.doc After= Capture d'écran.doc
|
* Before= Capture d\'écran.doc After= Capture d'écran.doc
|
||||||
*
|
*
|
||||||
* @param string $filename Filename
|
* @param string $filename Filename
|
||||||
|
* @return string Unescaped string
|
||||||
*/
|
*/
|
||||||
function dol_unescapefile($filename)
|
function dol_unescapefile($filename)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -373,13 +373,13 @@ function dol_string_unaccent($str)
|
|||||||
{
|
{
|
||||||
$string = strtr(
|
$string = strtr(
|
||||||
$str,
|
$str,
|
||||||
"\xC0\xC1\xC2\xC3\xC5\xC7
|
"\xC0\xC1\xC2\xC3\xC5\xC7
|
||||||
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
|
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
|
||||||
\xD2\xD3\xD4\xD5\xD8\xD9\xDA\xDB\xDD
|
\xD2\xD3\xD4\xD5\xD8\xD9\xDA\xDB\xDD
|
||||||
\xE0\xE1\xE2\xE3\xE5\xE7\xE8\xE9\xEA\xEB
|
\xE0\xE1\xE2\xE3\xE5\xE7\xE8\xE9\xEA\xEB
|
||||||
\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF8
|
\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF8
|
||||||
\xF9\xFA\xFB\xFD\xFF",
|
\xF9\xFA\xFB\xFD\xFF",
|
||||||
"AAAAAC
|
"AAAAAC
|
||||||
EEEEIIIIDN
|
EEEEIIIIDN
|
||||||
OOOOOUUUY
|
OOOOOUUUY
|
||||||
aaaaaceeee
|
aaaaaceeee
|
||||||
@ -449,7 +449,6 @@ function dol_escape_htmltag($stringtoescape,$keepb=0)
|
|||||||
* this, use logging to files instead of syslog (see setup of module).
|
* this, use logging to files instead of syslog (see setup of module).
|
||||||
* Note: If SYSLOG_FILE_NO_ERROR defined, we never output any error message when writing to log fails.
|
* Note: If SYSLOG_FILE_NO_ERROR defined, we never output any error message when writing to log fails.
|
||||||
* Note: You can get log message into html sources by adding parameter &logtohtml=1 (constant MAIN_LOGTOHTML must be set)
|
* Note: You can get log message into html sources by adding parameter &logtohtml=1 (constant MAIN_LOGTOHTML must be set)
|
||||||
*
|
|
||||||
* This function works only if syslog module is enabled.
|
* This function works only if syslog module is enabled.
|
||||||
* This must not use any call to other function calling dol_syslog (avoid infinite loop).
|
* This must not use any call to other function calling dol_syslog (avoid infinite loop).
|
||||||
*
|
*
|
||||||
@ -877,7 +876,6 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
|||||||
/**
|
/**
|
||||||
* Return an array with locale date info.
|
* Return an array with locale date info.
|
||||||
* PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows
|
* PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows
|
||||||
*
|
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -392,7 +392,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
|
|
||||||
$invoice->fetch($obj->fk_facture_source);
|
$invoice->fetch($obj->fk_facture_source);
|
||||||
|
|
||||||
$pdf->SetXY($tab3_posx, $tab3_top+$y );
|
$pdf->SetXY($tab3_posx, $tab3_top+$y);
|
||||||
$pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
||||||
$pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0);
|
||||||
@ -401,7 +401,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
||||||
$pdf->MultiCell(20, 3, $invoice->ref, 0, 'L', 0);
|
$pdf->MultiCell(20, 3, $invoice->ref, 0, 'L', 0);
|
||||||
|
|
||||||
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3 );
|
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -429,7 +429,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$y+=3;
|
$y+=3;
|
||||||
$row = $this->db->fetch_object($resql);
|
$row = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$pdf->SetXY($tab3_posx, $tab3_top+$y );
|
$pdf->SetXY($tab3_posx, $tab3_top+$y);
|
||||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0);
|
||||||
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
||||||
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);
|
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);
|
||||||
@ -440,7 +440,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
||||||
$pdf->MultiCell(30, 3, $row->num, 0, 'L', 0);
|
$pdf->MultiCell(30, 3, $row->num, 0, 'L', 0);
|
||||||
|
|
||||||
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3 );
|
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,7 +155,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
/**
|
/**
|
||||||
* Function to build a document on disk using the generic odt module.
|
* Function to build a document on disk using the generic odt module.
|
||||||
*
|
*
|
||||||
* @param Societe $object Object source to build document
|
* @param Societe &$object Object source to build document
|
||||||
* @param Translate $outputlangs Lang output object
|
* @param Translate $outputlangs Lang output object
|
||||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||||
* @return int 1 if OK, <=0 if KO
|
* @return int 1 if OK, <=0 if KO
|
||||||
|
|||||||
@ -364,7 +364,7 @@ abstract class ModeleAccountancyCode
|
|||||||
* Create a document for third party
|
* Create a document for third party
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param Societe $object Object of third party to use
|
* @param Societe &$object Object of third party to use
|
||||||
* @param string $message Message
|
* @param string $message Message
|
||||||
* @param string $modele Force model to use ('' to not force). model can be a model name or a template file.
|
* @param string $modele Force model to use ('' to not force). model can be a model name or a template file.
|
||||||
* @param Translate $outputlangs Object lang to use for translation
|
* @param Translate $outputlangs Object lang to use for translation
|
||||||
@ -416,7 +416,7 @@ function thirdparty_doc_create($db, &$object, $message, $modele, $outputlangs)
|
|||||||
if ($obj->write_file($object, $outputlangs, $srctemplatepath) > 0)
|
if ($obj->write_file($object, $outputlangs, $srctemplatepath) > 0)
|
||||||
{
|
{
|
||||||
$outputlangs->charset_output=$sav_charset_output;
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
|
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||||
$interface=new Interfaces($db);
|
$interface=new Interfaces($db);
|
||||||
@ -425,7 +425,7 @@ function thirdparty_doc_create($db, &$object, $message, $modele, $outputlangs)
|
|||||||
$error++; $this->errors=$interface->errors;
|
$error++; $this->errors=$interface->errors;
|
||||||
}
|
}
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -60,7 +60,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param Societe $object Third party providing order
|
||||||
*/
|
*/
|
||||||
function __construct($db,$object)
|
function __construct($db,$object)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
*
|
*
|
||||||
* @param int $id Element id
|
* @param int $id Element id
|
||||||
* @param string $table Table of Element
|
* @param string $table Table of Element
|
||||||
|
* @return boolean True if exists
|
||||||
*/
|
*/
|
||||||
function checkElementExist($id, $table)
|
function checkElementExist($id, $table)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -251,7 +251,7 @@ if (empty($reshook))
|
|||||||
if ($object->fetch($id,$ref))
|
if ($object->fetch($id,$ref))
|
||||||
{
|
{
|
||||||
$object->oldcopy=dol_clone($object);
|
$object->oldcopy=dol_clone($object);
|
||||||
|
|
||||||
$object->ref = $ref;
|
$object->ref = $ref;
|
||||||
$object->libelle = $_POST["libelle"];
|
$object->libelle = $_POST["libelle"];
|
||||||
$object->description = dol_htmlcleanlastbr($_POST["desc"]);
|
$object->description = dol_htmlcleanlastbr($_POST["desc"]);
|
||||||
@ -549,8 +549,8 @@ if (empty($reshook))
|
|||||||
$localtax2_tx, // localtax2
|
$localtax2_tx, // localtax2
|
||||||
$prod->id,
|
$prod->id,
|
||||||
$_POST["remise_percent"],
|
$_POST["remise_percent"],
|
||||||
'',
|
'',
|
||||||
'', //Todo: voir si fk_remise_except est encore valable car n'apparait plus dans les propales
|
'', //Todo: voir si fk_remise_except est encore valable car n'apparait plus dans les propales
|
||||||
$price_base_type,
|
$price_base_type,
|
||||||
$pu_ttc
|
$pu_ttc
|
||||||
);
|
);
|
||||||
@ -631,11 +631,11 @@ if (empty($reshook))
|
|||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$prod->id,
|
$prod->id,
|
||||||
$_POST["remise_percent"],
|
$_POST["remise_percent"],
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
$price_base_type,
|
$price_base_type,
|
||||||
$pu_ttc
|
$pu_ttc
|
||||||
);
|
);
|
||||||
@ -825,7 +825,7 @@ else
|
|||||||
|
|
||||||
// Note (private, no output on invoices, propales...)
|
// Note (private, no output on invoices, propales...)
|
||||||
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>';
|
||||||
|
|
||||||
$doleditor = new DolEditor('note', $_POST["note"], '', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, 70);
|
$doleditor = new DolEditor('note', $_POST["note"], '', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, 70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
@ -939,7 +939,7 @@ else
|
|||||||
|
|
||||||
// Description (used in invoice, propal...)
|
// Description (used in invoice, propal...)
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
||||||
|
|
||||||
$doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 90);
|
$doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 4, 90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
@ -1032,7 +1032,7 @@ else
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">';
|
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">';
|
||||||
|
|
||||||
$doleditor = new DolEditor('note', $object->note, '', 200, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, 70);
|
$doleditor = new DolEditor('note', $object->note, '', 200, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 8, 70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class Project extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $DB Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref != $this->ref))
|
if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref != $this->ref))
|
||||||
{
|
{
|
||||||
// We remove directory
|
// We remove directory
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class Task extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $DB Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -595,7 +595,7 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
if (isset($this->rights->propale))
|
if (isset($this->rights->propale))
|
||||||
{
|
{
|
||||||
@ -1454,7 +1454,7 @@ class User extends CommonObject
|
|||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
$msgishtml
|
$msgishtml
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($mailfile->sendfile())
|
if ($mailfile->sendfile())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -166,8 +166,8 @@ if ($resql)
|
|||||||
array(),
|
array(),
|
||||||
array(),
|
array(),
|
||||||
array(),
|
array(),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
$msgishtml,
|
$msgishtml,
|
||||||
$errorsto
|
$errorsto
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user