This commit is contained in:
Frédéric FRANCE
2019-01-27 23:31:37 +01:00
parent b10558bacd
commit ff39491f15
10 changed files with 31 additions and 37 deletions

View File

@@ -534,7 +534,7 @@ if ($id)
if ($valuetoshow != '') {
print '<td align="'.$align.'">';
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1, $valuetoshow).'</a>';
} elseif (! empty($tabhelp[$id][$value])) {
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
} else {

View File

@@ -768,7 +768,7 @@ if ($mode == 'common')
}
print "</td>\n";
}
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url,$regs))
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs))
{
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a></td>';
}
@@ -1061,7 +1061,7 @@ if ($mode == 'deploy')
{
$langs->load('other');
print ' ';
print info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
print info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphp), 1);
}
}
else

View File

@@ -182,7 +182,7 @@ foreach($configfileparameters as $key)
print '<td>'.$newkey.'</td>';
// Value
print "<td>";
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*', ${$newkey});
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i', '*', ${$newkey});
elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/', ${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
else print ${$newkey};
if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';

View File

@@ -530,9 +530,9 @@ if (empty($reshook))
elseif ($action == 'setemail_errorsto') {
$object->email_errorsto = trim(GETPOST('email_errorsto', 'alpha'));
} elseif ($action == 'settitre' && empty($object->titre)) {
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTitle"));
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTitle"));
} elseif ($action == 'setfrom' && empty($object->email_from)) {
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom"));
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailFrom"));
}
if (! $mesg)

View File

@@ -2020,22 +2020,14 @@ class ExtraFields
// Clean parameters
$value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]);
}
<<<<<<< HEAD
else if (in_array($key_type, array('checkbox', 'chkbxlst')))
=======
elseif (in_array($key_type,array('checkbox', 'chkbxlst')))
>>>>>>> upstream/develop
elseif (in_array($key_type, array('checkbox', 'chkbxlst')))
{
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
// Make sure we get an array even if there's only one checkbox
$value_arr=(array) $value_arr;
$value_key=implode(',', $value_arr);
}
<<<<<<< HEAD
else if (in_array($key_type, array('price','double')))
=======
elseif (in_array($key_type,array('price','double')))
>>>>>>> upstream/develop
elseif (in_array($key_type, array('price','double')))
{
$value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
$value_key=price2num($value_arr);

View File

@@ -535,8 +535,8 @@ function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $opti
$out=trim($out);
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
// '../' is dangerous because it allows dir transversals
if (preg_match('/"/',$out)) $out='';
elseif (preg_match('/\.\.\//',$out)) $out='';
if (preg_match('/"/', $out)) $out='';
elseif (preg_match('/\.\.\//', $out)) $out='';
$out=dol_string_nohtmltag($out);
}
break;
@@ -3089,7 +3089,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fa='fa';
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ' ' . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? 'marginleftonlyshort' : 'marginleftonly') : '') . ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ' ' . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? 'marginleftonlyshort' : 'marginleftonly') : '');
$enabledisablehtml .= ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
$enabledisablehtml.= $titlealt;
}

View File

@@ -1355,12 +1355,12 @@ function numero_semaine($time)
*/
// Definition du Jeudi de la semaine
if (date("w",mktime(12, 0, 0, $mois, $jour, $annee))==0) // Dimanche
if (date("w", mktime(12, 0, 0, $mois, $jour, $annee))==0) // Dimanche
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)-3*24*60*60;
elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee))<4) // du Lundi au Mercredi
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)+(4-date("w", mktime(12, 0, 0, $mois, $jour, $annee)))*24*60*60;
elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee))>4) // du Vendredi au Samedi
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)-(date("w",mktime(12,0,0,$mois,$jour,$annee))-4)*24*60*60;
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee)-(date("w", mktime(12, 0, 0, $mois, $jour, $annee))-4)*24*60*60;
else // Jeudi
$jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee);

View File

@@ -171,7 +171,7 @@ class pdf_standardlabel extends CommonStickerGenerator
elseif ($textright == '%LOGO%' || $textright == '%PHOTO%')
{
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop, $widthtouse, $heighttouse);
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
$pdf->SetXY($_PosX+$xleft, $_PosY+$ytop);
$pdf->MultiCell($this->_Width-$widthtouse-$xleft-$xleft-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L');
}
@@ -187,7 +187,7 @@ class pdf_standardlabel extends CommonStickerGenerator
{
// Output right area
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft,$_PosY+$ytop, $widthtouse, $heighttouse);
elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
else
{
$pdf->SetXY($_PosX+$xleft, $_PosY+$ytop);

View File

@@ -411,16 +411,17 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){
}
if ($conf->global->TAKEPOSCONNECTOR){
$menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"),
'action'=>'OpenDrawer();');
$menus[$r++]=array(
'title'=>$langs->trans("DOL_OPEN_DRAWER"),
'action'=>'OpenDrawer();'
);
}
$hookmanager->initHooks(array('takeposfrontend'));
$reshook=$hookmanager->executeHooks('ActionButtons');
if (!empty($reshook))
{
if (!empty($reshook)) {
$menus[$r++]=$reshook;
}
}
?>
<div class="div3">
@@ -446,7 +447,7 @@ foreach($menus as $menu) {
while ($count<16)
{
?>
<div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; else if ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'>
<div class='wrapper' <?php if ($count==14) echo 'onclick="MoreCategories(\'less\');"'; elseif ($count==15) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"';?> id='catdiv<?php echo $count;?>'>
<img class='imgwrapper' <?php if ($count==14) echo 'src="img/arrow-prev-top.png"'; if ($count==15) echo 'src="img/arrow-next-top.png"';?> width="98%" id='catimg<?php echo $count;?>'/>
<div class='description'>
<div class='description_content' id='catdesc<?php echo $count;?>'></div>