From: Hypolite Petovan Date: Sun, 4 Feb 2018 04:57:47 +0000 (-0500) Subject: Replace references to include/tags functions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9f3acceac75efd3fe38f1091e34e17c2a9376304;p=friendica.git Replace references to include/tags functions --- diff --git a/mod/photos.php b/mod/photos.php index 8b3dbdc759..9a2f9fd93a 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -17,6 +17,7 @@ use Friendica\Model\Group; use Friendica\Model\Item; use Friendica\Model\Photo; use Friendica\Model\Profile; +use Friendica\Model\Term; use Friendica\Network\Probe; use Friendica\Object\Image; use Friendica\Protocol\DFRN; @@ -295,7 +296,7 @@ function photos_post(App $a) dbesc($rr['parent-uri']), intval($page_owner_uid) ); - create_tags_from_itemuri($rr['parent-uri'], $page_owner_uid); + Term::insertFromItemUri($rr['parent-uri'], $page_owner_uid); delete_thread_uri($rr['parent-uri'], $page_owner_uid); $drop_id = intval($rr['id']); @@ -369,7 +370,7 @@ function photos_post(App $a) dbesc($i[0]['uri']), intval($page_owner_uid) ); - create_tags_from_itemuri($i[0]['uri'], $page_owner_uid); + Term::insertFromItemUri($i[0]['uri'], $page_owner_uid); delete_thread_uri($i[0]['uri'], $page_owner_uid); $url = System::baseUrl(); @@ -654,7 +655,7 @@ function photos_post(App $a) intval($item_id), intval($page_owner_uid) ); - create_tags_from_item($item_id); + Term::insertFromItemId($item_id); update_thread($item_id); $best = 0; diff --git a/mod/profile.php b/mod/profile.php index a2fff27e07..6602c40575 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -199,7 +199,7 @@ function profile_content(App $a, $update = 0) $a->page['aside'] .= posted_date_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], $a->profile['profile_uid'], true); $a->page['aside'] .= Widget::categories(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], (x($category) ? xmlify($category) : '')); - $a->page['aside'] .= tagcloud_wall_widget(); + $a->page['aside'] .= Widget::tagCloud(); if (can_write_wall($a->profile['profile_uid'])) { $x = [ diff --git a/mod/videos.php b/mod/videos.php index 69adf1091f..783fbc7506 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -13,6 +13,7 @@ use Friendica\Database\DBM; use Friendica\Model\Contact; use Friendica\Model\Group; use Friendica\Model\Profile; +use Friendica\Model\Term; use Friendica\Protocol\DFRN; use Friendica\Util\DateTimeFormat; @@ -175,7 +176,7 @@ function videos_post(App $a) { dbesc($i[0]['uri']), intval(local_user()) ); - create_tags_from_itemuri($i[0]['uri'], local_user()); + Term::insertFromItemUri($i[0]['uri'], local_user()); delete_thread_uri($i[0]['uri'], local_user()); $url = System::baseUrl(); diff --git a/src/Model/Item.php b/src/Model/Item.php index 2399e88bf8..bf0cc3cb38 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -70,7 +70,7 @@ class Item extends BaseObject continue; } - create_tags_from_item($item['id']); + Term::insertFromItemId($item['id']); Term::insertFromItemFileById($item['id']); update_thread($item['id']); @@ -152,7 +152,7 @@ class Item extends BaseObject 'edited' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()], ['id' => $item['id']]); - create_tags_from_item($item['id']); + Term::insertFromItemId($item['id']); Term::insertFromItemFileById($item['id']); delete_thread($item['id'], $item['parent-uri']); @@ -791,7 +791,7 @@ class Item extends BaseObject * Due to deadlock issues with the "term" table we are doing these steps after the commit. * This is not perfect - but a workable solution until we found the reason for the problem. */ - create_tags_from_item($current_post); + Term::insertFromItemId($current_post); Term::insertFromItemFileById($current_post); if ($arr['parent-uri'] === $arr['uri']) { diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 80194a53a2..4164672139 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2092,7 +2092,7 @@ class DFRN $condition = ["`uri` = ? AND `uid` IN (0, ?)", $item["uri"], $importer["importer_uid"]]; dba::update('item', $fields, $condition); - create_tags_from_itemuri($item["uri"], $importer["importer_uid"]); + Term::insertFromItemUri($item["uri"], $importer["importer_uid"]); update_thread_uri($item["uri"], $importer["importer_uid"]); $changed = true; @@ -2336,7 +2336,7 @@ class DFRN dbesc($r[0]["tag"] . (strlen($r[0]["tag"]) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'), intval($r[0]["id"]) ); - create_tags_from_item($r[0]["id"]); + Term::insertFromItemId($r[0]["id"]); } } } @@ -2824,7 +2824,7 @@ class DFRN dbesc(implode(',', $newtags)), intval($i[0]["id"]) ); - create_tags_from_item($i[0]["id"]); + Term::insertFromItemId($i[0]["id"]); } } } @@ -2840,7 +2840,7 @@ class DFRN dbesc($uri), intval($importer["uid"]) ); - create_tags_from_itemuri($uri, $importer["uid"]); + Term::insertFromItemUri($uri, $importer["uid"]); Term::insertFromItemFileByUri($uri, $importer["uid"]); update_thread_uri($uri, $importer["uid"]); } else { @@ -2853,7 +2853,7 @@ class DFRN dbesc($uri), intval($importer["uid"]) ); - create_tags_from_itemuri($uri, $importer["uid"]); + Term::insertFromItemUri($uri, $importer["uid"]); Term::insertFromItemFileByUri($uri, $importer["uid"]); update_thread_uri($uri, $importer["importer_uid"]);