// 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)) {
$myaddr = self::myHandle($owner);
- $public = (($item["private"]) ? "false" : "true");
+ $public = ($item["private"] ? "false" : "true");
$created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
$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"];
}