Wrapper for images support a parameter cache=1 to increase speed for some pages.

This commit is contained in:
Laurent Destailleur 2011-04-09 17:15:18 +00:00
parent 8850343ff6
commit c331ccfff8
6 changed files with 23 additions and 23 deletions

View File

@ -197,7 +197,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after)
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini);
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_mini);
print "\n".'<!-- Show logo on menu -->'."\n";
print '<div class="blockvmenuimpair">'."\n";
print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n";

View File

@ -589,7 +589,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
{
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini);
$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_mini);
print "\n".'<!-- Show logo on menu -->'."\n";
print '<div class="blockvmenuimpair">'."\n";
print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n";

View File

@ -190,11 +190,11 @@ function dol_loginfunction($langs,$conf,$mysoc)
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?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
}
elseif (! empty($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?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
$width=128;
}
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))

View File

@ -101,9 +101,9 @@ FCKConfig.ToolbarLocation = 'In' ;
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','BGColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor','Image','Table','Rule','SpecialChar'],
@ -112,9 +112,9 @@ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
FCKConfig.ToolbarSets["dolibarr_notes"] = [
['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','BGColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Image','Table','Rule','SpecialChar'],
@ -123,13 +123,13 @@ FCKConfig.ToolbarSets["dolibarr_notes"] = [
FCKConfig.ToolbarSets["dolibarr_details"] = [
['FitWindow','Source'],
['Cut','Copy','Paste','-','Preview'],
['Cut','Copy','Paste'],
['Undo','Redo'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['SpecialChar'],
['FontName','FontSize']
['FontSize']
] ;
FCKConfig.ToolbarSets["Default"] = [

View File

@ -101,9 +101,9 @@ FCKConfig.ToolbarLocation = 'In' ;
/* Ne pas mettre le lien sur objets internes (Image,Smiley) sur le type mailing */
FCKConfig.ToolbarSets["dolibarr_mailings"] = [
['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor','Image','Table','Rule','SpecialChar'],
@ -112,9 +112,9 @@ FCKConfig.ToolbarSets["dolibarr_mailings"] = [
FCKConfig.ToolbarSets["dolibarr_notes"] = [
['FitWindow','Source'],
['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'],
['Cut','Copy','Paste','-','SpellCheck'],
['Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Image','Table','Rule','SpecialChar'],
@ -123,13 +123,13 @@ FCKConfig.ToolbarSets["dolibarr_notes"] = [
FCKConfig.ToolbarSets["dolibarr_details"] = [
['FitWindow','Source'],
['Cut','Copy','Paste','-','Preview'],
['Cut','Copy','Paste'],
['Undo','Redo'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','TextColor','RemoveFormat'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['SpecialChar'],
['FontName','FontSize']
['FontSize']
] ;
FCKConfig.ToolbarSets["Default"] = [

View File

@ -194,11 +194,11 @@ $urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
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?cache=1&amp;modulepart=companylogo&amp;file='.urlencode('thumbs/'.$mysoc->logo_small);
}
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?cache=1&amp;modulepart=companylogo&amp;file='.urlencode($mysoc->logo);
$width=128;
}
elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))
@ -213,7 +213,7 @@ if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY) && ! $disabled)
$rowspan++;
$lastuser='';
$lastentity = GETPOST('entity');
if (! empty($conf->global->MAIN_MULTICOMPANY_COOKIE))
{
$prefix=dol_getprefix();
@ -221,9 +221,9 @@ if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY) && ! $disabled)
if (isset($_COOKIE[$entityCookieName]))
{
include_once(DOL_DOCUMENT_ROOT . "/core/class/cookie.class.php");
$cryptkey = (! empty($conf->file->cookie_cryptkey) ? $conf->file->cookie_cryptkey : '' );
$entityCookie = new DolCookie($cryptkey);
$cookieValue = $entityCookie->_getCookie($entityCookieName);
list($lastuser, $lastentity) = explode('|', $cookieValue);