Debug v17
This commit is contained in:
parent
d0a824c5e9
commit
4890a2ada3
@ -1725,10 +1725,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td>';
|
||||
print '<td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib('', 1).'</td>';
|
||||
print '<tr><td>'.$langs->trans("MemberNature").'</td>';
|
||||
print '<td class="valeur" >'.$object->getmorphylib('', 1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Company
|
||||
|
||||
@ -520,7 +520,7 @@ class Adherent extends CommonObject
|
||||
* Return translated label by the nature of a adherent (physical or moral)
|
||||
*
|
||||
* @param string $morphy Nature of the adherent (physical or moral)
|
||||
* @param int $addbadge Add badge (1=Full label, 2=First letter only)
|
||||
* @param int $addbadge Add badge (1=Full label, 2=First letters only)
|
||||
* @return string Label
|
||||
*/
|
||||
public function getmorphylib($morphy = '', $addbadge = 0)
|
||||
@ -534,21 +534,27 @@ class Adherent extends CommonObject
|
||||
|
||||
if ($addbadge) {
|
||||
$s = '';
|
||||
$labeltoshowm = $langs->trans("Moral");
|
||||
$labeltoshowp = $langs->trans("Physical");
|
||||
if ($morphy == 'phy') {
|
||||
$labeltoshow = $labeltoshowp;
|
||||
if ($addbadge == 2) {
|
||||
$labeltoshow = dol_substr($langs->trans("Physical"), 0, 1);
|
||||
} else {
|
||||
$labeltoshow = $langs->trans("Physical");
|
||||
$labeltoshow = dol_strtoupper(dolGetFirstLetters($labeltoshowp));
|
||||
if ($labeltoshow == dol_strtoupper(dolGetFirstLetters($labeltoshowm))) {
|
||||
$labeltoshow = dol_strtoupper(dolGetFirstLetters($labeltoshowp, 2));
|
||||
}
|
||||
}
|
||||
$s .= '<span class="customer-back paddingleftimp paddingrightimp" title="'.$langs->trans("Physical").'">'.$labeltoshow.'</span>';
|
||||
$s .= '<span class="member-individual-back paddingleftimp paddingrightimp" title="'.$langs->trans("Physical").'">'.$labeltoshow.'</span>';
|
||||
}
|
||||
if ($morphy == 'mor') {
|
||||
$labeltoshow = $labeltoshowm;
|
||||
if ($addbadge == 2) {
|
||||
$labeltoshow = dol_substr($langs->trans("Moral"), 0, 1);
|
||||
} else {
|
||||
$labeltoshow = $langs->trans("Moral");
|
||||
$labeltoshow = dol_strtoupper(dolGetFirstLetters($labeltoshowm));
|
||||
if ($labeltoshow == dol_strtoupper(dolGetFirstLetters($labeltoshowp))) {
|
||||
$labeltoshow = dol_strtoupper(dolGetFirstLetters($labeltoshowm, 2));
|
||||
}
|
||||
}
|
||||
$s .= '<span class="vendor-back paddingleftimp paddingrightimp" title="'.$langs->trans("Moral").'">'.$labeltoshow.'</span>';
|
||||
$s .= '<span class="member-company-back paddingleftimp paddingrightimp" title="'.$langs->trans("Moral").'">'.$labeltoshow.'</span>';
|
||||
}
|
||||
} else {
|
||||
if ($morphy == 'phy') {
|
||||
|
||||
@ -158,13 +158,12 @@ if ($id > 0) {
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Type").'</td>';
|
||||
print '<td class="valeur">'.$membert->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" class="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$object);
|
||||
print '</td>';*/
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MemberNature").'</td>';
|
||||
print '<td class="valeur" >'.$object->getmorphylib('', 1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Company
|
||||
|
||||
@ -133,13 +133,12 @@ if ($id) {
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Type").'</td>';
|
||||
print '<td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" class="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MemberNature").'</td>';
|
||||
print '<td class="valeur" >'.$object->getmorphylib('', 1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Company
|
||||
|
||||
@ -506,10 +506,12 @@ if ($rowid > 0) {
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td>';
|
||||
print '<td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
print '<tr><td>'.$langs->trans("MemberNature").'</td>';
|
||||
print '<td class="valeur" >'.$object->getmorphylib('', 1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Company
|
||||
|
||||
@ -641,6 +641,12 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask
|
||||
return 0;
|
||||
}
|
||||
|
||||
$srcexists = dol_is_file($srcfile);
|
||||
if (!$srcexists) {
|
||||
dol_syslog("files.lib.php::dolReplaceInFile failed to read src file", LOG_WARNING);
|
||||
return -3;
|
||||
}
|
||||
|
||||
$tmpdestfile = $destfile.'.tmp';
|
||||
|
||||
$newpathofsrcfile = dol_osencode($srcfile);
|
||||
|
||||
@ -3830,6 +3830,26 @@ function isValidPhone($phone)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return first letters of a strings.
|
||||
* Example with nbofchar=1: 'ghi' will return 'g' but 'abc def' will return 'ad'
|
||||
* Example with nbofchar=2: 'ghi' will return 'gh' but 'abc def' will return 'abde'
|
||||
*
|
||||
* @param string $s String to truncate
|
||||
* @param int $nbofchar Nb of characters to keep
|
||||
* @return string Return first chars.
|
||||
*/
|
||||
function dolGetFirstLetters($s, $nbofchar = 1) {
|
||||
$ret = '';
|
||||
$tmparray = explode(' ', $s);
|
||||
foreach($tmparray as $tmps) {
|
||||
$ret .= dol_substr($tmps, 0, $nbofchar);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make a strlen call. Works even if mbstring module not enabled
|
||||
*
|
||||
|
||||
@ -295,7 +295,20 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
||||
margin: 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.member-company-back {
|
||||
padding: 2px 7px 2px 7px;
|
||||
background-color: #e4e4e4;
|
||||
color: #666;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.member-individual-back {
|
||||
padding: 2px 7px 2px 7px;
|
||||
background-color: #e4e4e4;
|
||||
color: #666;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.bg-infobox-project{
|
||||
|
||||
@ -48,7 +48,20 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
||||
margin: 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.member-company-back {
|
||||
padding: 2px 7px 2px 7px;
|
||||
background-color: #e4e4e4;
|
||||
color: #666;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.member-individual-back {
|
||||
padding: 2px 7px 2px 7px;
|
||||
background-color: #e4e4e4;
|
||||
color: #666;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bg-infobox-project{
|
||||
<?php echo $prefix; ?>color: #6c6aa8 !important;
|
||||
|
||||
@ -1003,10 +1003,14 @@ class Website extends CommonObject
|
||||
|
||||
// Make some replacement into some files
|
||||
$cssindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/styles.css.php';
|
||||
dolReplaceInFile($cssindestdir, $arrayreplacementincss);
|
||||
if (dol_is_file($cssindestdir)) {
|
||||
dolReplaceInFile($cssindestdir, $arrayreplacementincss);
|
||||
}
|
||||
|
||||
$htmldeaderindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/htmlheader.html';
|
||||
dolReplaceInFile($htmldeaderindestdir, $arrayreplacementincss);
|
||||
if (dol_is_file($htmldeaderindestdir)) {
|
||||
dolReplaceInFile($htmldeaderindestdir, $arrayreplacementincss);
|
||||
}
|
||||
|
||||
// Build sql file
|
||||
$filesql = $conf->website->dir_temp.'/'.$website->ref.'/website_pages.sql';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user