Qual: Toutes les images générées ou non (stats, photo utilisateurs) sont affichées à travers le wrapper viewimage.php qui fonctionne sur le même principe que le wrapper document.php pour les documents. Il permet de vérifier les droits.
This commit is contained in:
parent
b2cdc1bc76
commit
8e2b8c2a27
@ -54,7 +54,11 @@ $stats = new CommandeStats($db, $socidp);
|
|||||||
$year = strftime("%Y", time());
|
$year = strftime("%Y", time());
|
||||||
$data = $stats->getNbCommandeByMonthWithPrevYear($year);
|
$data = $stats->getNbCommandeByMonthWithPrevYear($year);
|
||||||
|
|
||||||
if (! is_dir($conf->commande->dir_images)) { mkdir($conf->commande->dir_images); }
|
if (! is_dir($conf->commande->dir_images))
|
||||||
|
{
|
||||||
|
mkdir($conf->commande->dir_output);
|
||||||
|
mkdir($conf->commande->dir_images);
|
||||||
|
}
|
||||||
|
|
||||||
$filename = $conf->commande->dir_images."/nbcommande2year-".$year.".png";
|
$filename = $conf->commande->dir_images."/nbcommande2year-".$year.".png";
|
||||||
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=nbcommande2year-'.$year.'.png';
|
$fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=nbcommande2year-'.$year.'.png';
|
||||||
|
|||||||
@ -89,6 +89,8 @@ class modCommande extends DolibarrModules
|
|||||||
*/
|
*/
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove();
|
$this->remove();
|
||||||
|
|
||||||
@ -117,6 +119,10 @@ class modCommande extends DolibarrModules
|
|||||||
$this->rights[4][2] = 'd';
|
$this->rights[4][2] = 'd';
|
||||||
$this->rights[4][3] = 0;
|
$this->rights[4][3] = 0;
|
||||||
|
|
||||||
|
// Dir
|
||||||
|
$this->dirs[0] = $conf->commande->dir_output;
|
||||||
|
$this->dirs[1] = $conf->commande->dir_images;
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql);
|
return $this->_init($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user