aboutsummaryrefslogtreecommitdiff
path: root/views/xml
diff options
context:
space:
mode:
Diffstat (limited to 'views/xml')
-rw-r--r--views/xml/api/output.php29
-rw-r--r--views/xml/messages/exceptions/exception.php25
-rw-r--r--views/xml/page/default.php14
-rw-r--r--views/xml/pageshells/pageshell.php17
-rw-r--r--views/xml/xml-rpc/output.php23
5 files changed, 60 insertions, 48 deletions
diff --git a/views/xml/api/output.php b/views/xml/api/output.php
index aa385c9e3..42afd44bb 100644
--- a/views/xml/api/output.php
+++ b/views/xml/api/output.php
@@ -1,19 +1,14 @@
<?php
- /**
- * Elgg XML output
- * This outputs the api as XML
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- *
- */
+/**
+ * Elgg XML output
+ * This outputs the api as XML
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
- $result = $vars['result'];
- $export = $result->export();
-
- echo serialise_object_to_xml($export, "elgg");
-?> \ No newline at end of file
+$result = $vars['result'];
+$export = $result->export();
+
+echo serialise_object_to_xml($export, "elgg"); \ No newline at end of file
diff --git a/views/xml/messages/exceptions/exception.php b/views/xml/messages/exceptions/exception.php
new file mode 100644
index 000000000..66a0f2b96
--- /dev/null
+++ b/views/xml/messages/exceptions/exception.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg exception
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['object'] An exception
+ */
+
+?>
+<!--
+<?php echo get_class($vars['object']); ?>: <?php echo elgg_autop($vars['object']->getMessage()); ?>
+
+
+<?php if (elgg_get_config('debug')) { ?>
+<?php
+
+ echo print_r($vars['object'], true);
+
+ ?>
+<?php } ?>
+
+--> \ No newline at end of file
diff --git a/views/xml/page/default.php b/views/xml/page/default.php
new file mode 100644
index 000000000..0f0aecbe4
--- /dev/null
+++ b/views/xml/page/default.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Elgg XML output pageshell
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+header("Content-Type: text/xml");
+// web server will handle setting the content length
+//header("Content-Length: " . strlen($vars['body']));
+echo "<?xml version='1.0' encoding='UTF-8'?>\n";
+echo $vars['body']; \ No newline at end of file
diff --git a/views/xml/pageshells/pageshell.php b/views/xml/pageshells/pageshell.php
deleted file mode 100644
index a7af1b385..000000000
--- a/views/xml/pageshells/pageshell.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
- /**
- * Elgg XML output pageshell
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- *
- */
-
- header("Content-Type: text/xml");
- header("Content-Length: " . strlen($vars['body']));
- echo $vars['body'];
-?> \ No newline at end of file
diff --git a/views/xml/xml-rpc/output.php b/views/xml/xml-rpc/output.php
index 711ca9fba..4276029d1 100644
--- a/views/xml/xml-rpc/output.php
+++ b/views/xml/xml-rpc/output.php
@@ -1,16 +1,11 @@
<?php
- /**
- * Elgg XML output for XML-RPC
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Marcus Povey
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- */
+/**
+ * Elgg XML output for XML-RPC
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
- $result = $vars['result'];
-
- echo "$result";
-?> \ No newline at end of file
+$result = $vars['result'];
+
+echo "$result"; \ No newline at end of file