Merge pull request #7487 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

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>