]> git.mxchange.org Git - friendica.git/commitdiff
The endless saga of the fight against notices continues
authorMichael <heluecht@pirati.ca>
Thu, 13 Sep 2018 21:11:52 +0000 (21:11 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 13 Sep 2018 21:11:52 +0000 (21:11 +0000)
mod/fetch.php
src/Protocol/Diaspora.php
src/Util/ParseUrl.php

index 35455e2822dc95c7e703af229bb0db7ffd29eb66..4e7d8c751afc43dde451e77608321dcc4c40acbc 100644 (file)
@@ -25,7 +25,7 @@ function fetch_init(App $a)
 
        // Fetch the item
        $fields = ['uid', 'title', 'body', 'guid', 'contact-id', 'private', 'created', 'app', 'location', 'coord', 'network',
-               'event-id', 'resource-id', 'author-link', 'owner-link', 'attach'];
+               'event-id', 'resource-id', 'author-link', 'author-avatar', 'author-name', 'plink', 'owner-link', 'attach'];
        $condition = ['wall' => true, 'private' => false, 'guid' => $guid, 'network' => [Protocol::DFRN, Protocol::DIASPORA]];
        $item = Item::selectFirst($fields, $condition);
        if (!DBA::isResult($item)) {
index 7af8dbd424dc6063088552a4c5756fad4ba3df0b..27cfdccd853af83b89d026ddaf6fb5e741e25605 100644 (file)
@@ -3496,7 +3496,7 @@ class Diaspora
 
                $myaddr = self::myHandle($owner);
 
-               $public = (($item["private"]) ? "false" : "true");
+               $public = ($item["private"] ? "false" : "true");
 
                $created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
 
index 40cb0b8fc099eaa42763fd4ddbd06ecd062d1185..ac13e1517447873ac2865050627fc3f7a0da7f05 100644 (file)
@@ -486,21 +486,23 @@ class ParseUrl
 
                $complete = $schemearr["scheme"]."://".$schemearr["host"];
 
-               if (@$schemearr["port"] != "") {
+               if (!empty($schemearr["port"])) {
                        $complete .= ":".$schemearr["port"];
                }
 
-               if (strpos($urlarr["path"], "/") !== 0) {
-                       $complete .= "/";
-               }
+               if (!empty($urlarr["path"])) {
+                       if (strpos($urlarr["path"], "/") !== 0) {
+                               $complete .= "/";
+                       }
 
-               $complete .= $urlarr["path"];
+                       $complete .= $urlarr["path"];
+               }
 
-               if (@$urlarr["query"] != "") {
+               if (!empty($urlarr["query"])) {
                        $complete .= "?".$urlarr["query"];
                }
 
-               if (@$urlarr["fragment"] != "") {
+               if (!empty($urlarr["fragment"])) {
                        $complete .= "#".$urlarr["fragment"];
                }