Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ncp-web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<?php
require("L10N.php");
try {
$l = new L10N($_SERVER["HTTP_ACCEPT_LANGUAGE"], $l10nDir, $modules_path);
$l = new L10N(($_SERVER["HTTP_ACCEPT_LANGUAGE"] ?? ''), $l10nDir, $modules_path);
} catch (Exception $e) {
die("<p class='error'>Error while loading localizations!</p>");
}
Expand Down Expand Up @@ -287,7 +287,7 @@
<div id="logs-wrapper" class="content-box <?php if(!array_key_exists('app',$_GET) || (array_key_exists('app',$_GET) && $_GET['app'] != 'logs')) echo 'hidden';?>">
<h2 class="text-title"><?php echo $l->__("NextcloudPi logs"); ?></h2>
<div id="logs-content" class="table-wrapper">
<div id="logs-details-box" class="outputbox"><?php echo str_replace(array("\r\n", "\n", "\r"), '<br/>', file_get_contents('/var/log/ncp.log')) ?></div>
<div id="logs-details-box" class="outputbox"><?php echo str_replace(array("\r\n", "\n", "\r"), '<br/>', htmlspecialchars(file_get_contents('/var/log/ncp.log'), ENT_QUOTES, 'UTF-8')) ?></div>
<div id="log-download-btn-wrapper"><input id="log-download-btn" type="button" value="Download"/></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ncp-web/ncp-launcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
require("L10N.php");
try {
$l = new L10N($_SERVER["HTTP_ACCEPT_LANGUAGE"], $l10nDir, $cfg_dir);
$l = new L10N(($_SERVER["HTTP_ACCEPT_LANGUAGE"] ?? ''), $l10nDir, $cfg_dir);
} catch (Exception $e) {
die(json_encode("<p class='error'>Error while loading localizations!</p>"));
}
Expand Down