~mikel-martin/opencart/vr

« back to all changes in this revision

Viewing changes to upload/system/library/cache.php

  • Committer: qphoria
  • Date: 2010-12-19 19:41:10 UTC
  • Revision ID: svn-v4:a472ed72-f7c0-11dd-9d1a-b59b2e1864b6:trunk:139
Last min changes before 1.4.9.3 final

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
                        if ($time < time()) {
13
13
                                        if (file_exists($file)) {
14
 
                                                unlink($file);
 
14
                                                @unlink($file);
15
15
                                        }
16
16
                        }
17
17
                }
23
23
                
24
24
                if ($files) {
25
25
                foreach ($files as $file) {
26
 
                        $handle = fopen($file, 'r');
27
 
                        $cache = fread($handle, filesize($file));
 
26
                        $cache = '';
 
27
                                
 
28
                                $handle = fopen($file, 'r');
 
29
                        
 
30
                                if ($handle) {
 
31
                                        $cache = fread($handle, filesize($file));
28
32
          
29
 
                        fclose($handle);
 
33
                                        fclose($handle);
 
34
                                }
30
35
 
31
36
                        return unserialize($cache);
32
37
                        }
51
56
                if ($files) {
52
57
                foreach ($files as $file) {
53
58
                        if (file_exists($file)) {
54
 
                                        unlink($file);
 
59
                                        @unlink($file);
55
60
                                        clearstatcache();
56
61
                                }
57
62
                }