RPC requests should use their own template sets with different content-type.
[squirrelmail.git] / templates / default_rpc / rpc_response_error.tpl
diff --git a/templates/default_rpc/rpc_response_error.tpl b/templates/default_rpc/rpc_response_error.tpl
new file mode 100644 (file)
index 0000000..a7b5b55
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+/**
+  * rpc_response_error.tpl
+  *
+  * Template for constructing an error response to a remote 
+  * procedure call.
+  *
+  * The following variables are available in this template:
+  *      + $error_code - The numeric error code associated with the 
+  *                      current error condition
+  *      + $error_text - Any error message associated with the current
+  *                      error condition (optional; may not be present)
+  *
+  * @copyright &copy; 1999-2007 The SquirrelMail Project Team
+  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+  * @version $Id: rpc_response_error.tpl 12111 2007-01-11 08:05:51Z pdontthink $
+  * @package squirrelmail
+  * @subpackage templates
+  */
+
+
+// retrieve the template vars
+//
+extract($t);
+
+
+/*echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';*/
+echo '<?xml version="1.0" ?>';
+?>
+<response>
+    <status>ERROR</status>
+    <result_code><?php echo $error_code; ?></result_code>
+    <result_text><?php echo $error_text; ?></result_text>
+</response>