Fix: best practice
This commit is contained in:
parent
1450ee1978
commit
9058439015
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2011 Regis Houssin <regis@dolibarr.fr>
|
/* Copyright (C) 2007-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -169,7 +169,7 @@ class FormBarCode
|
|||||||
{
|
{
|
||||||
print '<form method="post" action="'.$page.'">';
|
print '<form method="post" action="'.$page.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="setfk_barcode_type">';
|
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$this->select_barcode_type($selected, $htmlname, 1);
|
$this->select_barcode_type($selected, $htmlname, 1);
|
||||||
|
|||||||
@ -133,7 +133,7 @@ else
|
|||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
$sql.= " AND (p.ref LIKE '%".$db->escape($sall)."%' OR p.label LIKE '%".$db->escape($sall)."%' OR p.description LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%'";
|
$sql.= " AND (p.ref LIKE '%".$db->escape($sall)."%' OR p.label LIKE '%".$db->escape($sall)."%' OR p.description LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%'";
|
||||||
if (! empty($conf->global->MAIN_MODULE_BARCODE))
|
if (! empty($conf->barcode->enabled))
|
||||||
{
|
{
|
||||||
$sql.= " OR p.barcode LIKE '%".$db->escape($sall)."%'";
|
$sql.= " OR p.barcode LIKE '%".$db->escape($sall)."%'";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user