mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 05:15:55 +00:00
drop errors.php and simplify error handling
This commit is contained in:
@@ -323,20 +323,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function sanity_check() {
|
||||
require_once 'errors.php';
|
||||
$ERRORS = get_error_types();
|
||||
|
||||
$error_code = 0;
|
||||
$schema_version = get_schema_version(true);
|
||||
|
||||
if ($schema_version != SCHEMA_VERSION) {
|
||||
$error_code = 5;
|
||||
}
|
||||
|
||||
return array("code" => $error_code, "message" => $ERRORS[$error_code]);
|
||||
}
|
||||
|
||||
function file_is_locked($filename) {
|
||||
if (file_exists(Config::get(Config::LOCK_DIRECTORY) . "/$filename")) {
|
||||
if (function_exists('flock')) {
|
||||
@@ -533,20 +519,6 @@
|
||||
return file_exists("themes/$theme") || file_exists("themes.local/$theme");
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(unused)
|
||||
*/
|
||||
function error_json($code) {
|
||||
require_once "errors.php";
|
||||
$ERRORS = get_error_types();
|
||||
|
||||
@$message = $ERRORS[$code];
|
||||
|
||||
return json_encode(array("error" =>
|
||||
array("code" => $code, "message" => $message)));
|
||||
|
||||
}
|
||||
|
||||
function arr_qmarks($arr) {
|
||||
return str_repeat('?,', count($arr) - 1) . '?';
|
||||
}
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<?php
|
||||
foreach (array("lib/dojo/dojo.js",
|
||||
foreach (["lib/dojo/dojo.js",
|
||||
"lib/dojo/tt-rss-layer.js",
|
||||
"js/common.js",
|
||||
"js/utility.js",
|
||||
"errors.php?mode=js") as $jsfile) {
|
||||
"js/utility.js"] as $jsfile) {
|
||||
|
||||
echo javascript_tag($jsfile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user