From 50e3049fd7abc8358e743462b69082cc4d8a7e0e Mon Sep 17 00:00:00 2001 From: frederic34 Date: Wed, 30 Jul 2014 17:10:08 +0200 Subject: [PATCH] External user must not have graph box with all stats --- htdocs/core/boxes/box_graph_invoices_permonth.php | 3 +-- htdocs/core/boxes/box_graph_invoices_supplier_permonth.php | 3 +-- htdocs/core/boxes/box_graph_orders_permonth.php | 3 +-- htdocs/core/boxes/box_graph_orders_supplier_permonth.php | 3 +-- htdocs/core/boxes/box_graph_propales_permonth.php | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index a7006d1f4e1..b9345112b54 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -115,11 +115,10 @@ class box_graph_invoices_permonth extends ModeleBoxes if (empty($endyear)) $endyear=$nowarray['year']; $startyear=$endyear-1; $mode='customer'; - $userid=0; $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; - $stats = new FactureStats($this->db, 0, $mode, ($userid>0?$userid:0)); + $stats = new FactureStats($this->db, $socid, $mode, 0); // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) if ($shownb) diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index f306b26eb28..feafaa9a52f 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -114,11 +114,10 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes if (empty($endyear)) $endyear=$nowarray['year']; $startyear=$endyear-1; $mode='supplier'; - $userid=0; $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; - $stats = new FactureStats($this->db, 0, $mode, ($userid>0?$userid:0)); + $stats = new FactureStats($this->db, $socid, $mode, 0); // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) if ($shownb) diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index e701a4b9384..eeec318662a 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -115,11 +115,10 @@ class box_graph_orders_permonth extends ModeleBoxes if (empty($endyear)) $endyear=$nowarray['year']; $startyear=$endyear-1; $mode='customer'; - $userid=0; $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; - $stats = new CommandeStats($this->db, 0, $mode, ($userid>0?$userid:0)); + $stats = new CommandeStats($this->db, $socid, $mode, 0); // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) if ($shownb) diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 56d822876a0..d2b58b78446 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -114,11 +114,10 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes if (empty($endyear)) $endyear=$nowarray['year']; $startyear=$endyear-1; $mode='supplier'; - $userid=0; $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; - $stats = new CommandeStats($this->db, 0, $mode, ($userid>0?$userid:0)); + $stats = new CommandeStats($this->db, $socid, $mode, 0); // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) if ($shownb) diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 8efa4be54a8..3b5ffd287fc 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -115,11 +115,10 @@ class box_graph_propales_permonth extends ModeleBoxes if (empty($endyear)) $endyear=$nowarray['year']; $startyear=$endyear-1; $mode='customer'; - $userid=0; $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; - $stats = new PropaleStats($this->db, 0, $mode, ($userid>0?$userid:0)); + $stats = new PropaleStats($this->db, $socid, $mode, 0); // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) if ($shownb)