]> git.mxchange.org Git - friendica.git/blobdiff - mod/p.php
fbrowser: Take the picture as that mostly fits
[friendica.git] / mod / p.php
index 225b831fea66c3751b5a8f444d180c37342cb201..20d6cfdbafeb181ca263aec232a33d53722dab8a 100644 (file)
--- a/mod/p.php
+++ b/mod/p.php
@@ -4,8 +4,7 @@ This file is part of the Diaspora protocol. It is used for fetching single publi
 */
 require_once("include/diaspora.php");
 
-if(! function_exists('p_init')) {
-function p_init($a) {
+function p_init($a){
        if ($a->argc != 2) {
                header($_SERVER["SERVER_PROTOCOL"].' 510 '.t('Not Extended'));
                killme();
@@ -29,14 +28,14 @@ function p_init($a) {
 
        $post = array();
 
-       $reshared = diaspora_is_reshare($item[0]["body"]);
+       $reshared = diaspora::is_reshare($item[0]["body"]);
 
        if ($reshared) {
                $nodename = "reshare";
                $post["root_diaspora_id"] = $reshared["root_handle"];
                $post["root_guid"] = $reshared["root_guid"];
                $post["guid"] = $item[0]["guid"];
-               $post["diaspora_handle"] = diaspora_handle_from_contact($item[0]["contact-id"]);
+               $post["diaspora_handle"] = diaspora::handle_from_contact($item[0]["contact-id"]);
                $post["public"] = (!$item[0]["private"] ? 'true':'false');
                $post["created_at"] = datetime_convert('UTC','UTC',$item[0]["created"]);
        } else {
@@ -49,7 +48,7 @@ function p_init($a) {
                $nodename = "status_message";
                $post["raw_message"] = str_replace("&", "&", $body);
                $post["guid"] = $item[0]["guid"];
-               $post["diaspora_handle"] = diaspora_handle_from_contact($item[0]["contact-id"]);
+               $post["diaspora_handle"] = diaspora::handle_from_contact($item[0]["contact-id"]);
                $post["public"] = (!$item[0]["private"] ? 'true':'false');
                $post["created_at"] = datetime_convert('UTC','UTC',$item[0]["created"]);
                $post["provider_display_name"] = $item[0]["app"];
@@ -80,4 +79,3 @@ function p_init($a) {
 
        killme();
 }
-}