summaryrefslogtreecommitdiff
path: root/classes/Channel.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-03 15:12:55 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-03 15:12:55 -0500
commit0356953cf853bf3bc9eda66f88b5ef4718683337 (patch)
treee23794c60c2d0ca28fc63fcc52cdb8a532fa1719 /classes/Channel.php
parent22c806a15a957c300cb047cb42e8f5c49d47afa9 (diff)
parent0f2c43bd040437b3e40c706d7c3f4ba163e94a71 (diff)
Merge branch 'master' of evan@dev.controlyourself.ca:/var/www/trunk into 0.7.x
Diffstat (limited to 'classes/Channel.php')
-rw-r--r--classes/Channel.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/classes/Channel.php b/classes/Channel.php
index 2e3e4e8d4..c03efef48 100644
--- a/classes/Channel.php
+++ b/classes/Channel.php
@@ -19,7 +19,7 @@
if (!defined('LACONICA')) { exit(1); }
-class Channel
+class Channel extends Action
{
function on($user)
@@ -129,6 +129,7 @@ class WebChannel extends Channel
# XXX: buffer all output and send it at the end
# XXX: even better, redirect to appropriate page
# depending on what command was run
+
common_show_header(_('Command results'));
common_element('p', null, $text);
common_show_footer();
@@ -146,26 +147,26 @@ class AjaxWebChannel extends WebChannel
function output($user, $text)
{
- common_start_html('text/xml;charset=utf-8', true);
- common_element_start('head');
- common_element('title', null, _('Command results'));
- common_element_end('head');
- common_element_start('body');
- common_element('p', array('id' => 'command_result'), $text);
- common_element_end('body');
- common_element_end('html');
+ $this->startHTML('text/xml;charset=utf-8', true);
+ $this->elementStart('head');
+ $this->element('title', null, _('Command results'));
+ $this->elementEnd('head');
+ $this->elementStart('body');
+ $this->element('p', array('id' => 'command_result'), $text);
+ $this->elementEnd('body');
+ $this->elementEnd('html');
}
function error($user, $text)
{
- common_start_html('text/xml;charset=utf-8', true);
- common_element_start('head');
- common_element('title', null, _('Ajax Error'));
- common_element_end('head');
- common_element_start('body');
- common_element('p', array('id' => 'error'), $text);
- common_element_end('body');
- common_element_end('html');
+ $this->startHTML('text/xml;charset=utf-8', true);
+ $this->elementStart('head');
+ $this->element('title', null, _('Ajax error'));
+ $this->elementEnd('head');
+ $this->elementStart('body');
+ $this->element('p', array('id' => 'error'), $text);
+ $this->elementEnd('body');
+ $this->elementEnd('html');
}
}