1
0
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:
Andrew Dolgov
2006-03-31 06:18:55 +01:00
parent 6e7f8d269e
commit af106b0ebe
8 changed files with 101 additions and 111 deletions

View File

@@ -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",