diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 9e533aa8d85..799d40a1904 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -37,6 +37,15 @@ $langs->load("companies"); if (!$user->admin) accessforbidden(); +// Define size of logo small and mini +$maxwidthsmall=270;$maxheightsmall=150; +$maxwidthmini=128;$maxheightmini=72; +$quality = 80; + + +/* + * Actions + */ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) @@ -71,12 +80,12 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') { dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file,'chaine',0,'',$conf->entity); - // Create thumbs of logo + // Create thumbs of logo (Note that PDF use original file and not thumbs) if ($isimage > 0) { - $quality = 80; - - $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, 200, 100, '_small', $quality); + // Create small thumbs for company (Ratio is near 16/9) + // Used on logon for example + $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality); if (preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg)) { $imgThumbSmall = $reg[1]; @@ -84,8 +93,9 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') } else dol_syslog($imgThumbSmall); - // Creation de la vignette de la page "Societe/Institution" - $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, 100, 30, '_mini', $quality); + // Create mini thumbs for company (Ratio is near 16/9) + // Used on menu or for setup page for example + $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality); if (preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg)) { $imgThumbMini = $reg[1]; @@ -135,8 +145,9 @@ if ($_GET["action"] == 'addthumb') // Create thumbs of logo if ($isimage > 0) { - // Creation de la vignette de la page login - $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], 200, 100, '_small',80); + // Create small thumbs for company (Ratio is near 16/9) + // Used on logon for example + $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small',$quality); if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg)) { $imgThumbSmall = $reg[1]; @@ -144,8 +155,9 @@ if ($_GET["action"] == 'addthumb') } else dol_syslog($imgThumbSmall); - // Creation de la vignette de la page "Societe/Institution" - $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], 100, 30, '_mini',80); + // Create mini thumbs for company (Ratio is near 16/9) + // Used on menu or for setup page for example + $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthmini, $maxheightmini, '_mini',$quality); if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg)) { $imgThumbMini = $reg[1]; diff --git a/htdocs/core/conf.class.php b/htdocs/core/conf.class.php index 49a8ed4bc4a..749c49a1134 100644 --- a/htdocs/core/conf.class.php +++ b/htdocs/core/conf.class.php @@ -334,7 +334,7 @@ class Conf // $this->theme et $this->css if (empty($this->global->MAIN_THEME)) $this->global->MAIN_THEME="eldy"; $this->theme=$this->global->MAIN_THEME; - $this->css = "theme/".$this->theme."/".$this->theme.".css"; + $this->css = "/theme/".$this->theme."/".$this->theme.".css"; // $this->email_from = email pour envoi par dolibarr des mails automatiques $this->email_from = "dolibarr-robot@domain.com"; diff --git a/htdocs/core/templates/login.tpl.php b/htdocs/core/templates/login.tpl.php index b9c41bc4d55..0a55eb5f25a 100644 --- a/htdocs/core/templates/login.tpl.php +++ b/htdocs/core/templates/login.tpl.php @@ -33,7 +33,7 @@ header("Content-type: text/html; charset=".$conf->file->character_set_client);
';
- print $_SESSION["dol_loginmesg"];
- $_SESSION["dol_loginmesg"]="";
- print ' |
| '; - $i=0; - while (preg_match('/__\(([a-zA-Z]+)\)__/i',$conf->global->MAIN_HOME,$reg) && $i < 100) - { - $conf->global->MAIN_HOME=preg_replace('/__\('.$reg[1].'\)__/i',$langs->trans($reg[1]),$conf->global->MAIN_HOME); - $i++; - } - print nl2br($conf->global->MAIN_HOME); - print ' |