mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
f510130797
commit
6973b04211
@ -184,7 +184,8 @@ class Reader implements DatasourceInterface
|
|||||||
$PHP_EOL_len = strlen(PHP_EOL);
|
$PHP_EOL_len = strlen(PHP_EOL);
|
||||||
$lines = array();
|
$lines = array();
|
||||||
$s = '';
|
$s = '';
|
||||||
$f = fopen($this->filename, 'rb');
|
$f = @fopen($this->filename, 'rb');
|
||||||
|
if ($f !== false) {
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
fseek($f, 0, SEEK_END);
|
fseek($f, 0, SEEK_END);
|
||||||
if (ftell($f) === 0) {
|
if (ftell($f) === 0) {
|
||||||
@ -212,6 +213,7 @@ class Reader implements DatasourceInterface
|
|||||||
$s = '';
|
$s = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $lines;
|
return $lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +254,8 @@ class Reader implements DatasourceInterface
|
|||||||
$PHP_EOL_len = strlen(PHP_EOL);
|
$PHP_EOL_len = strlen(PHP_EOL);
|
||||||
$lines = array();
|
$lines = array();
|
||||||
$s = '';
|
$s = '';
|
||||||
$f = fopen($this->filename, 'rb');
|
$f = @fopen($this->filename, 'rb');
|
||||||
|
if ($f !== false) {
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
while ($read_lines === null || count($lines) < $read_lines) {
|
while ($read_lines === null || count($lines) < $read_lines) {
|
||||||
if (strlen($buffer) === 0) {
|
if (strlen($buffer) === 0) {
|
||||||
@ -279,6 +282,7 @@ class Reader implements DatasourceInterface
|
|||||||
$s = '';
|
$s = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $lines;
|
return $lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,7 +297,8 @@ class Reader implements DatasourceInterface
|
|||||||
$PHP_EOL_len = strlen(PHP_EOL);
|
$PHP_EOL_len = strlen(PHP_EOL);
|
||||||
$lines = 0;
|
$lines = 0;
|
||||||
$s = '';
|
$s = '';
|
||||||
$f = fopen($this->filename, 'rb');
|
$f = @fopen($this->filename, 'rb');
|
||||||
|
if ($f !== false) {
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
while (true) {
|
while (true) {
|
||||||
if (strlen($buffer) === 0) {
|
if (strlen($buffer) === 0) {
|
||||||
@ -314,6 +319,7 @@ class Reader implements DatasourceInterface
|
|||||||
$s = '';
|
$s = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $lines;
|
return $lines;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user