]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Merge pull request #7095 from annando/ap-connect
[friendica.git] / src / Model / Item.php
index c309da24ef1b289673be4eba6ccf04d1a2bcfe50..387014d4b93e55883b1c90e0a081d4bc961be060 100644 (file)
@@ -2508,62 +2508,6 @@ class Item extends BaseObject
                        }, $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
         *
@@ -3466,9 +3410,7 @@ class Item extends BaseObject
                        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);