Replace references to include/tags functions
This commit is contained in:
parent
d00c6111fd
commit
9f3acceac7
5 changed files with 15 additions and 13 deletions
|
@ -17,6 +17,7 @@ use Friendica\Model\Group;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Model\Photo;
|
use Friendica\Model\Photo;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
|
use Friendica\Model\Term;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Object\Image;
|
use Friendica\Object\Image;
|
||||||
use Friendica\Protocol\DFRN;
|
use Friendica\Protocol\DFRN;
|
||||||
|
@ -295,7 +296,7 @@ function photos_post(App $a)
|
||||||
dbesc($rr['parent-uri']),
|
dbesc($rr['parent-uri']),
|
||||||
intval($page_owner_uid)
|
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);
|
delete_thread_uri($rr['parent-uri'], $page_owner_uid);
|
||||||
|
|
||||||
$drop_id = intval($rr['id']);
|
$drop_id = intval($rr['id']);
|
||||||
|
@ -369,7 +370,7 @@ function photos_post(App $a)
|
||||||
dbesc($i[0]['uri']),
|
dbesc($i[0]['uri']),
|
||||||
intval($page_owner_uid)
|
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);
|
delete_thread_uri($i[0]['uri'], $page_owner_uid);
|
||||||
|
|
||||||
$url = System::baseUrl();
|
$url = System::baseUrl();
|
||||||
|
@ -654,7 +655,7 @@ function photos_post(App $a)
|
||||||
intval($item_id),
|
intval($item_id),
|
||||||
intval($page_owner_uid)
|
intval($page_owner_uid)
|
||||||
);
|
);
|
||||||
create_tags_from_item($item_id);
|
Term::insertFromItemId($item_id);
|
||||||
update_thread($item_id);
|
update_thread($item_id);
|
||||||
|
|
||||||
$best = 0;
|
$best = 0;
|
||||||
|
|
|
@ -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'] .= 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'] .= 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'])) {
|
if (can_write_wall($a->profile['profile_uid'])) {
|
||||||
$x = [
|
$x = [
|
||||||
|
|
|
@ -13,6 +13,7 @@ use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\Group;
|
use Friendica\Model\Group;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
|
use Friendica\Model\Term;
|
||||||
use Friendica\Protocol\DFRN;
|
use Friendica\Protocol\DFRN;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
|
|
||||||
|
@ -175,7 +176,7 @@ function videos_post(App $a) {
|
||||||
dbesc($i[0]['uri']),
|
dbesc($i[0]['uri']),
|
||||||
intval(local_user())
|
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());
|
delete_thread_uri($i[0]['uri'], local_user());
|
||||||
|
|
||||||
$url = System::baseUrl();
|
$url = System::baseUrl();
|
||||||
|
|
|
@ -70,7 +70,7 @@ class Item extends BaseObject
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
create_tags_from_item($item['id']);
|
Term::insertFromItemId($item['id']);
|
||||||
Term::insertFromItemFileById($item['id']);
|
Term::insertFromItemFileById($item['id']);
|
||||||
update_thread($item['id']);
|
update_thread($item['id']);
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ class Item extends BaseObject
|
||||||
'edited' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()],
|
'edited' => DateTimeFormat::utcNow(), 'changed' => DateTimeFormat::utcNow()],
|
||||||
['id' => $item['id']]);
|
['id' => $item['id']]);
|
||||||
|
|
||||||
create_tags_from_item($item['id']);
|
Term::insertFromItemId($item['id']);
|
||||||
Term::insertFromItemFileById($item['id']);
|
Term::insertFromItemFileById($item['id']);
|
||||||
delete_thread($item['id'], $item['parent-uri']);
|
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.
|
* 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.
|
* 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);
|
Term::insertFromItemFileById($current_post);
|
||||||
|
|
||||||
if ($arr['parent-uri'] === $arr['uri']) {
|
if ($arr['parent-uri'] === $arr['uri']) {
|
||||||
|
|
|
@ -2092,7 +2092,7 @@ class DFRN
|
||||||
$condition = ["`uri` = ? AND `uid` IN (0, ?)", $item["uri"], $importer["importer_uid"]];
|
$condition = ["`uri` = ? AND `uid` IN (0, ?)", $item["uri"], $importer["importer_uid"]];
|
||||||
dba::update('item', $fields, $condition);
|
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"]);
|
update_thread_uri($item["uri"], $importer["importer_uid"]);
|
||||||
|
|
||||||
$changed = true;
|
$changed = true;
|
||||||
|
@ -2336,7 +2336,7 @@ class DFRN
|
||||||
dbesc($r[0]["tag"] . (strlen($r[0]["tag"]) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'),
|
dbesc($r[0]["tag"] . (strlen($r[0]["tag"]) ? ',' : '') . '#[url=' . $xo->id . ']'. $xo->content . '[/url]'),
|
||||||
intval($r[0]["id"])
|
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)),
|
dbesc(implode(',', $newtags)),
|
||||||
intval($i[0]["id"])
|
intval($i[0]["id"])
|
||||||
);
|
);
|
||||||
create_tags_from_item($i[0]["id"]);
|
Term::insertFromItemId($i[0]["id"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2840,7 +2840,7 @@ class DFRN
|
||||||
dbesc($uri),
|
dbesc($uri),
|
||||||
intval($importer["uid"])
|
intval($importer["uid"])
|
||||||
);
|
);
|
||||||
create_tags_from_itemuri($uri, $importer["uid"]);
|
Term::insertFromItemUri($uri, $importer["uid"]);
|
||||||
Term::insertFromItemFileByUri($uri, $importer["uid"]);
|
Term::insertFromItemFileByUri($uri, $importer["uid"]);
|
||||||
update_thread_uri($uri, $importer["uid"]);
|
update_thread_uri($uri, $importer["uid"]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2853,7 +2853,7 @@ class DFRN
|
||||||
dbesc($uri),
|
dbesc($uri),
|
||||||
intval($importer["uid"])
|
intval($importer["uid"])
|
||||||
);
|
);
|
||||||
create_tags_from_itemuri($uri, $importer["uid"]);
|
Term::insertFromItemUri($uri, $importer["uid"]);
|
||||||
Term::insertFromItemFileByUri($uri, $importer["uid"]);
|
Term::insertFromItemFileByUri($uri, $importer["uid"]);
|
||||||
update_thread_uri($uri, $importer["importer_uid"]);
|
update_thread_uri($uri, $importer["importer_uid"]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue