// Field list that is used to display the items
const DISPLAY_FIELDLIST = [
- 'uid', 'id', 'parent', 'uri', 'thr-parent', 'parent-uri', 'guid', 'network',
+ 'uid', 'id', 'parent', 'uri', 'thr-parent', 'parent-uri', 'guid', 'network', 'gravity',
'commented', 'created', 'edited', 'received', 'verb', 'object-type', 'postopts', 'plink',
'wall', 'private', 'starred', 'origin', 'title', 'body', 'file', 'attach', 'language',
'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',
'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'item_id',
'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network',
'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network',
- 'contact-id', 'contact-link', 'contact-name', 'contact-avatar',
+ 'contact-id', 'contact-uid', 'contact-link', 'contact-name', 'contact-avatar',
'writable', 'self', 'cid', 'alias',
'event-id', 'event-created', 'event-edited', 'event-start', 'event-finish',
'event-summary', 'event-desc', 'event-location', 'event-type',
}, $item["body"]);
}
- public static function getGuidById($id)
- {
- $item = self::selectFirst(['guid'], ['id' => $id]);
- if (DBA::isResult($item)) {
- return $item['guid'];
- } else {
- return '';
- }
- }
-
- /**
- * This function is only used for the old Friendica app on Android that doesn't like paths with guid
- *
- * @param string $guid item guid
- * @param int $uid user id
- * @return array with id and nick of the item with the given guid
- * @throws \Exception
- */
- public static function getIdAndNickByGuid($guid, $uid = 0)
- {
- $nick = "";
- $id = 0;
-
- if ($uid == 0) {
- $uid = local_user();
- }
-
- // Does the given user have this item?
- if ($uid) {
- $item = self::selectFirst(['id'], ['guid' => $guid, 'uid' => $uid]);
- if (DBA::isResult($item)) {
- $user = DBA::selectFirst('user', ['nickname'], ['uid' => $uid]);
- if (!DBA::isResult($user)) {
- return;
- }
- $id = $item['id'];
- $nick = $user['nickname'];
- }
- }
-
- // Or is it anywhere on the server?
- if ($nick == "") {
- $condition = ["`guid` = ? AND `uid` != 0", $guid];
- $item = self::selectFirst(['id', 'uid'], $condition);
- if (DBA::isResult($item)) {
- $user = DBA::selectFirst('user', ['nickname'], ['uid' => $item['uid']]);
- if (!DBA::isResult($user)) {
- return;
- }
- $id = $item['id'];
- $nick = $user['nickname'];
- }
- }
- return ["nick" => $nick, "id" => $id];
- }
-
/**
* look for mention tags and setup a second delivery chain for forum/community posts if appropriate
*
if (strpos($mime, 'video') !== false) {
if (!$vhead) {
$vhead = true;
- $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('videos_head.tpl'), [
- '$baseurl' => System::baseUrl(),
- ]);
+ $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('videos_head.tpl'));
}
$url_parts = explode('/', $the_url);