]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/enjitqueuehandler.php
Only start daemons that are required, according to the site config. There is the...
[quix0rs-gnu-social.git] / scripts / enjitqueuehandler.php
index cfb2537533b91cd98780f74ef102c98759b38f07..40f60da5d80996fc19901c61546fc91be72e57ba 100755 (executable)
@@ -33,19 +33,23 @@ require_once(INSTALLDIR . '/lib/queuehandler.php');
 
 set_error_handler('common_error_handler');
 
-class EnjitQueueHandler extends QueueHandler {
+class EnjitQueueHandler extends QueueHandler
+{
     
-    function transport() {
+    function transport()
+    {
         return 'enjit';
     }
 
-    function start() {
+    function start()
+    {
                 $this->log(LOG_INFO, "Starting EnjitQueueHandler");
                 $this->log(LOG_INFO, "Broadcasting to ".common_config('enjit', 'apiurl'));
         return true;
     }
 
-    function handle_notice($notice) {
+    function handle_notice($notice)
+    {
 
         $profile = Profile::staticGet($notice->profile_id);
 
@@ -70,7 +74,7 @@ class EnjitQueueHandler extends QueueHandler {
         $atom .= "<link href='" . $profile->profileurl . "'/>\n";
         $atom .= "<link rel='self' type='application/rss+xml' href='" . common_local_url('userrss', array('nickname' => $profile->nickname)) . "'/>\n";
         $atom .= "<author><name>" . $profile->nickname . "</name></author>\n";
-        $atom .= "<icon>" . common_profile_avatar_url($profile, AVATAR_PROFILE_SIZE) . "</icon>\n";
+        $atom .= "<icon>" . $profile->avatarUrl(AVATAR_PROFILE_SIZE) . "</icon>\n";
         $atom .= "</source>\n";
         $atom .= "<title>" . htmlspecialchars($msg) . "</title>\n";
         $atom .= "<summary>" . htmlspecialchars($msg) . "</summary>\n";
@@ -117,7 +121,7 @@ class EnjitQueueHandler extends QueueHandler {
 
 mb_internal_encoding('UTF-8');
 
-$id = ($argc > 1) ? $argv[1] : NULL;
+$id = ($argc > 1) ? $argv[1] : null;
 
 $handler = new EnjitQueueHandler($id);