Fix: strict mode mini

This commit is contained in:
Regis Houssin 2012-07-23 21:40:34 +02:00
parent eba0db736e
commit 2035eb0b14

View File

@ -80,16 +80,19 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
$search_user = GETPOST('search_user','int');
$search_sale = GETPOST('search_sale','int');
$day = GETPOST('day','int');
$month = GETPOST('month','int');
$year = GETPOST('year','int');
$filtre = GETPOST('filtre');
// Security check
$fieldid = (! empty($ref)?'facnumber':'rowid');
if ($user->societe_id) $socid=$user->societe_id;
if (! empty($user->societe_id)) $socid=$user->societe_id;
$result = restrictedArea($user, 'facture', $id,'','','fk_soc',$fieldid);
$usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;
// FIXME $usehm not used ?
$usehm=(! empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:false);
$object=new Facture($db);
@ -162,12 +165,12 @@ if ($userid)
if ($userid == -1) $sql.=' AND f.fk_user_author IS NULL';
else $sql.=' AND f.fk_user_author = '.$userid;
}
if ($_GET['filtre'])
if ($filtre)
{
$filtrearr = explode(',', $_GET['filtre']);
foreach ($filtrearr as $fil)
$aFilter = explode(',', $filtre);
foreach ($aFilter as $filter)
{
$filt = explode(':', $fil);
$filt = explode(':', $filter);
$sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]);
}
}
@ -250,6 +253,7 @@ if ($resql)
print '<table class="liste" width="100%">';
// If the user can view prospects other than his'
$moreforfilter='';
if ($user->rights->societe->client->voir || $socid)
{
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
@ -310,6 +314,7 @@ if ($resql)
{
$var=True;
$total=0;
$total_ttc=0;
$totalrecu=0;
while ($i < min($num,$limit))