@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | echo " |
53 | 53 | <span style=\"width:".$size."px;height:".$size."px;position:absolute;top:".$cy.";left:".$cx.";color:white;border-style:solid;border-width:1px\"> |
54 | 54 | "; |
55 | - $c = $f->comment?"($f->comment)":""; |
|
55 | + $c = $f->comment ? "($f->comment)" : ""; |
|
56 | 56 | echo " |
57 | 57 | <span class=link> |
58 | 58 | <a href=\"javascript: void(0)\"> |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $features = $opaque_data->features; |
99 | 99 | $x = ""; |
100 | 100 | foreach ($features as $f) { |
101 | - $c = $f->comment?"($f->comment)":""; |
|
101 | + $c = $f->comment ? "($f->comment)" : ""; |
|
102 | 102 | $x .= "$f->type $c <br>"; |
103 | 103 | } |
104 | 104 | return $x; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | header("Expires: Thu, 01 Jan 1970 00:00:00 GMT"); |
24 | 24 | |
25 | 25 | echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>" |
26 | - . "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" " |
|
27 | - . "\"http://www.wapforum.org/DTD/wml_1.2.xml\">" |
|
28 | - . "<wml><card id=\"cd1\"><p>"; |
|
26 | + . "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" " |
|
27 | + . "\"http://www.wapforum.org/DTD/wml_1.2.xml\">" |
|
28 | + . "<wml><card id=\"cd1\"><p>"; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | function wap_end() { |
@@ -33,6 +33,6 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | function wap_timestamp() { |
36 | - return gmdate('j M Y G:i:s', time()) . " UTC"; |
|
36 | + return gmdate('j M Y G:i:s', time()) . " UTC"; |
|
37 | 37 | } |
38 | 38 | ?> |
@@ -33,6 +33,6 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | function wap_timestamp() { |
36 | - return gmdate('j M Y G:i:s', time()) . " UTC"; |
|
36 | + return gmdate('j M Y G:i:s', time())." UTC"; |
|
37 | 37 | } |
38 | 38 | ?> |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | $gd_info = gd_info(); |
24 | 24 | // libgd version numbers seem to be always three numbers |
25 | 25 | preg_match('/(\d).(\d).(\d)/', $gd_info['GD Version'], $match); |
26 | - $newGD = ($match[1]>=2); |
|
26 | + $newGD = ($match[1] >= 2); |
|
27 | 27 | |
28 | 28 | list($ow, $oh, $from_type) = getimagesize($sourcefile); |
29 | - switch($from_type) { |
|
29 | + switch ($from_type) { |
|
30 | 30 | case 1: // GIF |
31 | 31 | $srcImage = imageCreateFromGif($sourcefile); |
32 | 32 | break; |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | $tempw = $fw; |
42 | 42 | $temph = number_format((($oh*$fw)/$ow), 0); |
43 | 43 | |
44 | - if($temph < $fh) { |
|
44 | + if ($temph < $fh) { |
|
45 | 45 | $tempw = number_format((($ow*$fh)/$oh), 0); |
46 | 46 | $temph = $fh; |
47 | 47 | } |
48 | 48 | |
49 | - if ($newGD){ |
|
49 | + if ($newGD) { |
|
50 | 50 | $tempImage = imageCreateTrueColor($tempw, $temph); |
51 | 51 | // Seems not to work: |
52 | 52 | // imageAntiAlias($tempImage, true); |
@@ -58,15 +58,15 @@ discard block |
||
58 | 58 | |
59 | 59 | |
60 | 60 | // Calculate offsets |
61 | - if($temph < $fh) { |
|
62 | - $offsety = number_format(($temph/2)-($fh/2), 0); |
|
61 | + if ($temph < $fh) { |
|
62 | + $offsety = number_format(($temph/2) - ($fh/2), 0); |
|
63 | 63 | $offsetx = 0; |
64 | 64 | } else { |
65 | 65 | $offsety = 0; |
66 | - $offsetx = number_format(($tempw/2)-($fw/2), 0); |
|
66 | + $offsetx = number_format(($tempw/2) - ($fw/2), 0); |
|
67 | 67 | } |
68 | 68 | |
69 | - if ($newGD){ |
|
69 | + if ($newGD) { |
|
70 | 70 | $destImage = imageCreateTrueColor($fw, $fh); |
71 | 71 | // Seems not to work: |
72 | 72 | // imageAntiAlias($tempImage, true); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $temph = $fh; |
47 | 47 | } |
48 | 48 | |
49 | - if ($newGD){ |
|
49 | + if ($newGD) { |
|
50 | 50 | $tempImage = imageCreateTrueColor($tempw, $temph); |
51 | 51 | // Seems not to work: |
52 | 52 | // imageAntiAlias($tempImage, true); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $offsetx = number_format(($tempw/2)-($fw/2), 0); |
67 | 67 | } |
68 | 68 | |
69 | - if ($newGD){ |
|
69 | + if ($newGD) { |
|
70 | 70 | $destImage = imageCreateTrueColor($fw, $fh); |
71 | 71 | // Seems not to work: |
72 | 72 | // imageAntiAlias($tempImage, true); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | function select_cmp($a, $b) { |
20 | 20 | if ($a->value == $b->value) return 0; |
21 | - return ($a->value < $b->value)?1:-1; |
|
21 | + return ($a->value < $b->value) ? 1 : -1; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | class BoltSelect extends BoltSet { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | function team_type_name($num) { |
39 | 39 | global $team_types; |
40 | - if ($num>0 && $num<count($team_types)) { |
|
40 | + if ($num > 0 && $num < count($team_types)) { |
|
41 | 41 | return $team_types[$num]; |
42 | 42 | } |
43 | 43 | return "None"; |
@@ -53,13 +53,13 @@ discard block |
||
53 | 53 | |
54 | 54 | function team_type_num($name) { |
55 | 55 | global $team_types; |
56 | - for ($i=0; $i<sizeof($team_types); $i++) { |
|
56 | + for ($i = 0; $i < sizeof($team_types); $i++) { |
|
57 | 57 | if ($name == $team_types[$i]) return $i; |
58 | 58 | } |
59 | 59 | return 0; |
60 | 60 | } |
61 | 61 | |
62 | -function team_type_select($selected_type, $allow_none=false){ |
|
62 | +function team_type_select($selected_type, $allow_none = false) { |
|
63 | 63 | global $team_types; |
64 | 64 | |
65 | 65 | $types = $team_types; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | return 0; |
60 | 60 | } |
61 | 61 | |
62 | -function team_type_select($selected_type, $allow_none=false){ |
|
62 | +function team_type_select($selected_type, $allow_none=false) { |
|
63 | 63 | global $team_types; |
64 | 64 | |
65 | 65 | $types = $team_types; |
@@ -74,9 +74,9 @@ |
||
74 | 74 | foreach ($insts as $inst) { |
75 | 75 | $results[] = $inst->get_opaque_data(); |
76 | 76 | } |
77 | - for ($i=0; $i<$n-1; $i++) { |
|
77 | + for ($i = 0; $i < $n - 1; $i++) { |
|
78 | 78 | $r1 = $results[$i]; |
79 | - for ($j=$i+1; $j<$n; $j++) { |
|
79 | + for ($j = $i + 1; $j < $n; $j++) { |
|
80 | 80 | $r2 = $results[$j]; |
81 | 81 | if (compatible($r1, $r2)) { |
82 | 82 | $job->set_state(BOSSA_JOB_DONE); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | // see if there's a negative consensus |
123 | 123 | // |
124 | 124 | $prob = 1; |
125 | - for ($i=0; $i<$n; $i++) { |
|
125 | + for ($i = 0; $i < $n; $i++) { |
|
126 | 126 | $r = $results[$i]; |
127 | 127 | if ($r1->have_ellipse) continue; |
128 | 128 | $u = $users[$i]; |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | |
136 | 136 | // see if there's a positive consensus |
137 | 137 | // |
138 | - for ($i=0; $i<$n; $i++) { |
|
138 | + for ($i = 0; $i < $n; $i++) { |
|
139 | 139 | $r1 = $results[$i]; |
140 | 140 | $u = $users[$i]; |
141 | 141 | $prob = $u->pos_error_rate; |
142 | - for ($j=0; $j<$n; $j++) { |
|
142 | + for ($j = 0; $j < $n; $j++) { |
|
143 | 143 | if ($j == $i) continue; |
144 | 144 | $r2 = $results[$j]; |
145 | 145 | if (compatible($r1, $r2)) { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | function init_conn($user, $passwd, $host, $name, $readonly) { |
30 | 30 | if (MYSQLI) { |
31 | 31 | $x = explode(":", $host); |
32 | - if (sizeof($x)>1) { |
|
32 | + if (sizeof($x) > 1) { |
|
33 | 33 | $host = $x[0]; |
34 | 34 | $port = $x[1]; |
35 | 35 | } else { |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | $where_clause = "where $where_clause"; |
144 | 144 | } |
145 | 145 | $query = "select $fields from DBNAME.$table $where_clause $order_clause"; |
146 | - return $this->enum_general($classname,$query); |
|
146 | + return $this->enum_general($classname, $query); |
|
147 | 147 | } |
148 | 148 | |
149 | - function enum($table, $classname, $where_clause=null, $order_clause=null) { |
|
149 | + function enum($table, $classname, $where_clause = null, $order_clause = null) { |
|
150 | 150 | return self::enum_fields( |
151 | 151 | $table, $classname, '*', $where_clause, $order_clause |
152 | 152 | ); |
@@ -205,15 +205,15 @@ discard block |
||
205 | 205 | if ($x) return (double)$x->$field; |
206 | 206 | return false; |
207 | 207 | } |
208 | - function count($table, $clause="TRUE") { |
|
208 | + function count($table, $clause = "TRUE") { |
|
209 | 209 | $query = "select count(*) as total from DBNAME.$table where $clause"; |
210 | 210 | return $this->get_int($query, 'total'); |
211 | 211 | } |
212 | - function sum($table, $field, $clause="") { |
|
212 | + function sum($table, $field, $clause = "") { |
|
213 | 213 | $query = "select sum($field) as total from DBNAME.$table $clause"; |
214 | 214 | return $this->get_double($query, 'total'); |
215 | 215 | } |
216 | - function max($table, $field, $clause="") { |
|
216 | + function max($table, $field, $clause = "") { |
|
217 | 217 | $query = "select max($field) as total from DBNAME.$table $clause"; |
218 | 218 | return $this->get_double($query, 'total'); |
219 | 219 | } |
@@ -36,7 +36,8 @@ |
||
36 | 36 | $port = null; |
37 | 37 | } |
38 | 38 | //if (version_compare(PHP_VERSION, '5.3.0') < 0) { |
39 | - if (1) { // don't use persistent connections for now |
|
39 | + if (1) { |
|
40 | +// don't use persistent connections for now |
|
40 | 41 | $this->db_conn = @new mysqli($host, $user, $passwd, $name, $port); |
41 | 42 | } else { |
42 | 43 | $this->db_conn = @new mysqli("p:".$host, $user, $passwd, $name, $port); |
@@ -99,7 +99,7 @@ |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | } |
102 | - @closedir($handle); |
|
102 | + @closedir($handle); |
|
103 | 103 | } |
104 | 104 | chdir($start_dir); |
105 | 105 | } |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | mkdir("../cache", 0770); |
33 | 33 | chmod("../cache", 0770); |
34 | 34 | } |
35 | - for ($i=0;$i<256;$i++) { |
|
36 | - $j=sprintf("%02x",$i); |
|
35 | + for ($i = 0; $i < 256; $i++) { |
|
36 | + $j = sprintf("%02x", $i); |
|
37 | 37 | if (!@filemtime("../cache/$j")) { |
38 | 38 | mkdir("../cache/$j", 0770); |
39 | 39 | chmod("../cache/$j", 0770); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | -function get_path($params, $phpfile=null) { |
|
44 | +function get_path($params, $phpfile = null) { |
|
45 | 45 | if (!@filemtime("../cache/00")) make_cache_dirs(); |
46 | 46 | if ($phpfile) { |
47 | 47 | $z = $phpfile; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | // add a layer of subdirectories for reducing file lookup time |
54 | - $sz = substr(md5($z."_".urlencode($params)),1,2); |
|
54 | + $sz = substr(md5($z."_".urlencode($params)), 1, 2); |
|
55 | 55 | $path = "../cache/".$sz."/".$z; |
56 | 56 | if ($params) { |
57 | 57 | $path = $path."_".urlencode($params); |
@@ -60,14 +60,14 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | function disk_usage($dir) { |
63 | - $usage=0; |
|
64 | - if ($handle=@opendir($dir)) { |
|
65 | - while ($file=readdir($handle)) { |
|
63 | + $usage = 0; |
|
64 | + if ($handle = @opendir($dir)) { |
|
65 | + while ($file = readdir($handle)) { |
|
66 | 66 | if (($file != ".") && ($file != "..")) { |
67 | 67 | if (@is_dir($dir."/".$file)) { |
68 | - $usage+=disk_usage($dir."/".$file); |
|
68 | + $usage += disk_usage($dir."/".$file); |
|
69 | 69 | } else { |
70 | - $usage+=@filesize($dir."/".$file); |
|
70 | + $usage += @filesize($dir."/".$file); |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | } |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | if (!chdir($dir)) { |
82 | 82 | return; |
83 | 83 | } |
84 | - if ($handle=@opendir(".")) { |
|
85 | - while ($file=readdir($handle)) { |
|
84 | + if ($handle = @opendir(".")) { |
|
85 | + while ($file = readdir($handle)) { |
|
86 | 86 | if ($file == ".") continue; |
87 | 87 | if ($file == "..") continue; |
88 | 88 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if (@is_dir($file)) { |
94 | 94 | clean_cache($max_age, $file); |
95 | 95 | } else { |
96 | - if ((time()-@filemtime($file))>$max_age) { |
|
96 | + if ((time() - @filemtime($file)) > $max_age) { |
|
97 | 97 | //echo "unlinking ".getcwd()."/$file\n"; |
98 | 98 | @unlink($file); |
99 | 99 | } |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | |
108 | 108 | // check cache size every once in a while, purge if too big |
109 | 109 | // |
110 | -function cache_check_diskspace(){ |
|
111 | - if ((rand() % CACHE_SIZE_CHECK_FREQ)) return; |
|
110 | +function cache_check_diskspace() { |
|
111 | + if ((rand()%CACHE_SIZE_CHECK_FREQ)) return; |
|
112 | 112 | if (disk_usage("../cache") < MAX_CACHE_USAGE) return; |
113 | 113 | $x = max(TEAM_PAGE_TTL, USER_PAGE_TTL, USER_HOST_TTL, |
114 | 114 | USER_PROFILE_TTL, TOP_PAGES_TTL, INDEX_PAGE_TTL |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | clean_cache($x, "../cache"); |
117 | 117 | } |
118 | 118 | |
119 | -function cache_need_to_regenerate($path, $max_age){ |
|
119 | +function cache_need_to_regenerate($path, $max_age) { |
|
120 | 120 | $regenerate = false; |
121 | 121 | $request = apache_request_headers(); |
122 | 122 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | // and touch the cached copy so other processes |
129 | 129 | // don't regenerate at the same time |
130 | 130 | // |
131 | - if ($lastmodified<time()-$max_age) { |
|
131 | + if ($lastmodified < time() - $max_age) { |
|
132 | 132 | $regenerate = true; |
133 | 133 | @touch($path); |
134 | 134 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | // Returns cached data or false if nothing was found |
142 | -function get_cached_data($max_age, $params=""){ |
|
142 | +function get_cached_data($max_age, $params = "") { |
|
143 | 143 | global $no_cache; |
144 | 144 | |
145 | 145 | if ($no_cache) return; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | } else { |
157 | 157 | cache_check_diskspace(); |
158 | - $regenerate=cache_need_to_regenerate($path, $max_age); |
|
158 | + $regenerate = cache_need_to_regenerate($path, $max_age); |
|
159 | 159 | if (!$regenerate) { |
160 | 160 | return file_get_contents($path); |
161 | 161 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | // DEPRECATED |
168 | -function start_cache($max_age, $params=""){ |
|
168 | +function start_cache($max_age, $params = "") { |
|
169 | 169 | global $no_cache, $caching, $memcache; |
170 | 170 | |
171 | 171 | if ($no_cache) return; |
@@ -188,15 +188,15 @@ discard block |
||
188 | 188 | $regenerate = cache_need_to_regenerate($path, $max_age); |
189 | 189 | } |
190 | 190 | //Is the stored version too old, do we need to regenerate it? |
191 | - if ($regenerate){ |
|
191 | + if ($regenerate) { |
|
192 | 192 | // If cached version is too old (or non-existent) |
193 | 193 | // generate the page and write to cache |
194 | 194 | // |
195 | 195 | ob_start(); |
196 | 196 | ob_implicit_flush(0); |
197 | - Header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
198 | - Header("Expires: " . gmdate("D, d M Y H:i:s",time()+$max_age) . " GMT"); |
|
199 | - Header("Cache-Control: public, max-age=" . $max_age); |
|
197 | + Header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
198 | + Header("Expires: ".gmdate("D, d M Y H:i:s", time() + $max_age)." GMT"); |
|
199 | + Header("Cache-Control: public, max-age=".$max_age); |
|
200 | 200 | |
201 | 201 | // allow the calling page to see cache period |
202 | 202 | // |
@@ -208,9 +208,9 @@ discard block |
||
208 | 208 | if (strstr($params, "format=xml")) { |
209 | 209 | header('Content-type: text/xml'); |
210 | 210 | } |
211 | - Header("Last-Modified: " . gmdate("D, d M Y H:i:s",$lastmodified) . " GMT"); |
|
212 | - Header("Expires: " . gmdate("D, d M Y H:i:s",$lastmodified+$max_age) . " GMT"); |
|
213 | - Header("Cache-Control: public, max-age=" . $max_age ); |
|
211 | + Header("Last-Modified: ".gmdate("D, d M Y H:i:s", $lastmodified)." GMT"); |
|
212 | + Header("Expires: ".gmdate("D, d M Y H:i:s", $lastmodified + $max_age)." GMT"); |
|
213 | + Header("Cache-Control: public, max-age=".$max_age); |
|
214 | 214 | if ($cache && $cache->content) { |
215 | 215 | echo $cache->content; |
216 | 216 | exit; |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | // write output buffer both to client and to cache |
230 | 230 | // DEPRECATED |
231 | -function end_cache($max_age,$params=""){ |
|
231 | +function end_cache($max_age, $params = "") { |
|
232 | 232 | global $no_cache; |
233 | 233 | if ($no_cache) return; |
234 | 234 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | -function set_cached_data($max_age, $data, $params=""){ |
|
256 | +function set_cached_data($max_age, $data, $params = "") { |
|
257 | 257 | // for the benefit of hackers |
258 | 258 | if (strstr($params, "..")) { |
259 | 259 | return "bad params"; |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | self::$instance->setOption(Memcached::OPT_PREFIX_KEY, MEMCACHE_PREFIX); |
295 | 295 | } |
296 | 296 | $servers = explode('|', MEMCACHE_SERVERS); |
297 | - foreach($servers as &$server) { |
|
297 | + foreach ($servers as &$server) { |
|
298 | 298 | list($ip, $port) = explode(':', $server); |
299 | 299 | if (!$port) { $port = 11211; } |
300 | 300 | $server = array($ip, $port); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | // check cache size every once in a while, purge if too big |
109 | 109 | // |
110 | -function cache_check_diskspace(){ |
|
110 | +function cache_check_diskspace() { |
|
111 | 111 | if ((rand() % CACHE_SIZE_CHECK_FREQ)) return; |
112 | 112 | if (disk_usage("../cache") < MAX_CACHE_USAGE) return; |
113 | 113 | $x = max(TEAM_PAGE_TTL, USER_PAGE_TTL, USER_HOST_TTL, |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | clean_cache($x, "../cache"); |
117 | 117 | } |
118 | 118 | |
119 | -function cache_need_to_regenerate($path, $max_age){ |
|
119 | +function cache_need_to_regenerate($path, $max_age) { |
|
120 | 120 | $regenerate = false; |
121 | 121 | $request = apache_request_headers(); |
122 | 122 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | // Returns cached data or false if nothing was found |
142 | -function get_cached_data($max_age, $params=""){ |
|
142 | +function get_cached_data($max_age, $params="") { |
|
143 | 143 | global $no_cache; |
144 | 144 | |
145 | 145 | if ($no_cache) return; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | // DEPRECATED |
168 | -function start_cache($max_age, $params=""){ |
|
168 | +function start_cache($max_age, $params="") { |
|
169 | 169 | global $no_cache, $caching, $memcache; |
170 | 170 | |
171 | 171 | if ($no_cache) return; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $regenerate = cache_need_to_regenerate($path, $max_age); |
189 | 189 | } |
190 | 190 | //Is the stored version too old, do we need to regenerate it? |
191 | - if ($regenerate){ |
|
191 | + if ($regenerate) { |
|
192 | 192 | // If cached version is too old (or non-existent) |
193 | 193 | // generate the page and write to cache |
194 | 194 | // |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | // write output buffer both to client and to cache |
230 | 230 | // DEPRECATED |
231 | -function end_cache($max_age,$params=""){ |
|
231 | +function end_cache($max_age,$params="") { |
|
232 | 232 | global $no_cache; |
233 | 233 | if ($no_cache) return; |
234 | 234 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | -function set_cached_data($max_age, $data, $params=""){ |
|
256 | +function set_cached_data($max_age, $data, $params="") { |
|
257 | 257 | // for the benefit of hackers |
258 | 258 | if (strstr($params, "..")) { |
259 | 259 | return "bad params"; |