Fixed direct messaging: AjaxWebChannel is now using Action's methods.
This commit is contained in:
parent
9abfe1848a
commit
0f2c43bd04
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
class Channel
|
class Channel extends Action
|
||||||
{
|
{
|
||||||
|
|
||||||
function on($user)
|
function on($user)
|
||||||
@ -129,6 +129,7 @@ class WebChannel extends Channel
|
|||||||
# XXX: buffer all output and send it at the end
|
# XXX: buffer all output and send it at the end
|
||||||
# XXX: even better, redirect to appropriate page
|
# XXX: even better, redirect to appropriate page
|
||||||
# depending on what command was run
|
# depending on what command was run
|
||||||
|
|
||||||
common_show_header(_('Command results'));
|
common_show_header(_('Command results'));
|
||||||
common_element('p', null, $text);
|
common_element('p', null, $text);
|
||||||
common_show_footer();
|
common_show_footer();
|
||||||
@ -146,26 +147,26 @@ class AjaxWebChannel extends WebChannel
|
|||||||
|
|
||||||
function output($user, $text)
|
function output($user, $text)
|
||||||
{
|
{
|
||||||
common_start_html('text/xml;charset=utf-8', true);
|
$this->startHTML('text/xml;charset=utf-8', true);
|
||||||
common_element_start('head');
|
$this->elementStart('head');
|
||||||
common_element('title', null, _('Command results'));
|
$this->element('title', null, _('Command results'));
|
||||||
common_element_end('head');
|
$this->elementEnd('head');
|
||||||
common_element_start('body');
|
$this->elementStart('body');
|
||||||
common_element('p', array('id' => 'command_result'), $text);
|
$this->element('p', array('id' => 'command_result'), $text);
|
||||||
common_element_end('body');
|
$this->elementEnd('body');
|
||||||
common_element_end('html');
|
$this->elementEnd('html');
|
||||||
}
|
}
|
||||||
|
|
||||||
function error($user, $text)
|
function error($user, $text)
|
||||||
{
|
{
|
||||||
common_start_html('text/xml;charset=utf-8', true);
|
$this->startHTML('text/xml;charset=utf-8', true);
|
||||||
common_element_start('head');
|
$this->elementStart('head');
|
||||||
common_element('title', null, _('Ajax Error'));
|
$this->element('title', null, _('Ajax error'));
|
||||||
common_element_end('head');
|
$this->elementEnd('head');
|
||||||
common_element_start('body');
|
$this->elementStart('body');
|
||||||
common_element('p', array('id' => 'error'), $text);
|
$this->element('p', array('id' => 'error'), $text);
|
||||||
common_element_end('body');
|
$this->elementEnd('body');
|
||||||
common_element_end('html');
|
$this->elementEnd('html');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user