Fix regression in PopularNoticeSection: tag parameter was broken, causing sidebar on tag pages to show untagged favorites.

This commit is contained in:
Brion Vibber 2010-11-18 14:30:00 -08:00
parent 0265cdc1c9
commit f468180743

View File

@ -53,12 +53,12 @@ class Popularity
{ {
// @fixme there should be a common func for this // @fixme there should be a common func for this
if (common_config('db', 'type') == 'pgsql') { if (common_config('db', 'type') == 'pgsql') {
if (!empty($this->out->tag)) { if (!empty($this->tag)) {
$tag = pg_escape_string($this->out->tag); $tag = pg_escape_string($this->tag);
} }
} else { } else {
if (!empty($this->out->tag)) { if (!empty($this->tag)) {
$tag = mysql_escape_string($this->out->tag); $tag = mysql_escape_string($this->tag);
} }
} }
$weightexpr = common_sql_weight('fave.modified', common_config('popular', 'dropoff')); $weightexpr = common_sql_weight('fave.modified', common_config('popular', 'dropoff'));