]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Channel.php
PostgreSQL - added the rest of the recently added tables for blocking, notice inboxes...
[quix0rs-gnu-social.git] / classes / Channel.php
index a0dc7153892b2d615c0eff9f1873fb5121a15ea0..bcc0c36b56517a0ac813fcf885bd78bace4b0012 100644 (file)
@@ -86,6 +86,7 @@ class XMPPChannel extends Channel {
                } else {
                        common_log(LOG_INFO,
                                           'User ' . $user->nickname . ' set notify flag to ' . $notify);
+                       return true;
                }
        }
 }
@@ -115,10 +116,37 @@ class WebChannel extends Channel {
        }
        
        function error($user, $text) {
-               common_client_error($text);
+               common_user_error($text);
        }
 }
 
+
+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');
+       }
+
+       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');
+       }
+}
+
+
 class MailChannel extends Channel {
 
        var $addr = NULL;