diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index 2b5163bb4f2..ea5ba91c715 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -88,7 +88,7 @@ $search_all=trim(GETPOST("search_all", 'alpha'));
$search=array();
foreach($object->fields as $key => $val)
{
- if (GETPOST('search_'.$key,'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha');
+ if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha');
}
if (empty($action) && empty($id) && empty($ref)) $action='view';
@@ -119,11 +119,11 @@ if (empty($reshook))
$permissiontoadd = $user->rights->bom->write;
$permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0);
- $backurlforlist = dol_buildpath('/bom/bom_list.php', 1);
+ $backurlforlist = dol_buildpath('/bom/bom_list.php', 1);
if (empty($backtopage)) {
if (empty($id)) $backtopage = $backurlforlist;
- else $backtopage = dol_buildpath('/bom/bom_card.php',1).($id > 0 ? $id : '__ID__');
- }
+ else $backtopage = dol_buildpath('/bom/bom_card.php', 1).($id > 0 ? $id : '__ID__');
+ }
$triggermodname = 'BILLOFMATERIALS_BILLOFMATERIALS_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, delete or clone
diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php
index 985241e92ff..4785d0c4598 100644
--- a/htdocs/bom/bom_list.php
+++ b/htdocs/bom/bom_list.php
@@ -150,7 +150,7 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
* Actions
*/
-if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
+if (GETPOST('cancel', 'alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
$parameters=array();
@@ -163,7 +163,7 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Purge search criteria
- if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
+ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') ||GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
{
foreach($object->fields as $key => $val)
{
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index d84be3a06ad..2221da19567 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -995,7 +995,7 @@ class BillOfMaterialsLine extends CommonObject
$label.= '
';
$label.= '' . $langs->trans('Ref') . ': ' . $this->ref;
- $url = dol_buildpath('/bom/bomline_card.php',1).'?id='.$this->id;
+ $url = dol_buildpath('/bom/bomline_card.php', 1).'?id='.$this->id;
if ($option != 'nolink')
{
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 41ff8061244..897dfaf557b 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -718,7 +718,7 @@ if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($arrayfields['p.fax']['label'], $_SERVER["PHP_SELF"], "p.fax", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder);
-if (! empty($arrayfields['p.no_email']['checked'])) print_liste_field_titre($arrayfields['p.no_email']['label'],$_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center ');
+if (! empty($arrayfields['p.no_email']['checked'])) print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($arrayfields['p.skype']['label'], $_SERVER["PHP_SELF"], "p.skype", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field_titre($arrayfields['p.twitter']['label'], $_SERVER["PHP_SELF"], "p.twitter", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'], $_SERVER["PHP_SELF"], "p.facebook", $begin, $param, '', $sortfield, $sortorder);
diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php
index 546c5ed6fca..506c067790a 100644
--- a/htdocs/takepos/genimg/index.php
+++ b/htdocs/takepos/genimg/index.php
@@ -54,19 +54,19 @@ if ($query=="cat")
$dir = $upload_dir.'/'.$pdir;
foreach ($object->liste_photos($dir) as $key => $obj)
+ {
+ if ($obj['photo_vignette'])
{
- if ($obj['photo_vignette'])
- {
- $filename=$obj['photo_vignette'];
- }
- else
- {
- $filename=$obj['photo'];
- }
- $file=DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename);
- header('Location: '.$file);
- exit;
+ $filename=$obj['photo_vignette'];
}
+ else
+ {
+ $filename=$obj['photo'];
+ }
+ $file=DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename);
+ header('Location: '.$file);
+ exit;
+ }
header('Location: ../../public/theme/common/nophoto.png');
}
elseif ($query=="pro")
@@ -81,7 +81,6 @@ elseif ($query=="pro")
$file = array_pop($match);
if ($file=="") header('Location: ../../public/theme/common/nophoto.png');
else header('Location: '.$file);
-
}
else
{