Fix pb with cache
This commit is contained in:
parent
388500794b
commit
49853adf82
@ -55,6 +55,18 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
|
||||||
|
if (empty($dolibarr_nocache) && GETPOST('cache', 'int')) {
|
||||||
|
header('Cache-Control: max-age='.GETPOST('cache', 'int').', public');
|
||||||
|
// For a .php, we must set an Expires to avoid to have it forced to an expired value by the web server
|
||||||
|
header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOST('cache', 'int')).' GMT');
|
||||||
|
// HTTP/1.0
|
||||||
|
header('Pragma: token=public');
|
||||||
|
} else {
|
||||||
|
// HTTP/1.0
|
||||||
|
header('Cache-Control: no-cache');
|
||||||
|
}
|
||||||
|
|
||||||
$title = $langs->trans("Bookmarks");
|
$title = $langs->trans("Bookmarks");
|
||||||
|
|
||||||
// URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests
|
// URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests
|
||||||
|
|||||||
@ -81,6 +81,18 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
|
||||||
|
if (empty($dolibarr_nocache) && GETPOST('cache', 'int')) {
|
||||||
|
header('Cache-Control: max-age='.GETPOST('cache', 'int').', public, must-revalidate');
|
||||||
|
// For a .php, we must set an Expires to avoid to have it forced to an expired value by the web server
|
||||||
|
header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOST('cache', 'int')).' GMT');
|
||||||
|
// HTTP/1.0
|
||||||
|
header('Pragma: token=public');
|
||||||
|
} else {
|
||||||
|
// HTTP/1.0
|
||||||
|
header('Cache-Control: no-cache');
|
||||||
|
}
|
||||||
|
|
||||||
$title = $langs->trans("Menu");
|
$title = $langs->trans("Menu");
|
||||||
|
|
||||||
// URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
|
// URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
|
||||||
|
|||||||
@ -85,13 +85,9 @@ class modHRM extends DolibarrModules
|
|||||||
// Set this to 1 if module has its own theme directory (theme)
|
// Set this to 1 if module has its own theme directory (theme)
|
||||||
'theme' => 0,
|
'theme' => 0,
|
||||||
// Set this to relative path of css file if module has its own css file
|
// Set this to relative path of css file if module has its own css file
|
||||||
'css' => array(
|
'css' => array(),
|
||||||
'/hrm/css/radio_js_number.css',
|
|
||||||
),
|
|
||||||
// Set this to relative path of js file if module must load a js on all pages
|
// Set this to relative path of js file if module must load a js on all pages
|
||||||
'js' => array(
|
'js' => array(),
|
||||||
// '/hrm/js/hrm.js.php',
|
|
||||||
),
|
|
||||||
|
|
||||||
// Set this to 1 if features of module are opened to external users
|
// Set this to 1 if features of module are opened to external users
|
||||||
'moduleforexternal' => 0,
|
'moduleforexternal' => 0,
|
||||||
|
|||||||
@ -55,6 +55,18 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
|
||||||
|
if (empty($dolibarr_nocache) && GETPOST('cache', 'int')) {
|
||||||
|
header('Cache-Control: max-age='.GETPOST('cache', 'int').', public');
|
||||||
|
// For a .php, we must set an Expires to avoid to have it forced to an expired value by the web server
|
||||||
|
header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOST('cache', 'int')).' GMT');
|
||||||
|
// HTTP/1.0
|
||||||
|
header('Pragma: token=public');
|
||||||
|
} else {
|
||||||
|
// HTTP/1.0
|
||||||
|
header('Cache-Control: no-cache');
|
||||||
|
}
|
||||||
|
|
||||||
$title = $langs->trans("Search");
|
$title = $langs->trans("Search");
|
||||||
|
|
||||||
// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
|
// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
.radio_js_bloc_number {
|
|
||||||
display:inline-block;
|
|
||||||
padding:5px 7px;
|
|
||||||
min-width:20px;
|
|
||||||
border-radius:3px;
|
|
||||||
border:1px solid #ccc;
|
|
||||||
background:#eee;
|
|
||||||
color:#555;
|
|
||||||
cursor:pointer;
|
|
||||||
margin:2px;
|
|
||||||
text-align:center;
|
|
||||||
}
|
|
||||||
.radio_js_bloc_number.selected {
|
|
||||||
transition:0.2s ease background;
|
|
||||||
background:#888;
|
|
||||||
color:#fff;
|
|
||||||
border-color:#555;
|
|
||||||
}
|
|
||||||
@ -6967,6 +6967,29 @@ div.clipboardCPValue.hidewithsize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* CSS style used for hrm skill/rank (may be we can remove this) */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
.radio_js_bloc_number {
|
||||||
|
display:inline-block;
|
||||||
|
padding:5px 7px;
|
||||||
|
min-width:20px;
|
||||||
|
border-radius:3px;
|
||||||
|
border:1px solid #ccc;
|
||||||
|
background:#eee;
|
||||||
|
color:#555;
|
||||||
|
cursor:pointer;
|
||||||
|
margin:2px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
.radio_js_bloc_number.selected {
|
||||||
|
transition:0.2s ease background;
|
||||||
|
background:#888;
|
||||||
|
color:#fff;
|
||||||
|
border-color:#555;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* CSS style used for small screen */
|
/* CSS style used for small screen */
|
||||||
|
|||||||
@ -6854,6 +6854,29 @@ div.clipboardCPValue.hidewithsize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* CSS style used for hrm skill/rank (may be we can remove this) */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
.radio_js_bloc_number {
|
||||||
|
display:inline-block;
|
||||||
|
padding:5px 7px;
|
||||||
|
min-width:20px;
|
||||||
|
border-radius:3px;
|
||||||
|
border:1px solid #ccc;
|
||||||
|
background:#eee;
|
||||||
|
color:#555;
|
||||||
|
cursor:pointer;
|
||||||
|
margin:2px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
.radio_js_bloc_number.selected {
|
||||||
|
transition:0.2s ease background;
|
||||||
|
background:#888;
|
||||||
|
color:#fff;
|
||||||
|
border-color:#555;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* CSS style used for small screen */
|
/* CSS style used for small screen */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user