Skip to content

Commit

Permalink
Update for fix of changeset eb02f43
Browse files Browse the repository at this point in the history
Removed topic information from sql as it will cause duplicate articles.
This information gets added in by the fixtopic funciton
  • Loading branch information
eSilverStrike committed Dec 21, 2016
1 parent 1438396 commit 87d07e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public_html/index.php
Expand Up @@ -305,7 +305,7 @@ function fixTopic(&$A, $tid_list)
// Could not fix in sql since 2 many variables to contend with plus speed of sql statement probably an issue
$msql = "SELECT s.*, UNIX_TIMESTAMP(s.date) AS unixdate,
UNIX_TIMESTAMP(s.expire) as expireunix,
{$userfields}, t.topic, t.imageurl
{$userfields}
FROM {$_TABLES['stories']} AS s, {$_TABLES['topic_assignments']} AS ta, {$_TABLES['users']} AS u,
{$_TABLES['topics']} AS t WHERE (s.uid = u.uid) AND (ta.tid = t.tid) AND
ta.type = 'article' AND ta.id = s.sid " . COM_getLangSQL('sid', 'AND', 's') . " AND
Expand All @@ -314,7 +314,7 @@ function fixTopic(&$A, $tid_list)
s.related, s.featured, s.show_topic_icon, s.commentcode, s.trackbackcode, s.statuscode, s.expire,
s.postmode, s.advanced_editor_mode, s.frontpage, s.meta_description, s.meta_keywords,
s.cache_time, s.owner_id, s.group_id, s.perm_owner, s.perm_group, s.perm_members, s.perm_anon,
expireunix, {$userfields}, date, t.topic, t.imageurl
expireunix, {$userfields}, date
ORDER BY featured DESC, date DESC LIMIT {$offset}, {$limit}";

$result = DB_query($msql);
Expand Down

0 comments on commit 87d07e6

Please sign in to comment.