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