diff --git a/classes/pref/labels.php b/classes/pref/labels.php index acaabb233..92acabd9e 100644 --- a/classes/pref/labels.php +++ b/classes/pref/labels.php @@ -139,7 +139,7 @@ class Pref_Labels extends Handler_Protected { $sth->execute([$caption, $old_caption, $_SESSION['uid']]); - print clean($_REQUEST["value"]); + print clean($_REQUEST["caption"]); } else { print $old_caption; } diff --git a/classes/pref/system.php b/classes/pref/system.php index 763440d78..994e024c7 100644 --- a/classes/pref/system.php +++ b/classes/pref/system.php @@ -31,7 +31,7 @@ class Pref_System extends Handler_Protected { $info = ob_get_contents(); ob_end_clean(); - print preg_replace( '%^.*(.*).*$%ms','$1', $info); + print preg_replace( '%^.*(.*).*$%ms','$1', (string)$info); } private function log_viewer(int $page, int $severity) { @@ -71,87 +71,89 @@ class Pref_System extends Handler_Protected { $total_pages = 0; } - print "
"; + ?> +
+
- print "
"; + - print ""; + - $prev_page_disabled = $page <= 0 ? "disabled" : ""; + - print ""; + - print ""; + - $next_page_disabled = $page >= $total_pages ? "disabled" : ""; +
+ - print ""; + __("Errors"), + E_USER_WARNING => __("Warnings"), + E_USER_NOTICE => __("Everything") + ], 'dojoType="fox.form.Select" onchange="Helpers.EventLog.refresh()"') ?> +
+
- print ""; +
- print "
"; + - print __("Severity:") . " "; - print_select_hash("severity", $severity, - [ - E_USER_ERROR => __("Errors"), - E_USER_WARNING => __("Warnings"), - E_USER_NOTICE => __("Everything") - ], 'dojoType="fox.form.Select" onchange="Helpers.EventLog.refresh()"'); + + + + + + + - print ""; # pull-right + pdo->prepare("SELECT + errno, errstr, filename, lineno, created_at, login, context + FROM + ttrss_error_log LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id) + WHERE + $errno_filter_qpart + ORDER BY + ttrss_error_log.id DESC + LIMIT $limit OFFSET $offset"); - print ""; # toolbar + $sth->execute($errno_values); - print '
'; - - print "
"; - - print " - - - - - - "; - - $sth = $this->pdo->prepare("SELECT - errno, errstr, filename, lineno, created_at, login, context - FROM - ttrss_error_log LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id) - WHERE - $errno_filter_qpart - ORDER BY - ttrss_error_log.id DESC - LIMIT $limit OFFSET $offset"); - - $sth->execute($errno_values); - - while ($line = $sth->fetch()) { - print ""; - - foreach ($line as $k => $v) { - $line[$k] = htmlspecialchars($v); - } - - print ""; - print ""; - print ""; - print ""; - - print ""; - - print ""; - } - - print "
".__("Error")."".__("Filename")."".__("Message")."".__("User")."".__("Date")."
" . Logger::$errornames[$line["errno"]] . " (" . $line["errno"] . ")" . $line["filename"] . ":" . $line["lineno"] . "" . $line["errstr"] . "\n" . $line["context"] . "" . - TimeHelper::make_local_datetime($line["created_at"], false) . "
"; - print "
"; - print "
"; + while ($line = $sth->fetch()) { + foreach ($line as $k => $v) { $line[$k] = htmlspecialchars($v); } + ?> + + + + + + + + + + + + + +
+
+