Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
1a365a69
Commit
1a365a69
authored
14 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Wrapper for images support a parameter cache=1 to increase speed for some pages.
parent
fba4111f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/viewimage.php
+16
-2
16 additions, 2 deletions
htdocs/viewimage.php
with
16 additions
and
2 deletions
htdocs/viewimage.php
+
16
−
2
View file @
1a365a69
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-201
0
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-201
1
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -52,6 +52,20 @@ function llxHeader() { }
require
(
"./main.inc.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
'/lib/files.lib.php'
);
if
(
GETPOST
(
"cache"
))
{
// Important: Following code is to avoid page request by browser and PHP CPU at
// each Dolibarr page access.
if
(
empty
(
$dolibarr_nocache
))
{
header
(
'Cache-Control: max-age=3600, public, must-revalidate'
);
header
(
'Pragma: cache'
);
// This is to avoid having Pragma: no-cache
}
else
header
(
'Cache-Control: no-cache'
);
//print $dolibarr_nocache; exit;
}
// Define mime type
$type
=
'application/octet-stream'
;
if
(
!
empty
(
$_GET
[
"type"
]))
$type
=
$_GET
[
"type"
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment