]> git.mxchange.org Git - friendica.git/commitdiff
Replace references to include/tags functions
authorHypolite Petovan <mrpetovan@gmail.com>
Sun, 4 Feb 2018 04:57:47 +0000 (23:57 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sun, 4 Feb 2018 04:57:47 +0000 (23:57 -0500)
mod/photos.php
mod/profile.php
mod/videos.php
src/Model/Item.php
src/Protocol/DFRN.php

index 8b3dbdc759ae4294fda0bbeab81438e99d210cd4..9a2f9fd93a6359f503cddb13721ae89361989957 100644 (file)
@@ -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;
index a2fff27e0712607588c95b6fb293e094c34903d5..6602c4057504f396caa00c7ba280675323686d98 100644 (file)
@@ -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 = [
index 69adf1091f085d87a0ca9edb8159c0dfff68d845..783fbc7506a70998e370520afcc2ddec73d38022 100644 (file)
@@ -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();
index 2399e88bf8f30f3e150c1bb5bc014c0075034c9a..bf0cc3cb38a7d5d2548cc4d509bc3a2e44115bca 100644 (file)
@@ -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']) {
index 80194a53a29ec35cd6481e8e63d59e792306bdcd..41646721396d2b43f8bb96bff297da26f652c899 100644 (file)
@@ -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"]);