mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-20 18:11:29 +00:00
proper handling of failed sanity check in parse_counters + weird getAttribute workaround
This commit is contained in:
@@ -859,4 +859,24 @@
|
||||
else
|
||||
return "even";
|
||||
}
|
||||
|
||||
function sanity_check($link) {
|
||||
|
||||
$error_code = 0;
|
||||
$result = db_query($link, "SELECT schema_version FROM ttrss_version");
|
||||
$schema_version = db_fetch_result($result, 0, "schema_version");
|
||||
|
||||
if ($schema_version != SCHEMA_VERSION) {
|
||||
$error_code = 5;
|
||||
}
|
||||
|
||||
print "<error error-code='$error_code'/>";
|
||||
|
||||
if ($error_code != 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user