summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php23
1 files changed, 3 insertions, 20 deletions
diff --git a/functions.php b/functions.php
index b0c768ff8..1e9e5a576 100644
--- a/functions.php
+++ b/functions.php
@@ -2227,6 +2227,8 @@
function sanity_check($link) {
+ global $ERRORS;
+
$error_code = 0;
$schema_version = get_schema_version($link);
@@ -2245,12 +2247,7 @@
$error_code = 12;
}
- if ($error_code != 0) {
- print_error_xml($error_code);
- return false;
- } else {
- return true;
- }
+ return array("code" => $error_code, "message" => $ERRORS[$error_code]);
}
function file_is_locked($filename) {
@@ -2851,20 +2848,6 @@
return $version[1];
}
- function print_error_xml($code, $add_msg = "") {
- global $ERRORS;
-
- $error_msg = $ERRORS[$code];
-
- if ($add_msg) {
- $error_msg = "$error_msg; $add_msg";
- }
-
- print "<rpc-reply>";
- print "<error error-code=\"$code\" error-msg=\"$error_msg\"/>";
- print "</rpc-reply>";
- }
-
/**
* Subscribes the user to the given feed
*