Fix phpcs
This commit is contained in:
parent
b20d85b198
commit
31ba277da7
@ -185,7 +185,7 @@ class Cpaiement
|
|||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
|
||||||
if (null !== $ref) {
|
if (null !== $ref) {
|
||||||
$sql .= ' WHERE t.entity IN ('.getEntity('c_paiement').')';
|
$sql .= ' WHERE t.entity IN ('.getEntity('c_paiement').')';
|
||||||
$sql .= ' AND t.code = '.'\''.$ref.'\'';
|
$sql .= " AND t.code = '".$this->db->escape($ref)."'";
|
||||||
} else {
|
} else {
|
||||||
$sql .= ' WHERE t.id = '.$id;
|
$sql .= ' WHERE t.id = '.$id;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1534,34 +1534,25 @@ class SMTPs
|
|||||||
$content .= "--".$this->_getBoundary('alternative')."\r\n";
|
$content .= "--".$this->_getBoundary('alternative')."\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= 'Content-Type: '.$_content['mimeType'].'; '
|
$content .= 'Content-Type: '.$_content['mimeType'].'; charset='.$this->getCharSet();
|
||||||
// . 'charset="' . $this->getCharSet() . '"';
|
|
||||||
. 'charset='.$this->getCharSet().'';
|
|
||||||
|
|
||||||
// $content .= ( $type == 'html') ? '; name="HTML Part"' : '';
|
|
||||||
$content .= "\r\n";
|
$content .= "\r\n";
|
||||||
// $content .= 'Content-Transfer-Encoding: ';
|
|
||||||
// $content .= ($type == 'html') ? 'quoted-printable' : $this->getTransEncodeType();
|
|
||||||
// $content .= "\r\n"
|
|
||||||
// . 'Content-Disposition: inline' . "\r\n"
|
|
||||||
// . 'Content-Description: ' . $type . ' message' . "\r\n";
|
|
||||||
|
|
||||||
if ($this->getMD5flag())
|
if ($this->getMD5flag()) {
|
||||||
$content .= 'Content-MD5: '.$_content['md5']."\r\n";
|
$content .= 'Content-MD5: '.$_content['md5']."\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
$content .= "\r\n".$_content['data']."\r\n";
|
$content .= "\r\n".$_content['data']."\r\n";
|
||||||
|
|
||||||
if (!key_exists('image', $this->_msgContent) && $_content['dataText'] && !empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) // Add plain text message part after html part
|
if (!key_exists('image', $this->_msgContent) && $_content['dataText'] && !empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) // Add plain text message part after html part
|
||||||
{
|
{
|
||||||
$content .= "--".$this->_getBoundary('alternative')."--"."\r\n";
|
$content .= "--".$this->_getBoundary('alternative')."--\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= "\r\n";
|
$content .= "\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close message boundries
|
|
||||||
// $content .= "\r\n--" . $this->_getBoundary() . '--' . "\r\n" ;
|
|
||||||
$content .= "--".$this->_getBoundary('mixed').'--'."\r\n";
|
$content .= "--".$this->_getBoundary('mixed').'--'."\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1325,7 +1325,7 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
if ($this->db)
|
if ($this->db)
|
||||||
{
|
{
|
||||||
$newname = preg_replace('/_/', '', $name);
|
$newname = preg_replace('/_/', '', $name);
|
||||||
$localname = __CLASS__.'::'.'db'.$newname;
|
$localname = __CLASS__.'::db'.$newname;
|
||||||
$reflectClass = new ReflectionClass(__CLASS__);
|
$reflectClass = new ReflectionClass(__CLASS__);
|
||||||
$reflectFunction = $reflectClass->getMethod('db'.$newname);
|
$reflectFunction = $reflectClass->getMethod('db'.$newname);
|
||||||
if ($arg_count < 0) {
|
if ($arg_count < 0) {
|
||||||
|
|||||||
@ -2330,7 +2330,7 @@ else
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
|
if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
|
||||||
{
|
{
|
||||||
print ' - '.'<a href="" class="commonlink aattachtodoc reposition">'.$langs->trans("AttachTheNewLineToTheDocument");
|
print ' - <a href="" class="commonlink aattachtodoc reposition">'.$langs->trans("AttachTheNewLineToTheDocument");
|
||||||
print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
|
print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
@ -2478,7 +2478,7 @@ else
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
|
if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES))
|
||||||
{
|
{
|
||||||
print ' - '.'<a href="" class="commonlink aattachtodoc reposition">'.$langs->trans("AttachTheNewLineToTheDocument");
|
print ' - <a href="" class="commonlink aattachtodoc reposition">'.$langs->trans("AttachTheNewLineToTheDocument");
|
||||||
print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
|
print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -325,13 +325,13 @@ class AdherentTest extends PHPUnit\Framework\TestCase
|
|||||||
|
|
||||||
$conf->global->MAIN_FIRSTNAME_NAME_POSITION = 0; // Force setup for firstname+lastname
|
$conf->global->MAIN_FIRSTNAME_NAME_POSITION = 0; // Force setup for firstname+lastname
|
||||||
|
|
||||||
$template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,'.
|
$template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,';
|
||||||
'__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__';
|
$template .= '__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__';
|
||||||
|
|
||||||
// If option to store clear password has been set, we get 'dolibspec' into PASSWORD field.
|
// If option to store clear password has been set, we get 'dolibspec' into PASSWORD field.
|
||||||
$expected = ',New firstname,New name,New firstname New name,'.
|
$expected = ',New firstname,New name,New firstname New name,';
|
||||||
'New company label,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth, 'day').',,'.
|
$expected .= 'New company label,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth, 'day').',,';
|
||||||
'newlogin';
|
$expected .= 'newlogin';
|
||||||
|
|
||||||
$result = $localobject->makeSubstitution($template);
|
$result = $localobject->makeSubstitution($template);
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
|
|||||||
@ -336,7 +336,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
|
|||||||
|
|
||||||
$result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 1);
|
$result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 1);
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
$this->assertGreaterThanOrEqual(1, $result, 'copy file ('.$file.') into a dir that exists ('.$conf->admin->dir_temp.'/file.csv'.')'); // Should be 1
|
$this->assertGreaterThanOrEqual(1, $result, 'copy file ('.$file.') into a dir that exists ('.$conf->admin->dir_temp.'/file.csv)'); // Should be 1
|
||||||
|
|
||||||
// Again to test with overwriting=0
|
// Again to test with overwriting=0
|
||||||
$result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 0);
|
$result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 0);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user