]> git.mxchange.org Git - friendica.git/blobdiff - mod/poco.php
new api for notifications
[friendica.git] / mod / poco.php
index 3927f125ea23030d5add4056be76b13b781afc81..4b04d70138198851e02346ff7d91a45fa1c75bd9 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+if(! function_exists('poco_init')) {
 function poco_init(&$a) {
        require_once("include/bbcode.php");
 
@@ -179,9 +180,6 @@ function poco_init(&$a) {
                                                $rr['generation'] = 2;
                                }
 
-                               if ($rr["avatar"] == "")
-                                       $rr["avatar"] = $rr["photo"];
-
                                if (($rr['about'] == "") AND isset($rr['pabout']))
                                        $rr['about'] = $rr['pabout'];
 
@@ -261,7 +259,7 @@ function poco_init(&$a) {
                                        $entry['updated'] = date("c", strtotime($entry['updated']));
                                }
                                if($fields_ret['photos'])
-                                       $entry['photos'] = array(array('value' => $rr['avatar'], 'type' => 'profile'));
+                                       $entry['photos'] = array(array('value' => $rr['photo'], 'type' => 'profile'));
                                if($fields_ret['network']) {
                                        $entry['network'] = $rr['network'];
                                        if ($entry['network'] == NETWORK_STATUSNET)
@@ -327,5 +325,5 @@ function poco_init(&$a) {
        else
                http_status_exit(500);
 
-
+}
 }