summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-07 09:02:24 +0300
committerAndrew Dolgov <[email protected]>2021-03-07 09:02:24 +0300
commit17650775d2e513745d5bb65129c3e24c1a880fab (patch)
tree80d5798324cd95271c127c6709d56d4c17fafc0f
parent5bb871483999235acbe80849608c5cb98d0fd45c (diff)
hide event log accordion pane if LOG_DESTINATION is not sql
-rw-r--r--classes/pref/system.php15
-rw-r--r--include/errorhandler.php2
2 files changed, 8 insertions, 9 deletions
diff --git a/classes/pref/system.php b/classes/pref/system.php
index 0ccbdfea1..fb2379088 100644
--- a/classes/pref/system.php
+++ b/classes/pref/system.php
@@ -165,16 +165,13 @@ class Pref_System extends Handler_Administrative {
$page = (int) ($_REQUEST["page"] ?? 0);
?>
<div dojoType='dijit.layout.AccordionContainer' region='center'>
- <div dojoType='dijit.layout.AccordionPane' style='padding : 0' title='<i class="material-icons">report</i> <?= __('Event log') ?>'>
- <?php
- if (Config::get(Config::LOG_DESTINATION) == "sql") {
+ <?php if (Config::get(Config::LOG_DESTINATION) == "sql") { ?>
+ <div dojoType='dijit.layout.AccordionPane' style='padding : 0' title='<i class="material-icons">report</i> <?= __('Event log') ?>'>
+ <?php
$this->_log_viewer($page, $severity);
- } else {
- print_notice("Please set Config::get(Config::LOG_DESTINATION) to 'sql' in config.php to enable database logging.");
- }
- ?>
- </div>
-
+ ?>
+ </div>
+ <?php } ?>
<div dojoType='dijit.layout.AccordionPane' style='padding : 0' title='<i class="material-icons">mail</i> <?= __('Mail configuration') ?>'>
<div dojoType="dijit.layout.ContentPane">
diff --git a/include/errorhandler.php b/include/errorhandler.php
index 1908bd39c..2ad0be062 100644
--- a/include/errorhandler.php
+++ b/include/errorhandler.php
@@ -55,6 +55,8 @@ function ttrss_error_handler($errno, $errstr, $file, $line) {
if (class_exists("Logger"))
return Logger::log_error((int)$errno, $errstr, $file, (int)$line, $context);
+ else
+ return false;
}
function ttrss_fatal_handler() {