summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <git@evanprodromou.name>2009-01-13 11:02:34 -0500
committerEvan Prodromou <git@evanprodromou.name>2009-01-13 11:02:34 -0500
commit81745625aa820b8a826412a3cc6ec11dff027c6d (patch)
tree8d2bcacd2548b50252a25104f47fdb7f06dbb9fe /lib/util.php
parent2ff7bcfc5d05fc0bd01201af33f80dae2f9cd688 (diff)
Remove XML-generating function from lib/util.php
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/lib/util.php b/lib/util.php
index fbe04c6c4..dc26a705b 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -79,65 +79,6 @@ function common_user_error($msg, $code=400)
common_show_footer();
}
-$xw = null;
-
-// Start an HTML element
-function common_element_start($tag, $attrs=null)
-{
- global $xw;
- $xw->startElement($tag);
- if (is_array($attrs)) {
- foreach ($attrs as $name => $value) {
- $xw->writeAttribute($name, $value);
- }
- } else if (is_string($attrs)) {
- $xw->writeAttribute('class', $attrs);
- }
-}
-
-function common_element_end($tag)
-{
- static $empty_tag = array('base', 'meta', 'link', 'hr',
- 'br', 'param', 'img', 'area',
- 'input', 'col');
- global $xw;
- // XXX: check namespace
- if (in_array($tag, $empty_tag)) {
- $xw->endElement();
- } else {
- $xw->fullEndElement();
- }
-}
-
-function common_element($tag, $attrs=null, $content=null)
-{
- common_element_start($tag, $attrs);
- global $xw;
- if (!is_null($content)) {
- $xw->text($content);
- }
- common_element_end($tag);
-}
-
-function common_start_xml($doc=null, $public=null, $system=null, $indent=true)
-{
- global $xw;
- $xw = new XMLWriter();
- $xw->openURI('php://output');
- $xw->setIndent($indent);
- $xw->startDocument('1.0', 'UTF-8');
- if ($doc) {
- $xw->writeDTD($doc, $public, $system);
- }
-}
-
-function common_end_xml()
-{
- global $xw;
- $xw->endDocument();
- $xw->flush();
-}
-
function common_init_locale($language=null)
{
if(!$language) {
@@ -319,18 +260,6 @@ function common_show_footer()
common_end_xml();
}
-function common_text($txt)
-{
- global $xw;
- $xw->text($txt);
-}
-
-function common_raw($xml)
-{
- global $xw;
- $xw->writeRaw($xml);
-}
-
function common_nav_menu()
{
$user = common_current_user();