mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=7611
This commit is contained in:
parent
2acfa60174
commit
f3195407d9
|
@ -11185,6 +11185,7 @@ David 30 Aug 2005
|
|||
- include pubDate in RSS feed
|
||||
- change getallheaders() to apache_request_headers()
|
||||
(the former apparently not defined in PHP5)
|
||||
- if apache_request_headers() is not defined, disable caching
|
||||
|
||||
html/
|
||||
inc/
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
require_once("../project/cache_parameters.inc");
|
||||
|
||||
#ifdef apache_request_headers
|
||||
$no_cache = false;
|
||||
#else
|
||||
$no_cache = true;
|
||||
#endif
|
||||
|
||||
// mechanism for caching commonly-accessed pages
|
||||
|
||||
function make_cache_dirs() {
|
||||
|
@ -139,6 +145,8 @@ function get_cached_data($max_age,$params=""){
|
|||
}
|
||||
|
||||
function start_cache($max_age, $params=""){
|
||||
if ($no_cache) return;
|
||||
|
||||
$path = get_path($params);
|
||||
|
||||
cache_check_diskspace(); //Check free disk space once in a while
|
||||
|
@ -179,6 +187,8 @@ function start_cache($max_age, $params=""){
|
|||
// write output buffer both to client and to cache
|
||||
//
|
||||
function end_cache($max_age,$params=""){
|
||||
if ($no_cache) return;
|
||||
|
||||
// for the benefit of hackers
|
||||
if (strstr($params, "..")) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue