X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FAdmin%2FLogs%2FView.php;h=51e083473498cf5015c879372e3b21eeadbe209c;hb=48baa0be4b662b7c3d2afebad3b78324677fec14;hp=45b19bfacf6fe14f018dc9f988ad7820d537ae15;hpb=df947ba9dbb14037d12cd3428d3d73af67b856b5;p=friendica.git diff --git a/src/Module/Admin/Logs/View.php b/src/Module/Admin/Logs/View.php index 45b19bfacf..51e0834734 100644 --- a/src/Module/Admin/Logs/View.php +++ b/src/Module/Admin/Logs/View.php @@ -1,52 +1,52 @@ -%1$s log file.\r\n
Check to see if file %1$s exist and is readable.', $f); - } else { - $fp = fopen($f, 'r'); - if (!$fp) { - $data = L10n::t('Couldn\'t open %1$s log file.\r\n
Check to see if file %1$s is readable.', $f); - } else { - $fstat = fstat($fp); - $size = $fstat['size']; - if ($size != 0) { - if ($size > 5000000 || $size < 0) { - $size = 5000000; - } - $seek = fseek($fp, 0 - $size, SEEK_END); - if ($seek === 0) { - $data = Strings::escapeHtml(fread($fp, $size)); - while (!feof($fp)) { - $data .= Strings::escapeHtml(fread($fp, 4096)); - } - } - } - fclose($fp); - } - } - return Renderer::replaceMacros($t, [ - '$title' => L10n::t('Administration'), - '$page' => L10n::t('View Logs'), - '$data' => $data, - '$logname' => Config::get('system', 'logfile') - ]); - } -} +%1$s log file.\r\n
Check to see if file %1$s exist and is readable.', $f); + } else { + $fp = fopen($f, 'r'); + if (!$fp) { + $data = L10n::t('Couldn\'t open %1$s log file.\r\n
Check to see if file %1$s is readable.', $f); + } else { + $fstat = fstat($fp); + $size = $fstat['size']; + if ($size != 0) { + if ($size > 5000000 || $size < 0) { + $size = 5000000; + } + $seek = fseek($fp, 0 - $size, SEEK_END); + if ($seek === 0) { + $data = Strings::escapeHtml(fread($fp, $size)); + while (!feof($fp)) { + $data .= Strings::escapeHtml(fread($fp, 4096)); + } + } + } + fclose($fp); + } + } + return Renderer::replaceMacros($t, [ + '$title' => L10n::t('Administration'), + '$page' => L10n::t('View Logs'), + '$data' => $data, + '$logname' => Config::get('system', 'logfile') + ]); + } +}