bc0feaaddfd3b61825319cd174ef3b1690d13ada
[atutor.git] / mods / wiki / plugins / lib / fakezlib.php
1 <?php
2 /*
3    You need to load this, if you want to use db/fast_files with very
4    old PHP versions, such without zlib extension.
5 */
6
7
8  #-- fake zlib
9  if (!function_exists("gzopen")) {
10
11     function gzopen($fp, $mode) {
12        $mode = preg_replace('/[^carwb+]/', '', $mode);
13        return(fopen($fp, $mode));
14     }
15
16     function gzread($fp, $len) {
17        return(fread($fp, $len));
18     }
19
20     function gzwrite($fp, $string) {
21        return(fwrite($fp, $string));
22     }
23
24     function gzseek($fp, $arg2) {
25        return(fseek($fp, $arg2));
26     }
27
28     function gzclose($fp) {
29        return(fclose($fp));
30     }
31
32  }
33
34
35 ?>