1
0
Fork 0
mirror of https://github.com/friendica/friendica synced 2025-03-26 00:41:31 +00:00

Merge pull request from MrPetovan/task/7473-trending-tags

Fix trending tags variable name mistakes in Model\Term
This commit is contained in:
Tobias Diekershoff 2019-08-07 06:44:37 +02:00 committed by GitHub
commit 48b1e172b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions
src/Model
view/templates/widget

View file

@ -82,7 +82,7 @@ class Term
$limit
);
if (DBA::isResult($tags)) {
if (DBA::isResult($tagsStmt)) {
$tags = DBA::toArray($tagsStmt);
Cache::set('global_trending_tags', $tags, Cache::HOUR);
}
@ -127,7 +127,7 @@ class Term
$limit
);
if (DBA::isResult($tags)) {
if (DBA::isResult($tagsStmt)) {
$tags = DBA::toArray($tagsStmt);
Cache::set('local_trending_tags', $tags, Cache::HOUR);
}

View file

@ -2,7 +2,7 @@
<h3>{{$title}}</h3>
<ul>
{{section name=ol loop=$tags max=10}}
<li><a href="search?tag={{$tags[ol].term}}">{{$tags[ol].term}}</a></li>
<li><a href="search?tag={{$tags[ol].term}}">#{{$tags[ol].term}}</a></li>
{{/section}}
</ul>
{{if $tags|count > 10}}
@ -10,7 +10,7 @@
<summary>{{$more}}</summary>
<ul>
{{section name=ul loop=$tags start=10}}
<li><a href="search?tag={{$tags[ul].term}}">{{$tags[ul].term}}</a></li>
<li><a href="search?tag={{$tags[ul].term}}">#{{$tags[ul].term}}</a></li>
{{/section}}
</ul>
</details>