mirror of
https://github.com/friendica/friendica
synced 2024-11-18 15:43:42 +00:00
"term" replaced with "tag"
This commit is contained in:
parent
1f64e672ba
commit
8602bbb3b9
2 changed files with 8 additions and 11 deletions
|
@ -102,16 +102,13 @@ class TagCloud
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch tags
|
// Fetch tags
|
||||||
$tag_stmt = DBA::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term`
|
$tag_stmt = DBA::p("SELECT `name`, COUNT(`name`) AS `total` FROM `tag-search-view`
|
||||||
LEFT JOIN `item` ON `term`.`oid` = `item`.`id`
|
LEFT JOIN `item` ON `tag-search-view`.`uri-id` = `item`.`uri-id`
|
||||||
WHERE `term`.`uid` = ? AND `term`.`type` = ?
|
WHERE `tag-search-view`.`uid` = ?
|
||||||
AND `term`.`otype` = ?
|
|
||||||
AND `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
|
AND `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
|
||||||
$sql_options
|
$sql_options
|
||||||
GROUP BY `term` ORDER BY `total` DESC $limit",
|
GROUP BY `name` ORDER BY `total` DESC $limit",
|
||||||
$uid,
|
$uid
|
||||||
$type,
|
|
||||||
Term::OBJECT_TYPE_POST
|
|
||||||
);
|
);
|
||||||
if (!DBA::isResult($tag_stmt)) {
|
if (!DBA::isResult($tag_stmt)) {
|
||||||
return [];
|
return [];
|
||||||
|
@ -140,7 +137,7 @@ class TagCloud
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($arr as $rr) {
|
foreach ($arr as $rr) {
|
||||||
$tags[$x][0] = $rr['term'];
|
$tags[$x][0] = $rr['name'];
|
||||||
$tags[$x][1] = log($rr['total']);
|
$tags[$x][1] = log($rr['total']);
|
||||||
$tags[$x][2] = 0;
|
$tags[$x][2] = 0;
|
||||||
$min = min($min, $tags[$x][1]);
|
$min = min($min, $tags[$x][1]);
|
||||||
|
|
|
@ -148,8 +148,8 @@ class Status extends BaseProfile
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($hashtags)) {
|
if (!empty($hashtags)) {
|
||||||
$sql_post_table .= sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ",
|
$sql_post_table .= sprintf("INNER JOIN (SELECT `uri-id` FROM `tag-search-view` WHERE `name` = '%s' AND `uid` = %d ORDER BY `uri-id` DESC) AS `tag-search` ON `item`.`uri-id` = `tag-search`.`uri-id` ",
|
||||||
DBA::escape(Strings::protectSprintf($hashtags)), intval(Term::OBJECT_TYPE_POST), intval(Tag::HASHTAG), intval($a->profile['uid']));
|
DBA::escape(Strings::protectSprintf($hashtags)), intval($a->profile['uid']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($datequery)) {
|
if (!empty($datequery)) {
|
||||||
|
|
Loading…
Reference in a new issue