mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-23 13:51:28 +00:00
better fatal error handling by frontend (remove error.php)
This commit is contained in:
19
backend.php
19
backend.php
@@ -20,12 +20,17 @@
|
||||
|
||||
require_once "sanity_check.php";
|
||||
require_once "config.php";
|
||||
|
||||
require_once "db.php";
|
||||
require_once "db-prefs.php";
|
||||
require_once "functions.php";
|
||||
require_once "magpierss/rss_fetch.inc";
|
||||
|
||||
$err_msg = check_configuration_variables();
|
||||
|
||||
if ($err_msg) {
|
||||
print "Fatal error: $err_msg";
|
||||
exit;
|
||||
header("Content-Type: application/xml");
|
||||
print_error_xml(9, $err_msg); die;
|
||||
}
|
||||
|
||||
if ((!$op || $op == "rpc" || $op == "globalUpdateFeeds") && !$_REQUEST["noxml"]) {
|
||||
@@ -35,7 +40,7 @@
|
||||
if (!$_SESSION["uid"] && $op != "globalUpdateFeeds") {
|
||||
|
||||
if ($op == "rpc") {
|
||||
print "<error error-code=\"6\"/>";
|
||||
print_error_xml(6); die;
|
||||
} else {
|
||||
print "
|
||||
<html><body>
|
||||
@@ -54,15 +59,9 @@
|
||||
}
|
||||
|
||||
if (!$op) {
|
||||
print "<error error-code=\"7\"/>";
|
||||
exit;
|
||||
print_error_xml(7); exit;
|
||||
}
|
||||
|
||||
require_once "db.php";
|
||||
require_once "db-prefs.php";
|
||||
require_once "functions.php";
|
||||
require_once "magpierss/rss_fetch.inc";
|
||||
|
||||
$purge_intervals = array(
|
||||
0 => "Default",
|
||||
-1 => "Never purge",
|
||||
|
||||
Reference in New Issue
Block a user