Fix: Select of user

This commit is contained in:
Laurent Destailleur 2013-03-11 14:51:19 +01:00
parent 9eae775837
commit b4299ad583
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class FactureStats extends Stats
global $conf;
$this->db = $db;
$this->socid = $socid;
$this->socid = ($socid > 0 ? $socid : 0);
$this->userid = $userid;
if ($mode == 'customer')

View File

@ -34,8 +34,8 @@ $mode=GETPOST("mode")?GETPOST("mode"):'customer';
if ($mode == 'customer' && ! $user->rights->facture->lire) accessforbidden();
if ($mode == 'supplier' && ! $user->rights->fournisseur->facture->lire) accessforbidden();
$userid=GETPOST('userid','int'); if ($userid < 0) $userid=0;
$socid=GETPOST('socid','int'); if ($socid < 0) $socid=0;
$userid=GETPOST('userid','int');
$socid=GETPOST('socid','int');
// Security check
if ($user->societe_id > 0)
{