2
0
forked from Wavyzz/dolibarr

Fix: Files related to running company must not be saved into same directory dedicated to module third party.

This commit is contained in:
Laurent Destailleur
2009-07-02 00:16:50 +00:00
parent fbd3bd0a76
commit d4b0cfdfb7
21 changed files with 46 additions and 44 deletions

View File

@@ -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_output.'/logos/'.$original_file); dol_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->mycompany->dir_output.'/logos/'.$original_file);
if (! is_dir($conf->societe->dir_output.'/logos/')) // TODO ne fonctionne qu'avec le module Tiers d'activ<69> if (! is_dir($conf->mycompany->dir_output.'/logos/'))
{ {
create_exdir($conf->societe->dir_output.'/logos/'); create_exdir($conf->mycompany->dir_output.'/logos/');
} }
if (dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->societe->dir_output.'/logos/'.$original_file,1) > 0) if (dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->mycompany->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_output.'/logos/'.$original_file, 200, 100, '_small', $quality); $imgThumbSmall = vignette($conf->mycompany->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<43>ation de la vignette de la page "Soci<63>t<EFBFBD>/Institution" // Cr<43>ation de la vignette de la page "Soci<63>t<EFBFBD>/Institution"
$imgThumbMini = vignette($conf->societe->dir_output.'/logos/'.$original_file, 100, 30, '_mini', $quality); $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, 100, 30, '_mini', $quality);
if (eregi('([^\\\/:]+)$',$imgThumbMini,$reg)) if (eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
{ {
$imgThumbMini = $reg[1]; $imgThumbMini = $reg[1];
@@ -136,7 +136,7 @@ if ($_GET["action"] == 'addthumb')
if ($isimage > 0) if ($isimage > 0)
{ {
// Cr<43>ation de la vignette de la page login // Cr<43>ation de la vignette de la page login
$imgThumbSmall = vignette($conf->societe->dir_output.'/logos/'.$_GET["file"], 200, 100, '_small',80); $imgThumbSmall = vignette($conf->mycompany->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<43>ation de la vignette de la page "Soci<63>t<EFBFBD>/Institution" // Cr<43>ation de la vignette de la page "Soci<63>t<EFBFBD>/Institution"
$imgThumbMini = vignette($conf->societe->dir_output.'/logos/'.$_GET["file"], 100, 30, '_mini',80); $imgThumbMini = vignette($conf->mycompany->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_output.'/logos/'.$mysoc->logo; $logofile=$conf->mycompany->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_output.'/logos/thumbs/'.$mysoc->logo_small; $logosmallfile=$conf->mycompany->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_output.'/logos/thumbs/'.$mysoc->logo_mini; $logominifile=$conf->mycompany->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='';
@@ -282,7 +282,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_output.'/logos/thumbs/'.$mysoc->logo_mini)) if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{ {
print ' &nbsp; '; print ' &nbsp; ';
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">'; print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
@@ -550,11 +550,11 @@ else
print '</td><td valign="center" align="right">'; print '</td><td valign="center" align="right">';
// On propose la g<>n<EFBFBD>ration de la vignette si elle n'existe pas // On propose la g<>n<EFBFBD>ration de la vignette si elle n'existe pas
if (!is_file($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && eregi('(\.jpg|\.jpeg|\.png)$',$mysoc->logo)) if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && eregi('(\.jpg|\.jpeg|\.png)$',$mysoc->logo))
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&amp;file='.urlencode($mysoc->logo).'">'.img_refresh($langs->trans('GenerateThumb')).'&nbsp;&nbsp;</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&amp;file='.urlencode($mysoc->logo).'">'.img_refresh($langs->trans('GenerateThumb')).'&nbsp;&nbsp;</a>';
} }
else if ($mysoc->logo_mini && is_file($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{ {
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">'; print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
} }

View File

@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
} }
.logo { .logo {
background: url('<?php echo $conf_url_racine; ?>/documents/societe/logos/logo.jpg') no-repeat top left; background: url('<?php echo DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_mini); ?>') no-repeat top left;
height: 128px; height: 128px;
width: 650px; width: 650px;
} }

View File

@@ -194,13 +194,21 @@ class Conf
//print 'this->'.$module.'->dir_temp='.$this->$module->dir_temp.'<br>'; //print 'this->'.$module.'->dir_temp='.$this->$module->dir_temp.'<br>';
} }
// Exception: Some dir are not the name of module. So we keep exception here // For mycompany setup
// for backward compatibility. $this->mycompany->dir_output=$rootfordata."/mycompany";
$this->mycompany->dir_temp=$rootfordata."/mycompany/temp";
// For admin features
$this->admin->dir_output=$rootfordata.'/admin';
$this->admin->dir_temp=$rootfordata.'/admin/temp';
// Module user // Module user
$this->user->dir_output=$rootforuser."/users"; $this->user->dir_output=$rootforuser."/users";
$this->user->dir_temp=$rootforuser."/users/temp"; $this->user->dir_temp=$rootforuser."/users/temp";
// Exception: Some dir are not the name of module. So we keep exception here
// for backward compatibility.
// Module RSS // Module RSS
$this->externalrss->dir_output=$rootfordata."/rss"; $this->externalrss->dir_output=$rootfordata."/rss";
$this->externalrss->dir_temp=$rootfordata."/rss/temp"; $this->externalrss->dir_temp=$rootfordata."/rss/temp";
@@ -214,9 +222,6 @@ class Conf
$this->livraison_bon->dir_output=$rootfordata."/expedition/receipt"; $this->livraison_bon->dir_output=$rootfordata."/expedition/receipt";
$this->livraison_bon->dir_temp =$rootfordata."/expedition/receipt/temp"; $this->livraison_bon->dir_temp =$rootfordata."/expedition/receipt/temp";
// Module societe
if (defined('SOCIETE_OUTPUTDIR') && SOCIETE_OUTPUTDIR) { $this->societe->dir_output=SOCIETE_OUTPUTDIR; } # Pour passer outre le rep par defaut
// Module don // Module don
$this->don->dir_output=$rootfordata."/dons"; $this->don->dir_output=$rootfordata."/dons";
$this->don->dir_temp =$rootfordata."/dons/temp"; $this->don->dir_temp =$rootfordata."/dons/temp";
@@ -261,9 +266,6 @@ class Conf
// Module oscommerce 1 // Module oscommerce 1
$this->boutique->livre->enabled=defined("BOUTIQUE_LIVRE")?BOUTIQUE_LIVRE:0; $this->boutique->livre->enabled=defined("BOUTIQUE_LIVRE")?BOUTIQUE_LIVRE:0;
$this->boutique->album->enabled=defined("BOUTIQUE_ALBUM")?BOUTIQUE_ALBUM:0; $this->boutique->album->enabled=defined("BOUTIQUE_ALBUM")?BOUTIQUE_ALBUM:0;
// Other
$this->admin->dir_output=$rootfordata.'/admin';
$this->admin->dir_temp=$rootfordata.'/admin/temp';
/* /*
* Modification de quelques variable de conf en fonction des Constantes * Modification de quelques variable de conf en fonction des Constantes

View File

@@ -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_output.'/logos/thumbs/'.$mysoc->logo_small)) if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
print '<img title="'.$title.'" src="'.$urllogo.'">'; print '<img title="'.$title.'" src="'.$urllogo.'">';

View File

@@ -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_output.'/logos/thumbs/'.$mysoc->logo_small)) if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
print '<img title="'.$title.'" src="'.$urllogo.'">'; print '<img title="'.$title.'" src="'.$urllogo.'">';

View File

@@ -377,7 +377,7 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetXY($this->marge_gauche,$posy); $pdf->SetXY($this->marge_gauche,$posy);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo) if ($this->emetteur->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -733,7 +733,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY($this->marge_gauche,$posy); $pdf->SetXY($this->marge_gauche,$posy);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo) if ($this->emetteur->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -351,7 +351,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
//*********************LOGO**************************** //*********************LOGO****************************
$pdf->SetXY(11,7); $pdf->SetXY(11,7);
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo) if ($this->emetteur->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -107,7 +107,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$pdf->SetXY($this->marge_gauche,$posy); $pdf->SetXY($this->marge_gauche,$posy);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo) if ($this->emetteur->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -913,7 +913,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($this->marge_gauche,$posy); $pdf->SetXY($this->marge_gauche,$posy);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo) if ($this->emetteur->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -812,7 +812,7 @@ class pdf_oursin extends ModelePDFFactures
$pdf->SetXY($this->marges['g'],6); $pdf->SetXY($this->marges['g'],6);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$this->emetteur->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo) if ($this->emetteur->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -174,7 +174,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetXY($this->marge_gauche,$posy); $pdf->SetXY($this->marge_gauche,$posy);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$mysoc->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
if ($mysoc->logo) if ($mysoc->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -455,7 +455,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetXY($this->marge_gauche,$posy); $pdf->SetXY($this->marge_gauche,$posy);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$mysoc->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
if ($mysoc->logo) if ($mysoc->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -68,7 +68,7 @@ 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
$this->dirs = array("/societe/temp","/societe/logos"); $this->dirs = array("/societe/temp");
// Dependances // Dependances
$this->depends = array(); $this->depends = array();

View File

@@ -786,7 +786,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_output.'/logos/'.$this->emetteur->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo) if ($this->emetteur->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -594,7 +594,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetXY($this->marge_gauche,$posy); $pdf->SetXY($this->marge_gauche,$posy);
// Logo // Logo
$logo=$conf->societe->dir_output.'/logos/'.$mysoc->logo; $logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
if ($mysoc->logo) if ($mysoc->logo)
{ {
if (is_readable($logo)) if (is_readable($logo))

View File

@@ -40,7 +40,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height)
// Add a background image on document // Add a background image on document
if (! empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) if (! empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF))
{ {
$pdf->Image($conf->societe->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, 0, 0, 0, $page_height); $pdf->Image($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, 0, 0, 0, $page_height);
} }
} }

View File

@@ -160,11 +160,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_output.'/logos/thumbs/'.$mysoc->logo_small)) if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
} }
elseif (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_output.'/logos/'.$mysoc->logo)) elseif (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($mysoc->logo); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
$width=96; $width=96;

View File

@@ -157,11 +157,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_output.'/logos/thumbs/'.$logosmall)) if (! empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$logosmall); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$logosmall);
} }
elseif (! empty($logo) && is_readable($conf->societe->dir_output.'/logos/'.$logo)) elseif (! empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($logo); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($logo);
$width=96; $width=96;

View File

@@ -231,11 +231,11 @@ $title='';
// 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 (isset($mysoc->logo_small) && is_readable($conf->societe->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) if (isset($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small);
} }
elseif (isset($mysoc->logo) && is_readable($conf->societe->dir_output.'/logos/'.$mysoc->logo)) elseif (isset($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
{ {
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($mysoc->logo); $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
$width=96; $width=96;

View File

@@ -74,7 +74,7 @@ if ($modulepart)
if ($modulepart == 'companylogo') if ($modulepart == 'companylogo')
{ {
$accessallowed=1; $accessallowed=1;
$original_file=$conf->societe->dir_output.'/logos/'.$original_file; $original_file=$conf->mycompany->dir_output.'/logos/'.$original_file;
} }
// Wrapping pour les photos utilisateurs // Wrapping pour les photos utilisateurs