@@ 87-91 (lines=5) @@ | ||
84 | { |
|
85 | $result = new Result($this->label); |
|
86 | ||
87 | if (!file_exists($this->filename)) { |
|
88 | $result->setSuccess(false); |
|
89 | $result->setError($this->filename." does not exist!"); |
|
90 | return $result; |
|
91 | } |
|
92 | ||
93 | if (null !== $this->maxage) { |
|
94 | $mtime = filemtime($this->filename); |
|
@@ 102-106 (lines=5) @@ | ||
99 | } |
|
100 | $age = (time()-$mtime); |
|
101 | $age = round($age/60); // sec-to-min |
|
102 | if ($age > (int)$this->maxage) { |
|
103 | $result->setSuccess(false); |
|
104 | $result->setError($this->filename." is to old!"); |
|
105 | return $result; |
|
106 | } |
|
107 | } |
|
108 | ||
109 | if (null !== $this->writable && !is_writable($this->filename)) { |
@@ 27-31 (lines=5) @@ | ||
24 | { |
|
25 | $result = new Result($this->label); |
|
26 | ||
27 | if (!file_exists($this->filename)) { |
|
28 | $result->setSuccess(false); |
|
29 | $result->setError("Log file $this->filename does not exist!"); |
|
30 | return $result; |
|
31 | } |
|
32 | ||
33 | if (!empty($this->content)) { |
|
34 | $fileContent = file_get_contents($this->filename); |