Fix: Replace with simple directories
This commit is contained in:
parent
c9f15c4fad
commit
852e8703f6
@ -62,12 +62,12 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
$isimage=image_format_supported($original_file);
|
$isimage=image_format_supported($original_file);
|
||||||
if ($isimage >= 0)
|
if ($isimage >= 0)
|
||||||
{
|
{
|
||||||
dol_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file);
|
dol_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_output.'/logos/'.$original_file);
|
||||||
if (! is_dir($conf->societe->dir_logos))
|
if (! is_dir($conf->societe->dir_output.'/logos/'))
|
||||||
{
|
{
|
||||||
create_exdir($conf->societe->dir_logos);
|
create_exdir($conf->societe->dir_output.'/logos/');
|
||||||
}
|
}
|
||||||
if (dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file,1) > 0)
|
if (dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->societe->dir_output.'/logos/'.$original_file,1) > 0)
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
{
|
{
|
||||||
$quality = 80;
|
$quality = 80;
|
||||||
|
|
||||||
$imgThumbSmall = vignette($conf->societe->dir_logos.'/'.$original_file, 200, 100, '_small', $quality);
|
$imgThumbSmall = vignette($conf->societe->dir_output.'/logos/'.$original_file, 200, 100, '_small', $quality);
|
||||||
if (eregi('([^\\\/:]+)$',$imgThumbSmall,$reg))
|
if (eregi('([^\\\/:]+)$',$imgThumbSmall,$reg))
|
||||||
{
|
{
|
||||||
$imgThumbSmall = $reg[1];
|
$imgThumbSmall = $reg[1];
|
||||||
@ -85,7 +85,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
else dol_syslog($imgThumbSmall);
|
else dol_syslog($imgThumbSmall);
|
||||||
|
|
||||||
// Création de la vignette de la page "Société/Institution"
|
// Création de la vignette de la page "Société/Institution"
|
||||||
$imgThumbMini = vignette($conf->societe->dir_logos.'/'.$original_file, 100, 30, '_mini', $quality);
|
$imgThumbMini = vignette($conf->societe->dir_output.'/logos/'.$original_file, 100, 30, '_mini', $quality);
|
||||||
if (eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
if (eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
||||||
{
|
{
|
||||||
$imgThumbMini = $reg[1];
|
$imgThumbMini = $reg[1];
|
||||||
@ -128,7 +128,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
|
|
||||||
if ($_GET["action"] == 'addthumb')
|
if ($_GET["action"] == 'addthumb')
|
||||||
{
|
{
|
||||||
if (file_exists($conf->societe->dir_logos.'/'.$_GET["file"]))
|
if (file_exists($conf->societe->dir_output.'/logos/'.$_GET["file"]))
|
||||||
{
|
{
|
||||||
$isimage=image_format_supported($_GET["file"]);
|
$isimage=image_format_supported($_GET["file"]);
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ if ($_GET["action"] == 'addthumb')
|
|||||||
if ($isimage > 0)
|
if ($isimage > 0)
|
||||||
{
|
{
|
||||||
// Création de la vignette de la page login
|
// Création de la vignette de la page login
|
||||||
$imgThumbSmall = vignette($conf->societe->dir_logos.'/'.$_GET["file"], 200, 100, '_small',80);
|
$imgThumbSmall = vignette($conf->societe->dir_output.'/logos/'.$_GET["file"], 200, 100, '_small',80);
|
||||||
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbSmall,$reg))
|
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbSmall,$reg))
|
||||||
{
|
{
|
||||||
$imgThumbSmall = $reg[1];
|
$imgThumbSmall = $reg[1];
|
||||||
@ -145,7 +145,7 @@ if ($_GET["action"] == 'addthumb')
|
|||||||
else dol_syslog($imgThumbSmall);
|
else dol_syslog($imgThumbSmall);
|
||||||
|
|
||||||
// Création de la vignette de la page "Société/Institution"
|
// Création de la vignette de la page "Société/Institution"
|
||||||
$imgThumbMini = vignette($conf->societe->dir_logos.'/'.$_GET["file"], 100, 30, '_mini',80);
|
$imgThumbMini = vignette($conf->societe->dir_output.'/logos/'.$_GET["file"], 100, 30, '_mini',80);
|
||||||
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
||||||
{
|
{
|
||||||
$imgThumbMini = $reg[1];
|
$imgThumbMini = $reg[1];
|
||||||
@ -171,17 +171,17 @@ if ($_GET["action"] == 'addthumb')
|
|||||||
|
|
||||||
if ($_GET["action"] == 'removelogo')
|
if ($_GET["action"] == 'removelogo')
|
||||||
{
|
{
|
||||||
$logofile=$conf->societe->dir_logos.'/'.$mysoc->logo;
|
$logofile=$conf->societe->dir_output.'/logos/'.$mysoc->logo;
|
||||||
dol_delete_file($logofile);
|
dol_delete_file($logofile);
|
||||||
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO",$conf->entity);
|
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO",$conf->entity);
|
||||||
$mysoc->logo='';
|
$mysoc->logo='';
|
||||||
|
|
||||||
$logosmallfile=$conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small;
|
$logosmallfile=$conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_small;
|
||||||
dol_delete_file($logosmallfile);
|
dol_delete_file($logosmallfile);
|
||||||
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$conf->entity);
|
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$conf->entity);
|
||||||
$mysoc->logo_small='';
|
$mysoc->logo_small='';
|
||||||
|
|
||||||
$logominifile=$conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_mini;
|
$logominifile=$conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_mini;
|
||||||
dol_delete_file($logominifile);
|
dol_delete_file($logominifile);
|
||||||
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$conf->entity);
|
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$conf->entity);
|
||||||
$mysoc->logo_mini='';
|
$mysoc->logo_mini='';
|
||||||
@ -281,7 +281,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
if ($mysoc->logo_mini)
|
if ($mysoc->logo_mini)
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||||
if (file_exists($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_mini))
|
if (file_exists($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||||
{
|
{
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
||||||
@ -549,11 +549,11 @@ else
|
|||||||
print '</td><td valign="center" align="right">';
|
print '</td><td valign="center" align="right">';
|
||||||
|
|
||||||
// On propose la génération de la vignette si elle n'existe pas
|
// On propose la génération de la vignette si elle n'existe pas
|
||||||
if (!is_file($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_mini) && eregi('(\.jpg|\.jpeg|\.png)$',$mysoc->logo))
|
if (!is_file($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && eregi('(\.jpg|\.jpeg|\.png)$',$mysoc->logo))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
||||||
}
|
}
|
||||||
else if ($mysoc->logo_mini && is_file($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_mini))
|
else if ($mysoc->logo_mini && is_file($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -211,7 +211,6 @@ class Conf
|
|||||||
$this->livraison_bon->dir_temp =$rootfordata."/expedition/receipt/temp";
|
$this->livraison_bon->dir_temp =$rootfordata."/expedition/receipt/temp";
|
||||||
|
|
||||||
// Module societe
|
// Module societe
|
||||||
$this->societe->dir_logos =$rootfordata."/societe/logos";
|
|
||||||
if (defined('SOCIETE_OUTPUTDIR') && SOCIETE_OUTPUTDIR) { $this->societe->dir_output=SOCIETE_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
if (defined('SOCIETE_OUTPUTDIR') && SOCIETE_OUTPUTDIR) { $this->societe->dir_output=SOCIETE_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||||
|
|
||||||
// Module don
|
// Module don
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class MenuLeft {
|
|||||||
if (! empty($conf->global->MAIN_SHOW_LOGO))
|
if (! empty($conf->global->MAIN_SHOW_LOGO))
|
||||||
{
|
{
|
||||||
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
||||||
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||||
print '<img title="'.$title.'" src="'.$urllogo.'">';
|
print '<img title="'.$title.'" src="'.$urllogo.'">';
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class MenuLeft {
|
|||||||
if (! empty($conf->global->MAIN_SHOW_LOGO))
|
if (! empty($conf->global->MAIN_SHOW_LOGO))
|
||||||
{
|
{
|
||||||
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
||||||
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||||
print '<img title="'.$title.'" src="'.$urllogo.'">';
|
print '<img title="'.$title.'" src="'.$urllogo.'">';
|
||||||
|
|||||||
@ -381,7 +381,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo;
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -737,7 +737,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo;
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -340,7 +340,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
|
|
||||||
//*********************LOGO****************************
|
//*********************LOGO****************************
|
||||||
$pdf->SetXY(11,7);
|
$pdf->SetXY(11,7);
|
||||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo;
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -916,7 +916,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo;
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -817,7 +817,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetXY($this->marges['g'],6);
|
$pdf->SetXY($this->marges['g'],6);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo;
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -176,7 +176,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$mysoc->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$mysoc->logo;
|
||||||
if ($mysoc->logo)
|
if ($mysoc->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -442,7 +442,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$mysoc->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$mysoc->logo;
|
||||||
if ($mysoc->logo)
|
if ($mysoc->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -67,22 +67,8 @@ class modSociete extends DolibarrModules
|
|||||||
$this->picto='company';
|
$this->picto='company';
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
// TODO Replace with simple directories
|
$this->dirs = array("/societe/temp","/societe/logos");
|
||||||
$this->dirs = array();
|
|
||||||
$r=0;
|
|
||||||
|
|
||||||
$this->dirs[$r][0] = "output";
|
|
||||||
$this->dirs[$r][1] = "/societe";
|
|
||||||
|
|
||||||
$r++;
|
|
||||||
$this->dirs[$r][0] = "temp";
|
|
||||||
$this->dirs[$r][1] = "/societe/temp";
|
|
||||||
|
|
||||||
$r++;
|
|
||||||
$this->dirs[$r][0] = "logos";
|
|
||||||
$this->dirs[$r][1] = "/societe/logos";
|
|
||||||
$this->dirs[$r][2] = 1;
|
|
||||||
|
|
||||||
// Dependances
|
// Dependances
|
||||||
$this->depends = array();
|
$this->depends = array();
|
||||||
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande");
|
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande");
|
||||||
|
|||||||
@ -772,7 +772,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo;
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -593,7 +593,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$mysoc->logo;
|
$logo=$conf->societe->dir_output.'/logos/'.$mysoc->logo;
|
||||||
if ($mysoc->logo)
|
if ($mysoc->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
|
|||||||
@ -121,11 +121,11 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
$title='';
|
$title='';
|
||||||
$width=0;
|
$width=0;
|
||||||
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
|
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
|
||||||
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small);
|
||||||
}
|
}
|
||||||
elseif (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/'.$mysoc->logo))
|
elseif (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_output.'/logos/'.$mysoc->logo))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo);
|
||||||
$width=96;
|
$width=96;
|
||||||
|
|||||||
@ -129,11 +129,11 @@ if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo;
|
|||||||
else if (! empty($conf->global->PAYBOX_LOGO)) $logosmall=$conf->global->PAYBOX_LOGO;
|
else if (! empty($conf->global->PAYBOX_LOGO)) $logosmall=$conf->global->PAYBOX_LOGO;
|
||||||
// Define urllogo
|
// Define urllogo
|
||||||
$urllogo='';
|
$urllogo='';
|
||||||
if (! empty($logosmall) && is_readable($conf->societe->dir_logos.'/thumbs/'.$logosmall))
|
if (! empty($logosmall) && is_readable($conf->societe->dir_output.'/logos/thumbs/'.$logosmall))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$logosmall);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$logosmall);
|
||||||
}
|
}
|
||||||
elseif (! empty($logo) && is_readable($conf->societe->dir_logos.'/'.$logo))
|
elseif (! empty($logo) && is_readable($conf->societe->dir_output.'/logos/'.$logo))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($logo);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($logo);
|
||||||
$width=96;
|
$width=96;
|
||||||
|
|||||||
@ -232,11 +232,11 @@ if ($conf->file->main_authentication) $title.=", ".$langs->trans("Authentication
|
|||||||
// Show logo (search in order: small company logo, large company logo, theme logo, common logo)
|
// Show logo (search in order: small company logo, large company logo, theme logo, common logo)
|
||||||
$width=0;
|
$width=0;
|
||||||
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
|
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
|
||||||
if (is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
|
if (is_readable($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_small);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_small);
|
||||||
}
|
}
|
||||||
elseif (is_readable($conf->societe->dir_logos.'/'.$mysoc->logo))
|
elseif (is_readable($conf->societe->dir_output.'/logos/'.$mysoc->logo))
|
||||||
{
|
{
|
||||||
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo);
|
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo);
|
||||||
$width=96;
|
$width=96;
|
||||||
|
|||||||
@ -74,7 +74,7 @@ if ($modulepart)
|
|||||||
if ($modulepart == 'companylogo')
|
if ($modulepart == 'companylogo')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->societe->dir_logos.'/'.$original_file;
|
$original_file=$conf->societe->dir_output.'/logos/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les photos utilisateurs
|
// Wrapping pour les photos utilisateurs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user