]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixed direct messaging: AjaxWebChannel is now using Action's methods.
authorSarven Capadisli <csarven@plantard.controlezvous.ca>
Mon, 2 Feb 2009 18:53:15 +0000 (18:53 +0000)
committerSarven Capadisli <csarven@plantard.controlezvous.ca>
Mon, 2 Feb 2009 18:53:15 +0000 (18:53 +0000)
classes/Channel.php

index 2e3e4e8d4a7cd5c9f44804edf9c10e195bda7189..c03efef481686e2e13bc0dc27d086518d1e771a9 100644 (file)
@@ -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');
     }
 }