summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index 14d9fa154..d4feaf5d6 100644
--- a/functions.php
+++ b/functions.php
@@ -9,6 +9,7 @@
require_once 'config.php';
require_once 'db-prefs.php';
require_once 'compat.php';
+ require_once 'errors.php';
require_once 'magpierss/rss_utils.inc';
@@ -1498,4 +1499,15 @@
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 "<error error-code=\"$code\" error-msg=\"$error_msg\"/>";
+ }
?>